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

Internals of the Nordic DFU Bootloader

03 Nov 2015

Hi, I'm using watchdog to avoid malfunction. When I update application with FOTA, the board is reset by watchdog expired. Watchdog count is set to 30 seconds but application update takes more time. Should I modify dfu bootloader source to kick watchdog?

03 Nov 2015

perhaps you should disable the watchdog forwarding control to the bootloader. You can setup a write-callback for the control characteristic of the DFU service; and in your own callback-handler you can disable the watchdog.

04 Nov 2015

Thanks Rohit, Watchdog cannot be disabled or re-configured after started. even after software reset, watchdog cannot be re-configured.

Please refer the following.

https://devzone.nordicsemi.com/question/13807/how-to-disable-the-wdt-watchdog-timer/

04 Nov 2015

@Woojin Jeong, thanks for bringing this to our attention. I guess you're limited to either selecting a very large timeout or putting in code within the bootloader to reset the watchdog periodically.

04 Nov 2015

@Rohit, thanks for reply. Now, I will set enough watchdog timeout value to complete download. But I hope you to consider the support of watchdog reset in bootloader. Because I'm not expert of nrf SDK codes like bootloader and also want to keep using same bootloader as online compiler. Thanks again.

16 Nov 2015

How can i merge application-Fota.hex with bootloader, with softdevice for create a single file with fota enable?

Regards

16 Nov 2015

@Erry, you can find detailed explanation of bootloader + softdevice + app interaction together with instructions on how to combine them in the following website: https://docs.mbed.com/docs/ble-intros/en/latest/FOTA/Bootloader/. If you are using the online IDE you can change the build options from 'default' to 'App with bootloader' using the drop-down list at the top right corner of the screen. I hope that helps

16 Nov 2015

thanks, but if I use 'App with bootloader' fota doesn'w work

do you know why? Regardes

16 Nov 2015

Enrico Pastarini wrote:

thanks, but if I use 'App with bootloader' fota doesn'w work

do you know why? Regardes

@Erry, are you trying to compile one of the examples with FOTA? I recently tried HeartRate and it seemed to work fine. Could you please provide more information about the nature of the failure? Thanks!

16 Nov 2015

i trying to compile my program yes with FOTA, but if i use initial image, and i update the initial image with my program work! but if i use app+boot fota doesn't work

16 Nov 2015

Ok, I am glad that you were able to resolve the problem by combining them manually.

17 Feb 2016

I am having trouble with "app with bootloader" setting while using UART service. When I use "default" setting everything works correctly and I am able to connect and exchange data with Nordic apps using UART service. But when I use "App with Bootloader" things fall apart after trying to connect.

The nRF Master control app logs shows the following after trying to connect. gatt=device.connectGatt(autoConnect = false) [Callback] Connection state changed with status: 133 and new state: DISCONNECTED (0) Error 133 (0x85): GATT ERROR Disconnected gatt.close()

At this point advertising does not re begin and the board appears to be stopped and non responsive.

When I try a very simple application with just the basics I can get "App with Bootloader" to work correctly the problems seem to arise when a more complicated application is used.

17 Feb 2016

Hi Joel,

A couple of quick questions - which platform are you using?

Do you have a way of testing whether this same problem arises when you do the following

  • Use the 'App with Bootloader' option with a simple app
  • Build your UART app with the 'FOTA' option
  • use nRF Master Control Panel (or something else FOTAesque) to flash the new app over the old one

It seems people earlier in the thread had success like this, and if you can reproduce then we can look at fixing it properly :)

Jonny

17 Feb 2016

Jonathan Austin wrote:

A couple of quick questions - which platform are you using?

Do you have a way of testing whether this same problem arises when you do the following

  • Use the 'App with Bootloader' option with a simple app
  • Build your UART app with the 'FOTA' option

I am using up to date nRF51822, BLE and MBED libs.

I am using custom hardware that does have 32KHz xtal. I have tried all different platforms for compiling. I am able to use "App with Bootloader" for simple apps and android app to upload FOTA code. I am not able to use "App with Bootloader" for complex apps and android app to upload FOTA code. 'FOTA' platform does not help with complex app.

It looks like the problems may come from adding various tickers and timeouts. If I comment out my timeouts the "app with bootloader" works. The timeout and ticker IRQ functions just set flags and do not cause blocking.

14 Apr 2016

Quote:

Here's a temporary default-initial-app for FOTA to work with S130/S110 (sdk-v8): default_bootloader_app_s130_tmp.hex

Dear Rohit

I am using your way and I'm enable to upload new application with FOTA, but the new application I have uploaded to my nrf51-dk stop working when I trigger the DFU characteristic, I want to upload new application more than one time, but I fail. Please help.

Thank you.

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.

10 Feb 2017

Hi,

I am trying to update OTA DFU on nRF51 DK board. For that, i have added shadow FOTA platform into my mbed compiler.

I an using this platform with default version for generate application hex file. Also i burn softdevice and bootloader hex file from SDK 12.2.0 version using nRFgo studio.

Now, when i am trying to update the DFU using ny nRFconnect mobile app, the transfering process completed all time successsfully but my DFU is not updated.

Please suggest me.

28 Feb 2017

Hi, I have a OTA application built resulting an output binary file size of around 55K. The application was built with BLE_API revision 883, nrf51822 revision 464, and mbed revision 127. I can upload this app using DFU to my target HRM1017.

After I updated the libraries to the latest revision the same application grew to over 66K. I can no longer load this app to the target since DFU reports size exceeds limit. It appears that max binary app size is 65K (65536 bytes) for DFU even though the hardware has more space available. Is there a way to increase the size of the application that the bootloader accepts? Thanks Farshad

03 Mar 2017

I'm trying to program 500 raw (not populated on boards) Taiyo Yuden EYSGJNZWY modules, which uses the nRF51882 chipset.

Does anybody know where I can get a fixture to do this?

Regards,

Ed