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.

Min Connection Interval Always set to 100ms

Other Parts Discussed in Thread: CC2540

Hi There,

I have been developing a BLE application with CC2540 and Nexus 5 with Android 4.4.2. Currently, I have an issue with min and max connection interval values. I am using SimpleGATTProfile and SimpleBLEPeripheral examples.

I am setting following variables on simpleBLEPeripheral.c

#define DEFAULT_ENABLE_UPDATE_REQUEST         TRUE

#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 6

#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 12

I can read/write and send notification between the hardware device and Nexus 5 phone. However, when I try to write information to keyfob from Nexus phone in 19 byte chunks, I can write data every 100 ms instead of 7.5 ms. I debug my code on keyfob and saw that I am setting min conn interval to 6 which is 7.5 ms. However, on physical channel it is still 100 ms which is not expected. When I check the BLE channel by using USB 2540 and TI Packet Sniffer, I can NOT see any information about DEFAULT_ENABLE_UPDATE_REQUEST and setting channel min conn interval to 7.5 ms. Instead of that I am seeing a packet as in the image:

  

With a little bit search on the Internet, Android OS should take care of setting connection interval for the channel. I would extremely happy if you can give a hand for this issue.

Thank you so much

  • Hi DNZ,

    It should work but please note that Nexus may have it's limiting factors. Example, if you have Bluetooth classic enabled, or WiFi, maybe the interval of 7.5ms is to short to be able to time multiplex the other wireless protocols and therefore it disallows it. I suggest you test a bit higher intervals first.

    Now that was assuming that the BLE application on the CC2540 really did send the Connection Parameter Update Request to begin with. It should be visible in the packet sniffer log. if not, the problem would be in the simpleBLEperiperal.c. Debug and make sure that the  GAPRole_SetParameter( GAPROLE_PARAM_UPDATE_ENABLE, sizeof( uint8 ), &enable_update_request ); is truly setting the parameter to TRUE.

    Best Regards

    Joakim

  • Hi Joakim,

    Really thank you for your feedback. I am sure that GAPRole_SetParameter( GAPROLE_PARAM_UPDATE_ENABLE, sizeof( uint8 ), &enable_update_request ) is set to true. Still can not see anything on BLE Channel by packet sniffer.

    Do I have to call following function  for update request?

    GAPRole_SendUpdateParam( DEFAULT_DESIRED_MIN_CONN_INTERVAL, DEFAULT_DESIRED_MAX_CONN_INTERVAL,
    DEFAULT_DESIRED_SLAVE_LATENCY, DEFAULT_DESIRED_CONN_TIMEOUT,
    GAPROLE_RESEND_PARAM_UPDATE );