This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK13.1 buttonless_DFU

Hello all,

I've ported the buttonless DFU example to my project without the buttons or the LEDs, but I only tested the bootloader and not the uploading capabilities with the DFU example application. Now I'm stuck with the following problem: The application starts advertising, but when I use the nRF toolbox, the application debug uart shows the following line when the DFU starts:

INFO:Received indication state 1, notification state 0

Then my application stops and does not go to the bootloader nor does the application restart and the DFU times out.

I then re-read the example documentation link text and tried enabling DFU by hand by writing 0x0100 to the Client Chacteristic Configuration (0x2902). To do so, I pressed the arrow up under the Generic Attribute near the descripters header and send two bytes 0x01 and 0x00 to enable the service. The last byte to activate DFU should be send too the control point, but I can't find that service in the nRF Connect app. So clearly I'm doing something wrong, but I can't figure it out just yet.

So that leaves me with the following questions:

  • Does the nRFtoolbox DFU ability work with the DFU example? I've seen quite some question on the forum regarding sdk13 and the DFU example, would it be better to migrate to SDK14 hoping for the example to work or does it not work the way I expect it to?
  • Is my understanding of how and what the example should do correct: Connect with either the nRF connect or nRF toolbox App and upload a new zip file directly or do I need to activate the bootloader first as described in the Example description as it seems quite different from what's described in this tutorial link text?
  • Hi,

    It's not clear in your description which application firmware you used for testing. Please clarify:

    • If you simply test the bootloader should you be able to update the application firmware ? (no buttonless)

    • Have you tried to test with the default buttonless example in the SDK ?

    • You may want to follow my guide here and let me know at which step you couldn't continue

    • The nRFToolbox should be able to do DFU and work with DFU example.

    • No you don't need to activate bootloader first, as long as you have implemented DFU buttonless service properly. The switching is transparent to end user. You can start testing with the buttonless example in the SDK (also covered in the Appendix A in the blog)

  • Hello,

    I've found the issue, there was a function from the beacon example which I called instead of the proper function to initialisation the DFU. Both the Beacon and buttonless example have some functions with identical function names, so I had changed the prototype names for the DFU example, but forgot to call the correct one. After I removed the beacon example code from my application and reverted the renamed functions, the code worked as the buttonless DFU example does.

    I do however have the issue that when I connect with my application or the DFU example and start DFU, the bootloader connects, but then never starts the DFU. After the bootloader connects, I need to shutdown the nRFconnect App on my phone, restart the App, connect to the bootloader and then it will start a DFU transfer. Is this normal operation of the App?

  • No, it's not normal. Could you tell what is the "the DFU example" was that the buttonless examle ? When you say start DFU did you connect first ? Please state what you do for testing in step by step. Please try testing just the DFU bootlaoder before you test the buttonless.

Related