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

Parents
  • 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)

Reply
  • 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)

Children
No Data
Related