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

Need help to setup connection to a Raspberry pi with a beacon interval of 10 seconds

Hi,

i am using a nRF52840 with sdk v17.0.2  on soft device s112. using the ble beacon example. i can set up the connection from the raspberry pi with a 2 second beacon interval and a timeout of 12 seconds using peplin / pygatt. but when i use a 10 second beacon interval i can never connect even if i set a timeout of 60 seconds. Is it even possible to connect with a 10 second beacon interval? 

thank you 

Parents
  • hi Stian,

    "Have you tried anything between 2 seconds and 10 seconds? Is there a hard limit when it's not able to connect? Does it eventually connect, or never?"

    It is possible to connect with a limit of 4 seconds. everything after 4 seconds will never connect.

    "Have you tried waiting for longer than 60 seconds?"

    doesn't matter if the wait is longer than 60 seconds. it also looks like the connection is never made at the first advertising packet, but rather the second.   

    could it be a error on the raspberry pi side the way the connection is made?

Reply
  • hi Stian,

    "Have you tried anything between 2 seconds and 10 seconds? Is there a hard limit when it's not able to connect? Does it eventually connect, or never?"

    It is possible to connect with a limit of 4 seconds. everything after 4 seconds will never connect.

    "Have you tried waiting for longer than 60 seconds?"

    doesn't matter if the wait is longer than 60 seconds. it also looks like the connection is never made at the first advertising packet, but rather the second.   

    could it be a error on the raspberry pi side the way the connection is made?

Children
  • You are probably correct that it connects on the second. The first it uses to check the address of the device it wants to connect to, and then it connects on the second event. Unless you are specifically using the peripheral address when connecting. Can you check the scanning interval on the RPi side? If it's not overlapping two advertising interval it might take a while before it gets another chance to connect. But if it never connects I'm suspecting that there are some sort of timeout. Did you check that the nRF52 side does not have an advertising timeout? That is default in many of the examples.

Related