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.

4 packets @ 30ms connection interval, but last packet only 10 bytes

Other Parts Discussed in Thread: CC2541

Hello, 

 I've done some experiments, and I'm getting 3x20 byte packets (full length) and 1 packet at 10 bytes. If I try and up the last packet size, I only receive 3 packets overall. Setting it to 10 bytes payload seems to be the magic number. Is this what I can expect? Can I expect to get 20 bytes in the last packet? 

Image: http://gyazo.com/80890b5be1645f56deebc49d6b707178

I'm at a 30ms connection interval? I'm using notifications on 2 characteristics, calling GATT_NOTIFICATION on the 20 byte size 3x and GATT_NOTIFICATIOn on 10byte 1 time. Using cc2541 (sensortag)

Any ideas?

  • Interesting - by GATT_NOTIFICATION 3x as well meant that I sometimes get 5 packets through: 3x20byte 2x10byte 

    http://gyazo.com/a68a0dd56a8137b4321679e027475987

    Any thoughts? 

  • Hello,

    For 1.4 there is overlapped processing which will help to get you around this issue.

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

    The  cause is phy layer leaves some packet in buffer if it is not acked by central. There are 128 bytes in buffer, and each packet takes some headers, crc space. 

    1st connection interval - 4 packets sent,   Master Acks 3.  Now  1 packet (the last one) is taking space

    2ns connection interval - 128bytes - last packet space is avail. 

    Hope this helps. Overlapped will let you send more, since phy buffer is active during the connection interval.

    BR,

    -Greg

  • Interesting, but I don't have

    HCI_EXT_OverlappedProcessingCmd(HCI_EXT_ENABLE_OVERLAPPED_PROCESSING);

    anywhere, so how am I managing to send 5 packets? There are only 4 buffers.

    Out of interest, with
    HCI_EXT_ENABLE_OVERLAPPED_PROCESSING enabled, how many 20 byte packets can I send per connection interval?

    Am I right in thinking, maximum size of a data packet (all fields) is 37 bytes. so 128/37 ~ 3.5
    4 buffers, means 4 * 3.5 = 14 packets per connection interval on average?

    Many Thanks,
    Thomas