Bluetooth Low Energy (a.k.a Bluetooth LE, BTLE, Bluetooth Smart)

Firmware Over The Air

03 Aug 2015

@Tayeop: Hi, our official documentation has gone a bit out of date. With our move towards v8 of the Nordic SDk (together with the use of the S130 softdevice), we now need a different bootloader to go with FOTA. This updated bootloader can be installed together with the new default-app. You'll find it here: https://developer.mbed.org/forum/team-63-Bluetooth-Low-Energy-community/topic/5201/?page=1#comment-38662

03 Aug 2015

@Rohit

HI,

I followed your link, and I found temp.hex

So, I click the link to download .hex file.

but when I click the link, It shows just characters,

How do I put into nrf51-dk?

03 Aug 2015

:) perhaps I should have renamed it as a .zip to allow download to a file. But you should still be able to select-all and copy-paste into a file.

04 Aug 2015

@Rohit

Hi, here again :)

Still I failed FOTA, Please check I followed correct steps.

- nrf51-dk - android - mac os

1. download packet.dat and move into android phone.

2. copy characters which I can see when clicked temp.hex.

3. resave .hex file on any .hex file through "text wrangler" app.

4. drag & drop temp.hex file into nrf51-dk.

5. click the n/f master control app.

6. click default app and send value application(0x04) on DFUS tab.

7, click dfutarg and click dfu icon, find new .hex file and .dat file.

and it shows initialize.. start dfu.. and nothing happened.. How can I fix it?

Thanks a lot in advance :)

05 Aug 2015

Hi Tayeop,

The nRF Master Control application may provide some useful informations about the reason DFU failed: by selecting "show log" in the upper menu, or simply sliding right when connected to a device.

Do you see anything interesting in the logs?

24 Sep 2015

Thanks a lot for great explanation on FOTA, although I am having some trouble.

ble.init() is hanging / crashing when I use the FOTA shadow build. ble.init() works fine on the Default build.

Also this seems specific to latest version of BLE_API (My main project is synced to latest as of today). I tried a test app with old BLE_API v341 (circa April 2015 I think) and FOTA build and upload worked with that like a charm.

I am using Seeed Tiny BLE with Android Master Control Panel app.

24 Sep 2015

Abhijit raises an interesting question.

When working with FOTA, we will conceivably be intermittently updating an application to an end user but rarely... if ever, updating the Softdevice deployed on a target. Nordic are still in the process of making SDK releases, 7, 8, 9 etc with an updated Softdevice. So the Softdevice is by no means fixed. If you read the number of current outstanding hardware errata in the current SDK there will no doubt be further updates/fixes as well.

So the big question is, will the latest application code built on a shadow platform with latest BLE_API and nrf51822 libraries be backward compatitable with older softdevices deployed on targets? If not then this may be an issue, especially as the currently mbed FOTA bootloader does not allow over the air softdevice updates.

Thanks,

Allen

24 Sep 2015

@Abhijit, could you please retry with the default-app mentioned in https://developer.mbed.org/forum/team-63-Bluetooth-Low-Energy-community/topic/5201/?page=1#comment-38662

Nordic made a backwards incompatible change to their FOTA mechanism when going from SDKv7 to v8. The softdevice APIs [SVC numbers] were changed; and programs compiled for mismatched softdevices would hang at the point the softdevice was initialized. I believe this is the same behaviour you're seeing.

In answer to Allen's question: programs built against SDKv8 (i.e. current) would not work with softdevices v7 or older. Our hands are tied by Nordic's product development strategies.

Mbed OS, which is our attempt at IOT, will contain semantic versioning to disallow such mixing of incompatible components. We're working towards our own generic FOTA solution; but until the end of the year we're going to be limited with what Nordic has offered.

24 Sep 2015

thanks @Rohit @Allen for quick responses.

I tried to install default_bootloader_app_s130_tmp.hex over usb but I am getting SWD Error with that not sure if that app is supposed to work with Seeed Tiny BLE

Also when I install my app with bootloader shadow build, it fails ble.init() too. Assuming that build should replace new SoftDevice.

Summary of what works and what not

Works ! 1. My App with latest BLE_API and Default Build 2. Seeed_Tiny_BLE_Get_Started app with old BLE_API with all 3 Default, Bootloader and FOTA builds

Doesn't Work :( 1. My App with latest BLE_API and Bootloader and FOTA Builds, gets stuck at ble.init() 2. default_bootloader_app_s130_tmp.hex didn't get installed over usb on Seeed Tiny BLE

If it comes to it I can switch somehow to old BLE_API in my app and hopefully that will work, less than ideal though.

25 Sep 2015

Hey Guys, I've been having an issue with my program sometimes start up in bootloader mode and advertising as DFUTarg for about a minute or two, before handing over control to the application code. For simplicity I posted it as a full question here - https://developer.mbed.org/questions/60981/BLE-App-reverting-to-DFUTarg-on-startup/

I'd really appreciate any insights you guys may have on this issue! Thanks, Steve

07 Aug 2016

I'm using an NRF51-DK to program a Taiyo Yuden EYSGJNZWY module, which uses the nRF51882 chipset.

I'm using the online mbed build platform and when I select "Nordic NRF51-DK" and "Default" as the build options, my code works as expected.

However, when I select either "App with Bootloader" or "App for FOTA", I am getting build errors. Specifically:

Error: Identifier "PwmOut" is undefined in "main.cpp" Error: Identifier "AnalogIn" is undefined in "main.cpp" No other changes to the code are made. Only the target build is changed from "Default" to "BOOT" / "FOTA".

Can someone confirm that PwmOut and AnalogIn functions are still supported when building for FOTA?

Regards,

Stephan.

09 Dec 2016

Hi Rohit, I am using Redbearlab BLE Nano. It doesn't seem to offer FOTA as target platform like the nrf5x DK. I have uploaded the proposed ble_default_bootloader_app.hex by drag and drop. And I used the NRF Toolbox DFU function (not Nordic Master Control/nrf Connect because I only have iphone here). So, I pressed the reset button to get the board into FOTA DFU mode and have done it successfully. This was using app hex code built from Arduino IDE. There is not DFU service advertise. Then, I built another app using "App for FOTA" in the mbed IDE and FOTA using reset button. The app doesn't called the DFUService dfu(ble) in the code. And I can see the DFU service via IOS nrf Connect app together with another service in the app. (This is to prove that it is not in the power cycle bootloader mode which advertise the DFU Service as well) AS you know, unlike the Andriod version, the IOS version nrf connect cannot trigger the FOTA. I then used the nrf Toolbox DFU but was unsuccessful to trigger FOTA via app without reset button. Since I do not add any DFUService code, I am not sure if I am missing anything in the code to handle the FOTA call back and get to the OTA bootloader in the app. Advertising DFU in app seems to built in when I choose "App for FOTA". Is there a limitation of nrf toolbox DFU where it works on power/reset cycle OTA bootloader only and not able to trigger OTA in app?

27 Jan 2017

Hi Rohit,

I am trying to update DFU Over the air.

I have done it with example code. now i am trying implement it into my code as you describe above.

Add this "#include<DFUService.h>" in header and DFUService dfu(ble);

But i found Error: Identifier "ble" is undefined or if i defined ble like BLE ble; then this file is not working for the OTA.

Please suggest me how can solve it.