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

iOS APP, FAILD TO SWITCH TO DFU MODE

Hello! Sorry for a new guy's description. We had a device running in normal firmware application mode, and the Bootloader was programed. It's our goal to accomplish DFU but first we have to switch to DFU mode from normal.
For iOS APP, when interacting with normal firmware it could write a command into a special characteristic and then disconnect BLE to cause the device to return the DFU mode. But in our test, we failed even though this way is successful for Android APP. And we found that even we disconnected in APP, the status of device in SETTINGS->BLUETOOTH is still connected, we would be very appreciative if you have some ideas about the possible causes.

Thanks & Best Regards! Vincent

Parents
  • iOS won't necessarily disconnect the link immediately even if you do a disconnect through the Core Bluetooth framework API, and this is apparently by design from Apple's side. As far as I've seen, iOS 7 disconnects within a couple of seconds, but with iOS 6, you may see delays of up to perhaps 60 seconds from the disconnect call to the actual disconnection.

    However, a workaround for this is to do the disconnect from the Peripheral side instead. If you wait for a specific command, you could for instance choose to set the needed flag and then call sd_ble_gap_disconnect() to disconnect the link from the Peripheral side when receiving this command, instead of waiting for the iOS side to do the disconnection.

Reply
  • iOS won't necessarily disconnect the link immediately even if you do a disconnect through the Core Bluetooth framework API, and this is apparently by design from Apple's side. As far as I've seen, iOS 7 disconnects within a couple of seconds, but with iOS 6, you may see delays of up to perhaps 60 seconds from the disconnect call to the actual disconnection.

    However, a workaround for this is to do the disconnect from the Peripheral side instead. If you wait for a specific command, you could for instance choose to set the needed flag and then call sd_ble_gap_disconnect() to disconnect the link from the Peripheral side when receiving this command, instead of waiting for the iOS side to do the disconnection.

Children
No Data
Related