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.

Issue Sending Multiple Data Packets in a Single Connection Event

Other Parts Discussed in Thread: CC2540

Hello,


I am sending multiple data packets in a single connection event to an iOS device from a CC2540 using the following procedure. I am using the 1.4 stack.

1. subscribe to connection events using HCI_EXT_ConnEventNoticeCmd

2. On connection callback, queue as much data as possible using:
    while(Fauxpal_MeasuNotify(gapConnHandle,, &sensorMeasurement == SUCCESS)

The main issue is that it does not reliably happen each time the devices are paired. The issue seems to happen when many devices are connected to the iOS device (5 or 6). When the issue happens, one or two of the connected peripherals exhibits the issue while the other peripherals operate correctly. When observing the packets on the iOS side it seems that the dysfunctional peripherals are sending 2 packets but the iOS device is only receiving 1.

The indication I have that this is an CC2540 issue and not iOS is that hard reseting the peripherals makes the issue go away. Soft resets do not make the issue go away. I am at quite a loss on how to solve this issue and can offer no exact question. Any help is greatly appreciated.

Thanks,

Marko

  • Hi,

    CC2540 can handle 4 packets per connection event when connected as a peripheral device. Normally iOS devices allow 4-6 packets per connection event for a single connection. Also the minimum connection interval allowed by iOS is around 30ms as we ave seen. Since you are connection 5-6 peripheral CC2540 devices to one iOS device, iOS device mayy not be able to handle the connection events if the connection intervals are small. 

    What is your current connection interval? Can you increases it and check?

    Regards,

    Arun

  • Hi Arun,


    It is set to 20-30 mS. I have had more success with a smaller connection interval and sending only one packet per connection event. I have seen that iOS devices can support an 18.5 mS connection time.

    I will try a larger connection interval to test if the problem still occurs. Thanks for your suggestion.

    Mark

  • Hi,

    A smaller connection interval of 18.5msec might work if iOS device is connected to 1 or 2 peripheral devices. With more connections , you may need to increase the connection interval for stable connection. 

    Regards,

    Arun

  • Hi Arun,

    I have tried a connection interval as high as 50 mS without success. I can only assume now there is some issue with CoreBluetooth's ability to keep up with the data.

    Best,
    Mark