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.

BLE Notification Order

Other Parts Discussed in Thread: CC2540

Hi all,

I have a question regarding to BLE Notifications. In my design, there is one master mobile device (iOS or Android device) and one slave CC2540 chip. My connection interval is 20 ms between two devices. Once I establish the connection, I send notifications from CC2540 to mobile device every 20 ms. I have a byte stream that I would like to send from slave to master.  I send 40 packets of notification toe-to-toe. Each packet contains 20 bytes of information and there is not any packet number identifier field in 20 byte payload of the packets.

When I send notifications back to back, will master receive all the packets in the same order I send from the slave, or the order of the packets may mixed?

I would be happy if you can help me with this question,

Thank you, and have a great day!

  • Hello.  Yes, all of the packets will be delivered in order.

    Note that you need to pay attention to the flow control: if you are sending packets fast enough, it is possible that the controller's tx data buffers will fill up.  In this case, you will need to back off and call the notification command again.

    You can ensure this by checking the return value of the GATT_Notification() command for MSG_BUFFER_NOT_AVAIL (0x04).

    If you are running into this, check out the overlapped processing wiki page which should allow more throughput:

    http://processors.wiki.ti.com/index.php/OverlappedProcessing

  • Hi Tim C,

    I have the same question about the BLE Notification Order. And I have looked up for many posts, I found in another post, another TI employee says the order cannot be guaranteed:
    e2e.ti.com/.../674531
    "There is no guarantee. Ble will not drop packets and requires an ack, so what you may be seeing is a retransmission of a corrupted packet."
    "You are correct. I checked on controller behavior, and the same packet gets sent over and over until acked, so the out of order is happening before our controller tries to send it OTA. "
    I'm confused, will the received packets always in order?
    Thank you.

    Frank