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

Difficulty with switch to (buttonless) DFU in iOS

Hi

I managed to integrate the buttonless DFU example, but while testing it, I have a few difficulties.

I use Lightblue to access my services and enable notifications and write 0x0104 to the DFU control point, and then switch over to nRF toolbox to do the actual DFU.

The only way I get it properly working is by using this procedure:

  • start with both apps (lightBlue and nRF Toolbox) shut down and bluetooth off
  • switch on bluetooth
  • go to light blue and do the enable notifications and write 0x0104 to the DFU control point
  • turn off light blue and disable bluetooth
  • enable bluetooth and go to nRF Toolbox and do the DFU

So I really need to turn on and off bluetooth. I read that I have to turn on IS_SRVC_CHANGED_CHARACT_PRESENT, which I obviously did. It changes the behavior a little bit, but it is still necessary to switch off and on bluetooth to get it 100% working all the time. Any suggestions how to avoid this? Or is it just a patch which I need and need to find some way for my own iOS app to mimic this procedure ? (not sure if bluetooth can be turned on and off in iOS by an app without user intervention)

Parents
  • @Wim: You can simply use nRFToolbox. It will do all the task, to switch from application to bootloader and then upload the image.

    Lightblue is a little cumbersome, sometimes causing issue.

    Make sure you have enable IS_SRVC_CHANGED_CHARACT_PRESENT on both the application and the bootloader.

    Erase bond, turn off and turn on bluetooth to make sure the old attribute table (where IS_SRVC_CHANGED_CHARACT_PRESENT still = 0) is cleaned.

Reply
  • @Wim: You can simply use nRFToolbox. It will do all the task, to switch from application to bootloader and then upload the image.

    Lightblue is a little cumbersome, sometimes causing issue.

    Make sure you have enable IS_SRVC_CHANGED_CHARACT_PRESENT on both the application and the bootloader.

    Erase bond, turn off and turn on bluetooth to make sure the old attribute table (where IS_SRVC_CHANGED_CHARACT_PRESENT still = 0) is cleaned.

Children
Related