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

Negociate new "connection parameters" from low to high speed

Dear Nordic Developer Zone,

I have modified the ble_conn_params.c file in order to be able to negotiate new connections speeds between IOS app and Nordic nRF51822 chip on demand. It is working well, but only from high to low communication speed between devices.

The target is to have the lowest current consumption possible with a low communication speed during standard processes (95% of the usage), and switch to a high communication speed during configuration and update processes, then switch back to the low communication speed.

The default connection params working with the chip are:

//Default IOS params
#define MIN_CONN_INTERVAL 24  //(1.25ms) = 30  ms
#define MAX_CONN_INTERVAL 24  //(1.25ms) = 30  ms
#define SLAVE_LATENCY 0   //(1.25ms) = 0   ms 
#define CONN_SUP_TIMEOUT 72  //(10ms)   = 720 ms

I am able to negociate a lower speed communication with these params

//Low speed comm
#define MIN_CONN_INTERVAL 24  //(1.25ms) = 30  ms
#define MAX_CONN_INTERVAL 50  //(1.25ms) = 62.5  ms
#define SLAVE_LATENCY 4   //(1.25ms) = 5   ms 
#define CONN_SUP_TIMEOUT 550  //(10ms)   = 5.5 s

But, when IOS and Nordic chip are using these params, I can't set the default params anymore. The negotiation failed.

Is there any limitation to switch from low speed conn params to high speed conn params?

I am using nRF51822 with Softdevice.

Best regards

  • Hi Sébastien

    if you have a look at the developer.apple.com/.../BluetoothDesignGuidelines.pdf and read the section about Connection Parameters.

    Connection Parameters The Bluetooth accessory is responsible for the connection parameters used for the LE connection. The accessory should request connection parameters appropriate for its use case by sending an L2CAP Connection Parameter Update Request at the appropriate time. See the Bluetooth 4.0 specification, Volume 3, Part A, Section 4.20 for details.

    The connection parameter request may be rejected if it does not comply with all of these rules: Interval Max * (Slave Latency + 1) ≤ 2 seconds Interval Min ≥ 20 ms Interval Min + 20 ms ≤ Interval Max Slave Latency ≤ 4 connSupervisionTimeout ≤ 6 seconds Interval Max * (Slave Latency + 1) * 3 < connSupervisionTimeout

    The Apple product will not read or use the parameters in the Peripheral Preferred Connection Parameters characteristic. See the Bluetooth 4.0 specification, Volume 3, Part C, Section 12.5.

    The default ones will be rejected because MIN_CONN_INTERVAL == MAX_CONN_INTERVAL

  • Thank you for your answer.

    Now I am able to change the comm speed both way, but only 3 times.

    High speed --> Low speed
    10 seconds later
    Low speed --> High speed
    10 seconds later
    High speed --> Low speed
    10 seconds later
    Low speed --> High speed : negociation failed
    

    I have read the Bluetooth and Apple documentation, but I have not seen any limitation about the number of comm negociation.

    Do you know if this kind of limitation exists?

    Best regards

  • I don't know about any such limitation (of how often you can do it) What you could check is if you receive a BLE_GAP_EVT_CONN_PARAM_UPDATE or if the call to sd_ble_gap_conn_param_update fails. If it fails, then it could be that the phone have not updated the connection parameters after 10 seconds, and the peripheral is still waiting for the change to happen. During this time it is not allowed to send a new Connection Parameter Update request for another 30 seconds (after getting response to the first one)

  • There is also a recommendation in the Core Specification saying that the time between parameter updates should be at least 30 s, so it could be that the iOS device is enforcing this.

  • Pål Håland, Ole Morten, thanks for your comments.

    I know that the new communication speed is well applied because I have implemented the radio notification interrupt and toggle a led before and after radio communication. Therefore, I can see le led toggling with different speeds. I didn't know about the 30 seconds recommendation. But, after some tests, it didn't change the fact that the 4 (and next tries) try failed.

Related