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

can ble device auto-connect to the phone after make manually disconnection

hello nordic!

i had successfully realize the first scenario:using one andriod phone in the Setting(native connect ,not third-party app) to connect to the ble device(nrf52832 chip with HID profile),it can auto-reconnect the ble device when re-in the range.

but the second  scenario: i  manually  make the disconnetion (not the forget),the ble device cant reconnect to the phone,i also have test this in classic bt, it works, so my question  is:can ble device auto-connect to the phone  after make manually  disconnection?

my english is poor ,sorry~ 

I hope to get the answer, thank you!

Parents
  • Hello,

    i had successfully realize the first scenario:using one andriod phone in the Setting(native connect ,not third-party app) to connect to the ble device(nrf52832 chip with HID profile),it can auto-reconnect the ble device when re-in the range.

    I am glad to hear that you were able to implement the scenario from your other ticket! :) 

    but the second  scenario: i  manually  make the disconnetion (not the forget),the ble device cant reconnect to the phone,i also have test this in classic bt, it works, so my question  is:can ble device auto-connect to the phone  after make manually  disconnection?

    This also depends on the central device.
    As long as the peripheral device starts advertising again if its link is terminated, then it is up to the central to determine if it would like to reconnect.
    Normally, a central device will not reconnect immediately to a peripheral that it just disconnected manually from - you can check this with your phone or computer - because it was just told to disconnect from the peripheral.
    However, after a certain amount of time has passed, or the disconnection was due to a timeout, then central's usually are programmed to reconnect to the last device they were connected to, if available.

    i  manually  make the disconnetion (not the forget),the ble device cant reconnect to the phone

    The crucial part here is that if your central does not initiate the reconnection ( right after you have asked it to disconnect ), then the reconnection will not happen. It does not matter what the peripheral BLE device would like, it is the central that decides.

    can ble device auto-connect to the phone  after make manually  disconnection?

    The answer to this is: yes, they can - if the central is programmed to immediately reconnect after being told to manually disconnect. However, this is not a very common use-case, because a manual disconnect usually means that the connection should stay terminated.

    I hope to get the answer, thank you!

    It is no problem at all, I am happy to help!
    Please do not hesitate to ask if any part of my answer is unclear, or if I have misunderstood any part of your question.

    Best regards,
    Karl

  • hello xiaoliuya i got same problem,but i find that i have a bar code scanner ,it can reconnect successfully when you make manually disconnection,so may i ask you how to reslove this problem?

       thanks for your answer~

Reply Children
Related