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.

  • @ Hung: how does nRFToolbox on iOS make the device switch to boot loader? Is there a separate button for that? When I do select device, I see the device connecting, but it stays in its normal operation mode, and the 'upload' button does not become active. If I do it with LightBlue, I do see that boot loader is activated and the Upload button does become active.

Reply
  • @ Hung: how does nRFToolbox on iOS make the device switch to boot loader? Is there a separate button for that? When I do select device, I see the device connecting, but it stays in its normal operation mode, and the 'upload' button does not become active. If I do it with LightBlue, I do see that boot loader is activated and the Upload button does become active.

Children
No Data
Related