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.

Need: Frame lost when Notifying with 20B per frame, CC2541.

Hi,

         I use LightBlue to get the Notification data form my BLE peripheral.

         Here is my program main parameters:

         1.#define NOTIFY_EVT_PERIOD   1 // 1 ms   make the periodic event have 1ms period

         2. Connection Interval is 30ms which is the default parameter of LightBlue.

3.   //turn on overlapped processing
  HCI_EXT_HaltDuringRfCmd(HCI_EXT_HALT_DURING_RF_DISABLE);
  HCI_EXT_OverlappedProcessingCmd(HCI_EXT_ENABLE_OVERLAPPED_PROCESSING);

When I use a 7-byte payload, the notifying data was allright(no frame was lost), and the throughput is 1.13kB/s.

Then I change the payload to 20-byte, to increase the throughput. But, I found many frames were lost when notifying with 20-byte payload.

In fact, my program takes 515 notifications, but only 387 were received by LightBlue. I also use PacketSniffer to watch the packets, there were only about 387 notifications. So, nearly 25% of frames were lost.

I tried 7-byte payload many times, no frame was lot.

Why frames were lost when notifying with 20-byte payloads? Please help. Thank you.

Frank

 

                

  • Hello Frank,

    Can you post your method for changing the payload size?
  • Hi Sean,

                 Thank you for reply.

                 As shown below, RecordBuf is a characteristic with length RECORD_LENGTH. I change RECORD_LENGTH from 7 to 20, then frames lost happens.

                

    Frank

  • Frank,

    All else equal, it seems you may be running into throughput issues. Can you attempt some of the methods described at this wiki? processors.wiki.ti.com/.../CC26XX_BLE_Throughput

    I know this is 26xx related, but some of the concepts may apply (changing MTU size is mainly what I would try first).
  • Hi Sean,

    Thank you very much for reply.
    But I didn't find "MAX_PDU_SIZE " or "MAX_NUM_PDU" in BLE1.4.0 stack.
    And the wiki page describes the throughput experiment with CC26XX, and did not mention anything about frame lost.

    Frank
  • Hi Frank,

    Though the wiki is not written for CC254x, the concepts will still apply can you try  raising the connection interval?

  • I will try to find where to change the MTU in BLE1.4.0.

    But I think it's unreliable to fix the problem in this way.

    Althrough the frame did not miss in my test when using 7B payload, how to gauantew that the franmes never miss in the whole life of the product?

  • I think frame lost shouldnot happen.
    If the payload is high, the num of frames per connection interval can be decreased by the stack.
    When I use 7Byte,it's about 4 frames per connection Interval. If 20Byte is too high, the stack can decrease the number to 2 or even 1 frames per connection interval. To gaurantee no frame is lost.
  • Hi Frank,

    The issue is not with the stack.
    Have you look at the HCI_EXT_NumComplPktsLimitCmd command?
  • Hi Sean,

    1.       I looked up in the BLE1.4.0 and find MTU size in Att.h:

    #define ATT_MTU_SIZE L2CAP_MTU_SIZE //!< Minimum ATT MTU size

    #define ATT_MAX_MTU_SIZE 517 //!< Maximum ATT MTU size

    and "#define L2CAP_MTU_SIZE                   23" is defined in L2cap.h 

        Is this the MTU size in BLE1.4.0? And what size do you suggest the MTU should be in my case?

    2.    And I find 

    "extern hciStatus_t HCI_EXT_NumComplPktsLimitCmd( uint8 limit, uint8 flushOnEvt );" in file Hci.h.

    For the parameters "limit" and "flushOnEvt", what values do you suggest me to try?

    Thank you

    Frank