adafruit / Adafruit_Mynewt

Apache Mynewt documentation and test project for the nRF5x family of BLE SoCs
MIT License
8 stars 3 forks source link

Test OTA Bootloader #2

Closed microbuilder closed 8 years ago

microbuilder commented 8 years ago

Vipul at Runtime has added initial OTA update support via newtmgr. As per the email below, this needs to be tested and any feedback sent to Runtime quickly.

Hello Kevin,

I have changed the newtmgr tool so that it looks at the correct byte order and also cleaned it up a bit. Example of the usage is described below:

admin@bleh:~/go/src/mynewt.apache.org/newt/newtmgr$ ./newtmgr -ldebug conn add ble3 type=ble addr=01:02:03:04:05:06 addrtype=0 connstring='nimble-bleprph'
2016/07/15 20:49:09 [DEBUG] Getting list of connection profiles
Connection profile ble3 successfully added
admin@bleh:~/go/src/mynewt.apache.org/newt/newtmgr$ sudo ./newtmgr -c ble3 image list
2016/07/15 20:49:18 dev: hci0 up
2016/07/15 20:49:18 dev: hci0 down
2016/07/15 20:49:18 dev: hci0 opened
Images:
    0 : 0.0.3
admin@bleh:~/go/src/mynewt.apache.org/newt/newtmgr$ ./newtmgr conn show
Connection profiles: 
  ble: type=ble, connstring='nimble-bleprph'
  ble3: type=ble, connstring='nimble-bleprph', addr=01:02:03:04:05:06, addrtype=0

Regards,
Vipul Rahane

The code is available in a pull request here:

The pull request for mynewt core is at https://github.com/apache/incubator-mynewt-core/pull/73.

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

The BLE library used for the gateway side is Runtime fork of Paypal/gatt library which is at 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”.