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

bluetooth disconnect callback is called only one.

Preferences: nRF52832 chip, s132_nrf52_4.0.2_softdevice

Two or more nRF52832 chip are connected to iOS and Android. And do bluetooth off in smart phone. this case, bluetooth disconnect callback function is called only one. but, if do that in TI chip, bluetooth callback function is called everything ble device.

do you solve this problem? please help me.

  • Hi y2doo,

    I have a little trouble understand your question. What do you mean by "disconnect callback function is called only one" it was the call back on the phone or on the nRF52 ? You meant that on the phone after you turn off Bluetooth, it still show some of the nRF52 devices are still connected ?

    Which app did you use ? Have you tried to use nRFConnect app ? Which phone did you to test ? Did you see the same behavior on both iOS and Android ?

  • Hello Hung Bui, i need called disconnect callback in iOS. The operation of the nRF device is normal. 5 nRF device and iOS are connected. when bluetooth turned off in iOS, iOS called disconnect callback only one or two. And actually all device is disconnected. why? please, help.

  • Hi y2doo,

    To verify it's not the app issue, could you try to use nRFConnect and nRFToolbox at the same time to connect to the devices in addition to your app ? Also please try to test with example in the SDK such as the ble_app_hrs (so that you can connect using nRFToolbox).

  • @y2doo. Are you saying the didDisconnectPeripheral method is not invoked for all the peripherals, but only for one or two?

    Could it be that Corebluetooth do not have enough time to do this before it is shut down? Maybe you can check the error message to see if you should go through all peripherals to check the state? Maybe just check the state of the CBcentral/peripheral manager?

  • Thanks. Maybe iOS disconnect callback function is closed when bluetooth turn off. So, Bluetooth disconnect callback function is called a little and that closed. When bluetooth turn off in iOS, all nRF device state are disconnected in another function. I tried change connection time, interval and etc. but this problem keep in iOS. I don't know why TI chip is normal. but, i guess that disconnect callback closed.

Related