Connection interval and range

Hi,

I have a system where I have set the lowest connection interval possible (4 seconds)

I use the reported RSSI from the chip for the link. When I get to around -80dB, the connection gets unstable. I think maybe it should have a better performance, maybe to -95dB ?

Will the long connection interval decrease the maximum range?

I have set the minimum connection interval to:

#define MIN_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS) 
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(4000, UNIT_1_25_MS) 

And on the other device: 

#define MIN_CONN_INTERVAL MSEC_TO_UNITS(1000, UNIT_1_25_MS) 
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(2000, UNIT_1_25_MS)

Is it a problem that the parameters are different on the two devices?

I found this similar question unanswered:   Hello all, my question is related to connection interval and to transmission distance.  

I can also see that some of the packets are easily dropped when signal level hits -80dB. (#define MAX_CONN_PARAMS_UPDATE_COUNT    3 )

I know that BLE will jump in frequency if there are problems especially in an indoor multi-path envirmonment with no direct line of sigt.

Is there any setup parameter that I should be aware of when trying to get the best range possible?

best regards,

Atle

  • Hello Atle,

    I have a system where I have set the lowest connection interval possible (4 seconds)

    I have set the minimum connection interval to:

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS) 
    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(4000, UNIT_1_25_MS) 

    And on the other device: 

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(1000, UNIT_1_25_MS) 
    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(2000, UNIT_1_25_MS)

    The connection interval used by the devices is actually determined entirely by the Central device. The peripheral device can have a preference that it can ask the central to use parameters within, but ultimately it is the central device that actually decides which connection parameters that are used.
    If you would like you could determine the connection interval used by setting the MIN and MAX equal to each other on the central side - but then you will have to be mindful of potential scheduling troubles if you intend to have multiple concurrent connections.

    Will the long connection interval decrease the maximum range?

    The connection interval itself is not the connection parameter that has the largest impact on range, however if you instead combine a short connection interval (more frequent packets) with a longer Connection Supervision Timeout, you will have move chances to get a packet across to the peer before the link is broken.
    How large is your current connection supervision timeout?

    To increase range you could also consider using a different PHY, such as Coded PHY for long range, or to increase the radio transmission power.
    Have you looked into either of these options before?

    Best regards,
    Karl

  • Hi Karl,

    Thank you for the quick reply!

    CONN_SUP_TIMEOUT = 30 seconds.

    Will the processor use max_conn_interval when signal is ok, and min_conn_interval when there is trouble and no reply?

    => To increase range you could also consider using a different PHY, such as Coded PHY for long range, or to increase the radio transmission power.

    I have set the highest possible power. The system consist of one nRF52832 and one nRF52840. I know I can use 125kbps on the 52840, but I dont think I can use another PHY on the nRF52832 ? Am I right?

    best regards,

    Atle

  • Another addition to my question. I mentioned the frequency hopping ability that BLE has when the frequency is blocked or there is a zero in the standing wave pattern in the room and the reflections. 

    MAX_CONN_PARAMS_UPDATE_COUNT    3

    This means that it should try 3 times before giving up the message. From what I understand, BLE uses a frequency hopping table, that means that the two devices will follow the same scheme and both hop synchronous. If there is only 3 tries, does this mean that they did not hop through the whole table? So maybe the tries should be more than 3 in order to test communication at all frequencies... As my application has trouble when there is no line of sight, it might be good to test all frequencies becuase the result in the receiver will be a multipath sum.

    I may understand it wrong, maybe there is 3 tries, then it gives up the message and change frequency ? But in that case how to keep it synchronized with the other device? I suspect the only safe way to do the frequency hopping in sync, is to time it with the CONN_INTERVAL. That tells me that this parameter is very important in order to get communication at a long range..

    best regards,

    Atle

  • Hello again, Atle

    atlesilgjerd said:
    Thank you for the quick reply!

    No problem at all, I am happy to help! :) 

    atlesilgjerd said:
    CONN_SUP_TIMEOUT = 30 seconds.

    Thank you for clarifying - 30 seconds connection supervision timeout is ample. For good measure, could you share the exact configuration that you have set here?

    atlesilgjerd said:
    Will the processor use max_conn_interval when signal is ok, and min_conn_interval when there is trouble and no reply?

    No, the central will schedule the connection within the permitted MIN and MAX, but it will not dynamically update this based on RF performance. The primary reason for changing the connection parameters during a connection is either because it is triggered manually by the application, or that the scheduler sees that it needs to move/free up room for additional connections by moving the existing connections or connection intervals.

    atlesilgjerd said:
    Another addition to my question. I mentioned the frequency hopping ability that BLE has when the frequency is blocked or there is a zero in the standing wave pattern in the room and the reflections. 

    I am not quite sure that I understand what you are asking about here - are you asking whether or not the BLE controller will adapt to RF channels with much noise or poor RF performance?

    atlesilgjerd said:

    MAX_CONN_PARAMS_UPDATE_COUNT    3

    This means that it should try 3 times before giving up the message.

    No, this means that the connection parameter update request will be sent a total of 3 times from the peripheral. This is the peripheral's request to have the central update the connection parameters - it does not determine the amount of times that retransmissions will occur in your connection.
    BLE is a lossless protocol, which essentially mean that no data will ever be lost in the link. A packet will be retried until it is acknowledged by the peer or the connection will be terminated once the connection supervision timeout occurs - there is no way for a packet to be 'dropped' once it has been queued for sending, save that the connection is terminated.
    Therefore, if you have a lower connection interval the packet will be retried more times before the connection times out due to the connection supervision timeout.

    Best regards,
    Karl

  • Hi,

    Thank you for the answers.

    From what I understand, the MIN or MAX connection interval is crucial to get a stable communication at a long distance. But I do not know if the min or max is used. I think that the max is the parameter that is being used if I remember correctly. That also seems to match my experience when testing.

    Not sure what configuration you asked for, here are the definitions used:

    #define APP_ADV_INTERVAL MSEC_TO_UNITS(100, UNIT_0_625_MS) // The advertising interval (in units of 0.625 ms).
    #define APP_ADV_DURATION MSEC_TO_UNITS(0, UNIT_10_MS) // The advertising time-out (in units of 10ms). When set to 0, we will never time out.

    #define APP_BLE_OBSERVER_PRIO 3 // Application's BLE observer priority. You shouldn't need to modify this value.
    #define APP_BLE_CONN_CFG_TAG 1 // A tag identifying the SoftDevice BLE configuration.

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS) // Minimum acceptable connection interval (100 miliseconds).
    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(4000, UNIT_1_25_MS) // Maximum acceptable connection interval (4 seconds).
    #define SLAVE_LATENCY 0 // Slave latency.
    #define CONN_SUP_TIMEOUT MSEC_TO_UNITS(30000, UNIT_10_MS) // Connection supervisory timeout (10 seconds).

    #define FIRST_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(5000) // Time from initiating event (connect or start of notification) to first time sd_ble_gap_conn_param_update is called (5 seconds).
    #define NEXT_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(30000) // Time between each call to sd_ble_gap_conn_param_update after the first call (30 seconds).
    #define MAX_CONN_PARAMS_UPDATE_COUNT 3

    Regarding frequency hopping, is it possible that the two devices will hop in frequency after connection, or will they stay in the same band until next reset ? Please clarify if there is anything that can be done to adjust this, can they hop in frequency when there is trouble with the range and signal strength?

    Also you say it is lossless. This may mean that if the connection is bad, more and more messages are queued and eventually the queue is full, resulting in a crash in the processor. Actually the processor crash from time to time when the signal is poor. Is this a know issue with the BLE stack and what can be done to avoid it?

    best regards,
    Atle

Related