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

Bootloader, iOS and secure connection

Hi All,

Does anybody has a working setup using SD 7.1.0 with SDK 7.2.0, iOS 8, DFU with a secure connection? When I use no encryption it works, but when I enable encryption Toolbox is complaining about wrong handles. I do call sd_ble_gatts_service_changed() returning NRF_SUCCES. Which apparently only works??? when I use and open connection. Somebody else seen this problem?

Regards, Marcel

  • I found a work-a-round for my problem. I made the handles equal by putting the dfu service first in the initialization of the services as it is in the bootloader. This is however not done in the examples. As it actually should be.
    But I am still curious if somebody else as a working setup with iOS 8, secure connection and DFU.

  • @Marcel: Have you make sure you set IS_SRVC_CHANGED_CHARACT_PRESENT = 1 in both the application code and the bootloader code ? The observation I had with iOS is that when you sent service changed indication and disconnect, the next time when connected, iOS device will do a service discovery and update the server attribute table.

  • Yes I have set gatts_enable_params.service_changed to 1 in both cases. So I send a sd_ble_gatts_service_changed when I change from application to bootloader and I send a sd_ble_gatts_service_changed from bootloader to application when an update is succeeded. I really do not understand why a unsecure connection works and a secure connection not. My guess is it is a iOS problem, but I am nt completely sure.

  • @Marcel: The main point is to have iOS to do a service discovery when we switch to bootloader. The reason why it worked when there is no bonding is that iOS will do service discovery everytime it connect to a unbonded device (if there is a service changed characteristic on it). I just tried here with SDK v8.0 DFU example and it worked pretty smooth on iOS. I modified so that the hrm dfu example require bonding. And I just have to click Upload on nRFToolbox to have the app write 0x01 to DFU control point, switch to DFU bootloader, send service changed indication, have iOS do service discovery, and then upload the new image, everything was done when the link was encrypted. I would suggest you to try with new SDK example and can record a sniffer trace and see what happens when switching to DFU when bonded.

Related