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.

CC2530: Some issues about TIMAC BeaconPayload.

Part Number: CC2530
Other Parts Discussed in Thread: TIMAC, SIMPLELINK-CC13XX-CC26XX-SDK

Hi team,

Here's the request from the customer:

uint8 msa_BeaconPayload[] = {0x22, 0x33, 0x44};
uint8 msa_BeaconPayloadLen = 3;

Can the payload of the beacon frame be modified while the network is running? If so, how should it be modified? After the modification, do customer needs to restart the device?

Could you help check this case? Thanks.

Best Regards,                                                        

Nick

  • Hi Nick,

    Has the customer attempted to modify the beacon payload using MAC_MlmeSetReq(MAC_BEACON_PAYLOAD, &msa_BeaconPayload); during runtime?  Since the examples only establish this value inside initialization, MAC_CoordinatorStart/MAC_DeviceStart, it may be critical for the customer to restart the device before applying this change.

    Regards,
    Ryan

  • Hi Ryan,

    Yes, MAC_MlmeSetReq  (MAC_BEACON_PAYLOAD, &msa_BeaconPayload) is used, but after the modification is completed, it is found that the beacon payload changes randomly, not the modified beacon payload. 

    uint8 msa_BeaconPayloadLen = 6;
    
    uint8 msa_BeaconPayload = {0x22,0x33,0x44,0xaa,0xbb,0xcc};
    
    
    /* Setup MAC_BEACON_PAYLOAD_LENGTH */
    MAC_MlmeSetReq(MAC_BEACON_PAYLOAD_LENGTH, &msa_BeaconPayloadLen);
    
    
    /* Setup MAC_BEACON_PAYLOAD */
    MAC_MlmeSetReq(MAC_BEACON_PAYLOAD, &msa_BeaconPayload);

    Best regards,

    Nick

  • Hi Ryan,

    May I know is there any update for this question?

    Best regards,

    Nick

  • Hi Nick,

    Has the customer tried restarting the device and making this change before starting the radio?  What is the contents of the random beacon payload, does it change length correctly, and are the same values populated each time or change with every MAC_MlmeSetReq?  Can they provide debug logs indicating this behavior?

    Regards,
    Ryan

  • Hi Ryan,

    1. The purpose of customer is to change the beacon load during operation, it is impossible for him to actively restart the device, because this requires the coordinator to re-network and the terminal to re-enter the network.
    2. The content of the random beacon load is randomly filled, which is completely different from the 0x22, 0x33, 0x44, 0xaa, 0xbb, 0xcc he set above, but the length is changed correctly, and the value of each filling is also random. It has been only modified once, but the beacon load changes randomly and it is different every time, as shown in the following figure:
  • The coordinator and nodes should not have to re-establish network connections if NV memory is retained.  Does the Beacon Payload change if the length is retained or if the length is changed after the payload itself?  What version of TIMAC are they using?  Are they able to debug MAC_MlmeSetReq from mac_pib.c to further determine whether pMacPib->pBeaconPayload is set to pValue?  Also, have they tried incrementing the first beacon payload value, or the entire packet contents for that matter?

    Regards,
    Ryan

  • Hi Ryan,

    Here's reply from customer:

    1. If the length remains the same and only the payload is changed, the payload will change, but also randomly.
    2. The version used is 1.5.2
    3. Through debugging, it can be determined that pMacPib->pBeaconPayload is set to pValue
    4. If modifying the first beacon payload, the payload of the beacon frame is the preset value.

    Regards,
    Ryan

  • I sourced a procedure from the TI 15.4-Stack present in the SIMPLELINK-CC13XX-CC26XX-SDK.  Please have the customer modify mac_pib.c as follows:

    #define MAC_PIB_MAX_BEACON_PAYLOAD_LEN  16
    uint8 MAC_MlmeSetReq(uint8 pibAttribute, void *pValue)
    {
      uint8         i;
      halIntState_t intState;
      uint8 macBeaconPayload[MAC_PIB_MAX_BEACON_PAYLOAD_LEN] = {0};
    
      if (pibAttribute == MAC_BEACON_PAYLOAD)
      {
        osal_memcpy((void *)macBeaconPayload, pValue, MAC_PIB_MAX_BEACON_PAYLOAD_LEN);
        pMacPib->pBeaconPayload = (uint8 *)macBeaconPayload;;
        return MAC_SUCCESS;
      }
      //...

    Then report back as to how this changes behavior.  Inside the debugger, they can also further evaluate macPib changes in a Memory or Watch Expressions View.

    Regards,
    Ryan