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

nrf52dk and nrf connect, Autoconnect after bluetooth adapter turned off and on

Hi,

I tried nrf connect and nrf hrs example. I used nrf52DK.
I bonded the device, and connected with autoconnect.
I turned off the nrf 52 DK, and turn on. The nrf connect app on the phone can saw the state when disconnect, and can reconnected after some seconds, so the autoconnect feature worked.
But the autoconnect feature not worked in this scenario:
If when connected together, (phone writes: connected) i turned off the bluetooth adapter (the app wrote bluetooth adapter not turned on, and device state is changed to disconnected), and turned on the bluetooth adapter on my phone (the program not wrote the bluetooth adapter off error), and wait, but the phone not connect automaticaly to nrf 52 DK. If i push the connect button, its working.
So auto connect feature not work properly. If i turn off and on the dev kit, autoconnect works, but if i turn off and on the phones bluetooth adapter, nrf connect not connect automaticaly.
Its an error? Why not work? What can i do to connect automaticaly, after the bluetooth adapter turned off and on?
I want to make an app, which task is reconnect, every scenario, and want to use the autoconnect feature, but its not working as expected.
Can you help?

Thanks,
Janos

Parents
  • Hi Einar,

    I testing with android phones (Xiaomi Mi A1, and Google Pixel 2), and not works both.
    The Nordic android ble lib has feature autoconnect=true. In the lib code, i see, the device can autoconnect in the background, when i use autoconnect=true when i call connect(). It has a broadcastReceiver, which listen to bluetooth state, and manage it, so i think it can reconnect automaticaly, when i turned off bluetooth, and turned on again. The autoconnect works, when device out of range, but if modify the bluetooth state, the autoconnect not work. So i think the lib has a bug, or the lib has not contains this feature? I need to reconnect manualy in the background if the bluetooth adapter turning off and on? If its true, the autoconnect=true whats doing generaly? If i bond the phone with the device, the autoconnection feature works better, or not? The autoconnection depends bonding, or not?
    How can i get more information about my phones connection handling mechanics?
    Can you give me more information about autoconnection, and the nordic lib autoconnection feature?

    Thanks,
    Janos

Reply
  • Hi Einar,

    I testing with android phones (Xiaomi Mi A1, and Google Pixel 2), and not works both.
    The Nordic android ble lib has feature autoconnect=true. In the lib code, i see, the device can autoconnect in the background, when i use autoconnect=true when i call connect(). It has a broadcastReceiver, which listen to bluetooth state, and manage it, so i think it can reconnect automaticaly, when i turned off bluetooth, and turned on again. The autoconnect works, when device out of range, but if modify the bluetooth state, the autoconnect not work. So i think the lib has a bug, or the lib has not contains this feature? I need to reconnect manualy in the background if the bluetooth adapter turning off and on? If its true, the autoconnect=true whats doing generaly? If i bond the phone with the device, the autoconnection feature works better, or not? The autoconnection depends bonding, or not?
    How can i get more information about my phones connection handling mechanics?
    Can you give me more information about autoconnection, and the nordic lib autoconnection feature?

    Thanks,
    Janos

Children
No Data
Related