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

Proxy connexion time

Hi everyone,

I use the nrf5_SDK_for_Mesh_v4.1.0_src, I would like to reduce the time it takes for a device to connect to a bluetooth module as a proxy. For the moment this delay is minimum 5 seconds and sometimes the connection is so slow that it takes more than 20 seconds for me to connect.

I tried to modify the MIN_CONN_INTERVAL parameters.
and MAX_CONN_INTERVAL but it doesn't change much.
My goal would be to be able to connect to a proxy service in maximum 2 seconds! Is it possible?
What do I have to change in the code to do so?

Could someone please help me on this?

  • Ryjan said:
    I have the same issue and since this did not have a posted solution I figured that i would jump in.

     We can give it a go, but please create a new ticket if this answer doesn't solve it for you, as it is probably not the same problem as the original post.

    What is your central? What is the central scan window and scan interval? And what channels is it scanning on? (did you change anything regarding scan channels)?

    Is df:a8:66:b5:51:c9 the device you are connecting to? (I can't tell from the sniffer trace snippet). Have you modified it's advertisement channels?

    I suspect that you are using a long scan interval and/or too short scan window. As far as I can see, df:a8:66:b5:51:c9 sends three advertisements every ~2 seconds, so a central would have the possibility to connect every 2 seconds. Why it doesn't do that, I can't say from the sniffer trace. I think this requires more information about the central/scanner/master.

  • Ok, now that it's been tested I figured that I would follow up on what I've done.

    I was able to significantly improve the connecting speed to a proxy by changing the value defined as MESH_GATT_PROXY_NETWORK_ID_ADV_INT_MS. For some reason I could not find any references to this definition in my searches here in the Dev Zone. After Edvin mentioned that the advertisements are at about 2 second intervals that helped to home in on this definition since it was sett a 2000ms. Still with an advertisement at every 2 seconds, sometimes it could take 30 seconds to connect. My guess it that the 2 second interval is too similar to the scanning interval of the phone that is looking for a proxy to connect to. I picked one of Apple's recommended intervals (760ms in this case) and the connecting time improved to about 8 seconds or less. And most of the time less than 5 seconds. That's much more acceptable. The default values for MESH_GATT_PROXY_NETWORK_ID_ADV_INT_MS are in nrf_mesh_config_core.h.

    It appears to be a scanning interval alignment issue.

Related