This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Changing Central Role Connection Interval

I have both a central and peripheral device using the C2540. I am trying to improve the data throughput for GATT_WriteCharValue for sending data to the peripheral.

I have not been able to work out how to change the connect interval and it is at the 100ms default - as such I am only getting 90B/s

As far as I can see the peripheral advertises its max and min connection interval in the Scan Response and the Central device picks a suitable connection interval based on this.

How can I set the lowest possible connection interval?

  • Hello,

    Look at simpleBlePeripheral example. and set the automatic update negotiation.

    // Whether to enable automatic parameter update request when a connection is formed
    #define DEFAULT_ENABLE_UPDATE_REQUEST FALSE
    
    

    GAPRole_SetParameter( GAPROLE_PARAM_UPDATE_ENABLE, sizeof( uint8 ), &enable_update_request );
    
    
    Note - that either side should have a range of these values, and the negotiation should find a value both side agree on. 
    Set the peripheral range min & max  to your desired interval, and set the central to cover this range.
      #define DEFAULT_DESIRED_MAX_CONN_INTERVAL     80
     uint16 desired_max_interval = DEFAULT_DESIRED_MAX_CONN_INTERVAL;
     GAPRole_SetParameter( GAPROLE_MAX_CONN_INTERVAL, sizeof( uint16 ), &desired_max_interval );
    BR,
    -Greg
  • Thanks Greg,

    Ill try that. I managed to get the required result using GAPCentralRole_UpdateLink() as well.