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

keeping connection alive for long times

Hello,

I am using the nRf8001 and successfully connecting to an android device, but I still have some doubts related to the BLE protocol itself, specifically to the connection interval.

Suppose I want to send some data to the central device once per minute. According to what I understood, if I spend more time than what is in "Connection supervision timeout" field the connection will be dropped. So I should constantly reconnect to the device from the app side, is that correct? Is there any more elegant way to keep the connection alive without sending data at smaller intervals from the peripheral? (my application has tight power requirements).

That said, I've noted that even with "Connection supervision timeout"=100ms the device keep connected for 7~8 min before the connection is dropped, even without sending any data (Does the BLE have any link-layer keepalive mechanism?). But sometimes it disconnected after only a few seconds. And in another android device it always disconnect after a few seconds.

I've also noted that when the device goes out of range, the disconnection error code is 0x08 (timeout). So, when the device disconnects after a few seconds, I can´t be sure if I have a hardware problem in my RF circuit or a software problem. Is there some flag to indicate my disconnection was caused by a signal loss?

In summary, whats the best way to keep the connection alive and what is the expected behavior so I can I find out if I am having a hardware or a software problem?

Thanks in advance,

Parents
  • Thanks for the explanation, things are clearer to me now. I tweaked with these settings and were able to improve the connection time to a few hours. But I am suspecting there is something wrong with the board layout that is causing the packet loss. For instance, the maximum RSSI level I´m getting is -45 dbm, when it is supposed to be 0 dbm. Can I send the PCB layout to Nordic analyse if there is any error?

Reply
  • Thanks for the explanation, things are clearer to me now. I tweaked with these settings and were able to improve the connection time to a few hours. But I am suspecting there is something wrong with the board layout that is causing the packet loss. For instance, the maximum RSSI level I´m getting is -45 dbm, when it is supposed to be 0 dbm. Can I send the PCB layout to Nordic analyse if there is any error?

Children
No Data
Related