1

I have created an iOS app that interacts with a bootloader on some custom hardware/firmware to update the application on the hardware. In order to accomplish this, the hardware/firmware has a bootloader application and a regular application. First, I connect my iOS app to the bootloader application and update the regular application. At which point the regular application starts to run and I would like to connect to it with my iOS app.

If I search for peripherals with an Android application it correctly sees my hardware broadcasting as the bootloader application and then switch to broadcasting as the regular application after the update has been completed. However, for some reason, the equivalent iOS app only sees it being broadcast as the bootloader application. I have found that if I restart the iOS device or if I turn the iOS device's bluetooth off and back on after a few seconds it will finally recognize that the regular application is broadcasting.

It seems as though the iOS device is caching the peripheral information. Does anyone know if there is a way to clear the cache or refresh to get the current/valid status of the device?

Ryan Tensmeyer
  • 865
  • 10
  • 26

1 Answers1

5

I have exactly the same issue here, unfortunately this is indeed due to iOS. There are a lot of other threads about this topic but after looking for a while I would recommend this answer : https://stackoverflow.com/a/25930825

Best of luck, I haven't finished yet and this won't be easy...

Community
  • 1
  • 1
Joky
  • 66
  • 2
  • I sent a ticket to Apple the other day and they gave me the same references as the answer you linked me to. Unfortunately, if I understand it correctly, it looks like it's going to require a change in the firmware on device. – Ryan Tensmeyer Mar 26 '15 at 17:57
  • 1
    The correct thing is indeed to implement the "Service Changed" characteristic. As per the BT 4.0 spec: "If the list of GATT based services and the service definitions cannot change for the lifetime of the device then this characteristic shall not exist, otherwise this characteristic shall exist." iOS automatically caches the attributes table for paired devices. – Martijn Thé Mar 30 '15 at 03:44