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.

CC1352P: ti154stack sometimes send empty frame

Part Number: CC1352P


hi ,

I am having problems on the collector sending downlink frame:

The protocol stack version is simplelink_CC13xx_CC26XX_sdk_5_30_01_01,

I create a collector project base on template project “C:\ti\simplelink_cc13xx_cc26xx_sdk_5_30_01_01\examples\rtos\CC1352P_2_LAUNCHXL\ti154stack\collector_2_4g”,

there about 30 sensor work with the collector, The communication process is as follows:

1. Every 10 seconds, each sensor sends a MAC data frame to the Collector.

2. The sensor will send 8 MAC Data Requests to poll collector within 1 second after the MAC data is sent, so as to receive the MAC data frames answered by the Collector.

the problem is after the collector send out the answer  MAC data frame , sometimes the collector sends empty frame(frame without payload) ,

The screenshot of the Sniffer log is as follows

  • Hi Tenix,

    Can you post the sniffer log file?

    Can you explain which short address is the collector in these logs? The empty packet you have framed has the source short address 0x0001.

    Cheers,

    Marie H

  • hi Marie H,

    Yes, the short address 0x0001 is collector,

      0x4D00_CUBX Open using ubiqua,  

      0x4D00_PCAP Open using Wireshark,  

    (The content in the two files is the same , only the format is different)

    As the Sniffer log, after running for a while, sending out lots of empty data frames:

    Refer to package:  

      Package 332: sensor sends data,  

      Package 353: Sensor Sends Data Request Poll Collector,  

      Package 356: Collector sends data to sensor (Payload len 23),  

      Package 382: Sensor Sends data Request poll Collector,  

      Package 357: Collector sends empty data to sensor (no payload),  

      Package 395: Sensor sends data Request poll Collector,  

      Package 400: Collector sends empty data to sensor (no payload),  

      Package 307: Sensor Sends data Request poll Collector,  

      Package 409: Collector sends empty data to sensor (no payload),  

    Best Regards!

    0x4D00.zip

  • Hi Tenix,

    What SW did you use to capture these packets? When I open the .pcap file in Wireshark, all packets have a [Malformed Packet] or Bad FCS exception. Also source and data length are missing for most packets so it's hard to see what's going on.

    Could you check the collector Tx buffer when this happens and check whether the packet has empty payload before it's being sent?

    Cheers,

    Marie H

  • Hi Marie H,

    The .pcap file is conver from the ubiqua .cubx file,  The next time this happens, I'll use Wireshark to capture the package and provide you with a new file., which should be provided within 3 days,

    while calling the function ApiMac_mcpsDataReq(&dataReq), dataReq.msdu.p is pointing to a static buffer, and dataReq.msdu.len can't be less than 2, 

    The ApiMac_mcpsDataReq function may also check whether msdu.len and msdu.p are valid .So the application layer may not send empty packets to the MAC Tx Buffer successfully. 

    Is there any way to track if the TX Buffer in the MAC layer is empty?

    Best Regards!

  • Hi Tenix,

    The ApiMac_mcpsDataReq takes a pointer to a ApiMac_mcpsDataReq_t struct. The content of the packet (content of this pointer: dataReq.msdu.p) is copied into a new buffer by the stack. The lenght or contents are not checked before copying. So maybe you could try monitoring dataReq.msdu.p and dataReq.msdu.len and check if these are erased at any point?

    Cheers,

    Marie H

  • Hi Marie H,

    When working normally, the Sensor will send a data every 10 seconds and the Collector will send a reply( Indirect transmission) .

    When the problem occurs, After collector send the reply frame, each time the sensor poll collector will receive ACK with Frame pending = 1  and receives an empty packet

    So I think the problem maybe the relationship between Frame Pending and Tx Buffer become abnormal Is a possible cause,  After the Collector send the response frame (Indirect transmission ), Tx Buffer memory is freed, but Frame Pending resources are not freed, so every time sensor poll the empty frame will be sent.

    Best Regards!

  • Hi Marie H,

    Refer to package:  

      Package 3645: sensor sends data,  

      Package 3653: Sensor Sends Data Request Poll Collector,  

      Package 3657: Collector sends data to sensor (Payload len 23),  

      Package 3687: Collector sends empty data to sensor (no payload),  

      Package 3691: Sensor sends data Request poll Collector,  

      Package 3698: Collector sends empty data to sensor (no payload),  

      Package 3195~3235: Collector sends empty data to sensor (no payload),  

    20220331_1544.zip

    Best Regards!

  • Hi,

    Are you using beacon mode, non-beacon mode or frequency hopping mode? 

    Is your collector connected to more than one sensor when this happens?

    Is the data from the collector eventually sent, or does the collector only send empty packets after this happens?

    Cheers,

    Marie H

  • Hi Marie H,

    I‘m using the stack as non-beacon and no frequency hopping.

    Best Regards!

  • Hi Tenix,

    1. Is your collector connected to more than one sensor when this happens?

    2. Is the data from the collector eventually sent, or does the collector only send empty packets after this happens?

    Cheers,

    Marie H

  • Hi Marie H,

    1. Is your collector connected to more than one sensor when this happens?

       Collector connected to about 30 sensors when this happen;

    2. Is the data from the collector eventually sent, or does the collector only send empty packets after this happens?

        After this happens , The data from the collector eventually sent success as well; 

    Best Regards!

  • Hi Tenix,

    I need to consult with the SW designers about your case. 

    How often does this happen?

    Could you provide instructions for me to reproduce what you are seeing?

    Cheers,

    Marie H

  • Hi Marie H,

    It happen Sometimes it takes a few hours to appear, sometimes it takes a few days to appear, and once it appears, it lasts until it crashes .

    To reproduce it:

    Collector can configure as below:

    1. non beacon and no  frequency hopping mode;

    2. secLevel = ApiMac_secLevel_none;

    3. MAC_CFG_TX_DATA_MAX         20

        MAC_CFG_TX_MAX              30

        MAC_CFG_RX_MAX              30

        MAC_CFG_APP_PENDING_QUEUE   FALSE

    4. MAX_DEVICE_TABLE_ENTRIES=50

        CONFIG_PHY_ID                   APIMAC_250KBPS_IEEE_PHY_0

        CONFIG_POLLING_INTERVAL         2000

        MIN_PERSISTENCE_TIME_USEC 1000000

    #define INDIRECT_PERSISTENT_TIME (MAX((2 * 1000 * CONFIG_POLLING_INTERVAL / 2), MIN_PERSISTENCE_TIME_USEC)/ \
    (BASE_SUPER_FRAME_DURATION * \
    SYMBOL_DURATION_250_kbps))

    sensor can configure as below:

    1. CONFIG_PHY_ID                   APIMAC_250KBPS_IEEE_PHY_0

        CONFIG_RX_ON_IDLE               false

        CONFIG_SECURE                   false

     

    The workflow is as follows:

    1. there ara about 30 sensors or more;

    2. after sensor joined network, Every 10 seconds sensor send a data frame A to collector( frame lenght about 40 bytes, Send calling function ApiMac_mcpsDataReq() ) ; 

    3. after frame A was send , sensor send ApiMac_mlmePollReq() every 100 millisecond to poll collector ,  Send 10 times. 

    4. while collector received frame A, then reply a frame B( frame lenght about 30 bytes, Indirect transmission) to sensor .

    Best Regards!

  • Hi Tenix,

    I consulted with the SW developers, and this behavior is expected.

    The reason this sometimes happens is that in certain cases we use the auto ACK as the ACK packet. In this frame, the pending bit will always be one, even if the collector has no data pending. This means the sensor will expect a data packet from the collector. Thus we must send one (empty) data packet to the sensor.

    Cheers,

    Marie H

  • Hi Marie H,

    Thank you for your attention, consultation and reply to this question .

    Is there any way to prevent the collector from sending empty packets?

    For example, disable auto ACK:

        How to turn off Auto ACK?

        What is the impact of trun off Auto ACK?

        After the ATUO ACK is disabled, How to set frame Pending to 1 when the collector needs send data to sensors?

    I need to find a solution to this problem because we have produced 3000+ tags and 50 collectors based on the 15.4 stack.& CC1352P platform.

    Is it possible to solve this problem on the basis of 15.4 Stack?

    Best Regards!

  • Hi Tenix,

    Sorry, no we have tried avoiding it but in some cases we have to use auto ACK. 

    In most cases one empty data frame shouldn't cause an issue. 

    Cheers,

    Marie H

  • Hi Marie H,

    In my case,while collector running for a long time,it sends too many empty frame;

    This has affected the normal operation of the network,  will increase the collector's burden, make the network channel more busy, increase the power consumption of the sensor .

    When Auto ACK is enabled, does the application layer have a means to know that auto ACK is in use?  

    Can you describe the situation in which auto ACK is needed? I want to optimize the interaction strategy, avoiding  the device get into this situation. 

    Best Regards!

  • Hi Tenix,

    I'll discuss with the SW team, however I don't think there is any way to change the implementation.

    Cheers,

    Marie H

  • Hi Marie H,

    Thanks, and I will also try to optimize the sensor communication strategy for more tests .

    Best Regards!

  • Hi Tenix,

    It's not possible to remove the auto ack feature, and there is no way for the stack to alert the application that an auto ACK is used.

    I think the error you are seeing is coming from a difference between precompiled values in the TI 15.4-Stack, and these values you have set: 

    MAC_CFG_TX_DATA_MAX         20
    
    MAC_CFG_TX_MAX              30
    
    MAC_CFG_RX_MAX              30
    
    MAC_CFG_APP_PENDING_QUEUE   FALSE

    Can you set these back to default values and retry?

    Cheers,

    Marie

  • Hi Marie H,

    ok, I will set back to default and retry.

    thanks!