Also, I should have mentioned that the current version of the gateway only works for linux.
I have committed code in bleprph example which instruments the library and can be used as a starting point for OTA image upgrades and other command request responses. -Vipul > On Jul 12, 2016, at 6:15 PM, Vipul Rahane <[email protected]> wrote: > > Hello, > > I have implemented and tested newtmgr over BLE as a separate library. > > The current tests I have performed include image upload(OTA Firmware > upgrades), soft reset command, remote config and logs. > > The pull request for mynewt core is at > https://github.com/apache/incubator-mynewt-core/pull/73 > <https://goo.gl/0axujg>. > > The pull request for newtmgr transport implementation that supports the on > the gateway side is at > https://github.com/apache/incubator-mynewt-newt/pull/15 > <https://github.com/apache/incubator-mynewt-newt/pull/15> > > The BLE library used for the gateway side is Runtime fork of Paypal/gatt > library which is at https://github.com/runtimeinc/gatt > <https://github.com/runtimeinc/gatt> > There is a “type:ble" transport that is used to identify messages going over > BLE as opposed to “type:serial”. > > An example of how to use newtmgr over BLE is as follows: > > 1. Add a BLE connection profile: > newtmgr conn add ble type=ble connstring='vipuls-slave’ > > where 'vipuls-slave’ is the name of the bluetooth device we are trying to > connect to. > > 2. Issue command; Here I am uploading an image: > newtmgr -c ble image upload ~/Downloads/bletiny.img > > The output you should see is as follows: > > 2016/07/12 12:12:25 dev: hci0 up > 2016/07/12 12:12:25 dev: hci0 down > 2016/07/12 12:12:25 dev: hci0 opened > date > Done > admin@bleh:~/go/src/mynewt.apache.org/newt/newtmgr > <http://mynewt.apache.org/newt/newtmgr>$ date > Tue Jul 12 12:13:07 PDT 2016 > > The above process connects to a bluetooth device, issues a command with > write-no-response commands, waits for a notification and then disconnects. > > Limitation: > Chunking for stats isn’t currently implemented and BLE stats are currently > very big and do not fit in a single response. I would shortly open a ticket > for this. > > This would improve further in due course of time based on usage and > requirements. > > Thank you for all the help, suggestions and comments from everyone. Please > feel free to comment more on the pull requests or here if needed. > > Regards, > Vipul Rahane
