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.

sniffer shows packets but the actual data sent not seen in any of the fields of captured packets.

Other Parts Discussed in Thread: CC2531, SIMPLICITI, CC2420, CC2530, PMP, CC-DEBUGGER

Hi,
I was trying to check out serial app project  on cc2350 and packet sniffer dongle cc2351. I used serial app project on cc2350 . cc2350 was sending out packets. I could see the packets using cc2351 dongle with packet sniffer. But in the packets captured I could not see the data I sent in any of the fields.
I have few questions regarding this.
1. How would the packet sniffer on the 2351 usb dongle pair up with any of the nodes?  For how can it have the required pan id cluster id .... to pair up with any zigbee unit which is on?
2. Does this dongle sniff packets sent by MAC_McpsDataReq ( )?
3. If the packet is encrypted how does the usb dongle decript the packet if it does not pair up with the zibee device and still sniff the packet?
4. Can I download serial app project to the usb cc2351 dongle so that it pairs up with the  other zibee device wth the same serial app. In that case will the sniffer firmware on the USB dongle get corrupted?
 
Your answers would help.
Thanks and Regards,
Vamsi.
 
 

  • Hi,

    1) The CC2531 usb dongle sniffs all the data on the fixed channel over the air. It does not pair with any node.

    2) The sniffer SW parses the packets that are sniffed and presents it on GUI. SmartRF Packet Sniffer can parse IEEE 802.15.4/ZigBee, ZigBee RF4CE, Generic, Bluetooth Low Energy, SimpliciTI, and IEEE 802.15.4/ZigBee (CC2420). Does the dongle sniff packets sent by MAC_McpsDataReq()? This depends on what content you send.

    3) SmartRF Packet Sniffer is a free basic sniffer SW. It can not decipher the encryption data. If you need this capability, you can buy  Ubilogix or Perytons SW.

    4) The sniffer FW on CC2531 will be overwritten if you do this. However, you still can burn it back.

  • Hi YiKai,

     Thank you for the reply. How do I get to see the data I sent from cc2350 using serial app on the sniffer. I would want to see the data in the same format I sent.

    When data was transmitted from smart RF 05 board, I could see the same data using cc2351 USB sniffer in the beacon data field.

    Similarly I would want to see the data sent from cc2350 using cc2351 USB sniffer.

    Can you help me regarding this?

    Thanks and Regards,

    Vamsi.

     

     

  • Do you use Zigbee on your CC2530? Do you encrypt your sent message. If not, you can see the same message on SmartRF Packet Sniffer directly. If you still have problem, please describe your problem more specifically.

  • Hi Vamsi,

      Open the smart RF Packet sniffer .

    1. In the down panel , you see the Capturing device. make sure you have selected  CC2531 USB Dongle (assuming you have many module connected to the laptop. so you need to select only the dongle.)

    2.Go to Radio configuration -.select the appropriate channel used by CC2530.

    3.Go to Select fields : In the Select Fields :select ALL and in Payload format either Select Bytes or Text.

    Now you can see the exact data in sniffer.

    Note:Make sure in your CC2530 f8wConfig.cfg  use no secuirty.

    /* Set to 0 for no security, otherwise non-0 */

     -DSECURE=0

    -DZG_SECURE_DYNAMIC=0

    Thanks and Regards

    Lakshman,PMP,PMI-RMP

  • Hi Lakshmanan,

    Thank you for the reply.

      I was using serial app project in  "C:\Texas Instruments\ZStack-CC2530-2.5.1a\Projects\zstack\Utilities\SerialApp\CC2530DB"

     The function sending the data is

         unsigned char packet[40] = {0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
        
       AF_DataRequest(&SerialApp_TxAddr,
                                               (endPointDesc_t *)&SerialApp_epDesc,
                                                SERIALAPP_CLUSTERID1,
                                                SerialApp_TxLen+1, packet,
                                                &SerialApp_MsgID, 0, AF_DEFAULT_RADIUS);

    So I should see the long string of   FF on the sniffer.

    What is see is

    How do I get to see this data on sniffer?

    Thanks and Regards,

    Vamsi.

     

  • Hi Lakshmanan,

    I checked that it is

    /* Set to 0 for no security, otherwise non-0 */

     -DSECURE=0

    -DZG_SECURE_DYNAMIC=0

    in the project I used.

    Still I cannot see the data though I can see the packets on sniffer.

    Thanks and Regards,

    Vamsi.

  • Hi YiKai, 

    I was using serial app project in  "C:\Texas Instruments\ZStack-CC2530-2.5.1a\Projects\zstack\Utilities\SerialApp\CC2530DB"

     The function sending the data is

         unsigned char packet[40] = {0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
        
       AF_DataRequest(&SerialApp_TxAddr,
                                               (endPointDesc_t *)&SerialApp_epDesc,
                                                SERIALAPP_CLUSTERID1,
                                                SerialApp_TxLen+1, packet,
                                                &SerialApp_MsgID, 0, AF_DEFAULT_RADIUS);

    So I should see the long string of   FF on the sniffer.

    What is see is

    How do I get to see this data on sniffer?

    Thanks and Regards,

    Vamsi.

  • Hi vamsi,

    in function

    fill the address either

     SerialApp_TxAddr.addrMode = Addr16Bit;      

    SerialApp_TxAddr.addr.shortAddr = 0x0000; // Coordinator

    SerialApp_TxAddr.endPoint = SERIALAPP_ENDPOINT

    or

    SerialApp_TxAddr.addrMode = AddrBroadcast;     

    SerialApp_TxAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR;

    SerialApp_TxAddr.endPoint = SERIALAPP_ENDPOINT

    AF_DataRequest(&SerialApp_TxAddr, (endPointDesc_t *)&SerialApp_epDesc,SERIALAPP_CLUSTERID1,SerialApp_TxLen+1, packet,                             &SerialApp_MsgID, 0, AF_DEFAULT_RADIUS);

     

     i dont see the APS profile id (0x0F05) for serial apps in your sniffer data.

     

    Thanks and Regards

    Lakshman,PMP,PMI-RMP

      

     

  • Hi Lakshman,

    I have changed the function to as suggested by you.

    zAddrType_t txAddr;
      txAddr.addrMode = AddrBroadcast;
          txAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR;
       ZDP_MatchDescReq( &txAddr, NWK_BROADCAST_SHORTADDR,
                            SERIALAPP_PROFID,
                            SERIALAPP_MAX_CLUSTERS, (cId_t *)SerialApp_ClusterList,
                            SERIALAPP_MAX_CLUSTERS, (cId_t *)SerialApp_ClusterList,
                            FALSE );
        
         //unsigned char packet[20] = {0xFF, 0xFF, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0xFF, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09};
          unsigned char packet[40] = {0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
     
      SerialApp_TxAddr.addrMode = AddrBroadcast;    
    SerialApp_TxAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR;
    SerialApp_TxAddr.endPoint = SERIALAPP_ENDPOINT;
    AF_DataRequest(&SerialApp_TxAddr, (endPointDesc_t *)&SerialApp_epDesc,SERIALAPP_CLUSTERID1,SerialApp_TxLen+1, packet, &SerialApp_MsgID, 0, AF_DEFAULT_RADIUS);
         

    Still I do not see the data.

    I do not even see APS profile id (0x0F05) . Does this mean the sniffer is actually sniffing some other packets?

    But if I power off cc2350 I do not see any packets on sniffer.

    Where is the profile id 0x0f05 assigned in the serial app?

    Thanks and Regards,

    Vamsi.

     

     

  • if ( keys & HAL_KEY_SW_1 )    

     {  

     unsigned char packet[40] = {0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};    

     SerialApp_TxAddr.addrMode = AddrBroadcast;    

    SerialApp_TxAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR;

    SerialApp_TxAddr.endPoint = SERIALAPP_ENDPOINT;

    AF_DataRequest(&SerialApp_TxAddr, (endPointDesc_t *)&SerialApp_epDesc,SERIALAPP_CLUSTERID1,SerialApp_TxLen+1, packet, &SerialApp_MsgID, 0, AF_DEFAULT_RADIUS);

        }

    Thanks and Regards

    Lakshman,PMP,PMI-RMP

  • Hi Lakshman,

    I actually commented out all palces where packets could be sent on air is the serial app.c file in the serial app project.

    In the

    static void SerialApp_CallBack(uint8 port, uint8 event)

    function I'm actually reading the data coming of UART from another micro controller connected to cc2350 and trying to send it over air and sniff using cc2351.

    I could read from UART.  but I'm using the packet data explicitly defined so that I could be sure that data is sent on air and checked on sniffer.

    Am I missing any thing in doing it this way.

    I believe the profile ID (0x0F05) shall come from else where in the project.

     

    In the function

    static void SerialApp_CallBack(uint8 port, uint8 event)

    I put

     zAddrType_t txAddr;
      txAddr.addrMode = AddrBroadcast;
          txAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR;
       ZDP_MatchDescReq( &txAddr, NWK_BROADCAST_SHORTADDR,
                            SERIALAPP_PROFID,
                            SERIALAPP_MAX_CLUSTERS, (cId_t *)SerialApp_ClusterList,
                            SERIALAPP_MAX_CLUSTERS, (cId_t *)SerialApp_ClusterList,
                            FALSE );
        
         //unsigned char packet[20] = {0xFF, 0xFF, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0xFF, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09};
          unsigned char packet[40] = {0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
     
      SerialApp_TxAddr.addrMode = AddrBroadcast;    
    SerialApp_TxAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR;
    SerialApp_TxAddr.endPoint = SERIALAPP_ENDPOINT;
    AF_DataRequest(&SerialApp_TxAddr, (endPointDesc_t *)&SerialApp_epDesc,SERIALAPP_CLUSTERID1,SerialApp_TxLen+1, packet, &SerialApp_MsgID, 0, AF_DEFAULT_RADIUS);
         

     

    Regards,

    Vamsi.

  • Could you change your AF_DataRequest to triggered by a button, for example HAL_KEY_SW_1. You only send out AF_DataRequest once after ZDP_MatchDescReq and the packet might be lost.

  • Hi Vamsi,

      If my understanding is correct.Your question is whether you can see the value Over the air in the sniffer or not.

     To answer this .

    please

     write the function call which i mentioned above in the thread --> inside the HAL_KEY_SW1 and press the joystick up to see whether you see the data in sniffer.

     

    Hope it helps.

     

    Thanks and Regards

    Lakshman,PMP,PMI-RMP

  • Hi Lakshman,

     I do not have joy stick as cc2350 is integrated into some other board where it is connected to the micro controller. The micro controller sends data on UART. This data is to be received by cc2350 and cc2350 has to transmit the data over air.

    I have done as suggested by you

    if ( keys & HAL_KEY_SW_1 )   
     { 
     unsigned char packet[40] = {0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};   
     SerialApp_TxAddr.addrMode = AddrBroadcast;   
    SerialApp_TxAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR;
    SerialApp_TxAddr.endPoint = SERIALAPP_ENDPOINT;
    AF_DataRequest(&SerialApp_TxAddr, (endPointDesc_t *)&SerialApp_epDesc,SERIALAPP_CLUSTERID1,SerialApp_TxLen+1, packet, &SerialApp_MsgID, 0, AF_DEFAULT_RADIUS);
        }

    But could see the data. May be because I do not have joy stick or switch button on the board cc2350 is integrated to.

     

    If my understanding is correct.Your question is whether you can see the value Over the air in the sniffer or not. .... This is correct.

    Is it because there are no switches on the board, binding request or binding response is not happening and so AF_DataRequest is not transmitting the packet properly.

    Thanks and Regards,

    Vamsi.

     

  • Hi Vamsi,

     Ok understand , use the timer to send the periodic message to verify the data in the sniffer.(Even you can use timer for binding ).instead of button.

    In SerialApp.h

    #define  SERIAL_MSG_TIMEOUT   2000     // Every 2 seconds

     #define SERIAL_SEND_MSG_EVT       0x0040

    devStates_t SerialApp_NwkState;

    In SerialApp.c

     use below code in

    UINT16 SerialApp_ProcessEvent( uint8 task_id, UINT16 events )

    {

    case ZDO_STATE_CHANGE:          

          SerialApp_NwkState= (devStates_t)(MSGpkt->hdr.status);          

              if ( (SerialApp_NwkState== DEV_ZB_COORD) || (SerialApp_NwkState== DEV_ROUTER)  || (SerialApp_NwkState== DEV_END_DEVICE) )          

              {            

                       // Start sending "the" message in a regular interval.            

                        osal_start_timerEx( SerialApp_TaskID,SERIAL_SEND_MSG_EVT,SERIAL_SEND_MSG_EVT);          

                 }          

                     break;

    ...

    ...

    ...

     

      // Send a message out - This event is generated by a timer

     if ( events & SERIAL_SEND_MSG_EVT)   {    

    // Send "the" data

    unsigned char packet[40] = {0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};   

    SerialApp_TxAddr.addrMode = AddrBroadcast;   

     SerialApp_TxAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR;

    SerialApp_TxAddr.endPoint = SERIALAPP_ENDPOINT;

     AF_DataRequest(&SerialApp_TxAddr, (endPointDesc_t *)&SerialApp_epDesc,SERIALAPP_CLUSTERID1,SerialApp_TxLen+1, packet, &SerialApp_MsgID, 0, AF_DEFAULT_RADIUS);

        // Setup to send message again    

    osal_start_timerEx( SerialApp_TaskID,  SERIAL_SEND_MSG_EVT,  SERIAL_MSG_TIMEOUT);

        // return unprocessed events    

    return (events ^ SERIAL_SEND_MSG_EVT);   }

    }//SerialApp_ProcessEvent

    The above code will send the data at regular interval.

     

    Binding can be implemented in the same way. Adjust the timing and stop the timer once the device binds.

     

    Thanks and Regards

    Lakshman,PMP,PMI-RMP

     

  • Hi Vamsi,

    As I guess, your ZDP_MatchDescReq and AF_Datarequest are insides "if ( keys & HAL_KEY_SW_4 )" code segments, isn't? If you don't have a button on your HW, you can not trigger SW4. Of course there is no message sent out. You should revise your code insides SerialApp_Send().

  • Hi Lakshman,

     It worked. Thank you.

    Is there some way to change channel in the code. I have to change the channel depending on some logic.

    Is there some way to select  DDEFAULT_CHANLIST = 0x04000000;  // 26 - 0x1A  

    or

    -DDEFAULT_CHANLIST=0x00000800  // 11 - 0x0B

    depending on some input from UART.

    Regards,

    Vamsi.

     

  • No, you can not dynamically change DEFAULT_CHANLIST.

  • Hi Vamsi,

     Thats good. yes you can change the channel. Use the code below.

    uint8 ch = 12; //channel number

    uint32 tmp32 ;

      // Switch channel                                    

    _NIB.nwkLogicalChannel = ch;                                     

    MAC_MlmeSetReq( MAC_LOGICAL_CHANNEL, &ch); 

        // Our Channel has been changed -- notify to save info into NV                                    

    ZDApp_NwkStateUpdateCB();                                    

     // Reset the total transmit count and the transmit failure counters                                    

    _NIB.nwkTotalTransmissions = 0;                                                                          

     tmp32 = ((uint32)1 << ch); //update the channel mask                                                                           

     (void)osal_nv_write(ZCD_NV_CHANLIST, 0, 4, &tmp32);

     

    Thanks and Regards

    Lakshman,PMP,PMI-RMP

  • Is there some way to change the channel from code?

    I change the channel in the cooedinator and ask the endpoint also to change the channel?

     

  • Hi Vamsi,

    Are you talking about Frequency Agility? THis is enabled by default in ZStack.

  • Thank you Lakshman,

    I get the following error on compiling the above code.

     

    Error[Pe223]: function "osal_nv_write" declared implicitly C:\Texas Instruments\ZStack-CC2530-2.5.1a\Projects\zstack\Utilities\Transmit\Source\TransmitApp.c 402

    What needs to be included?

    Thanks and Regards,

    K. Vamsi Krishna.

  • You need to add "#include "OSAL_Nv.h"" if you want to use API osal_nv_write() .

  • Hi Lakshman,

    Using the following code I cannot see any packet in channel 12 from sniffer. By default I could see data in channel 15 i.e. just with out the code to change the channel.

    uint8 ch = 12; //channel number
    uint32 tmp32 ;
      // Switch channel                                   
    _NIB.nwkLogicalChannel = ch;                                    
    MAC_MlmeSetReq( MAC_LOGICAL_CHANNEL, &ch);
        // Our Channel has been changed -- notify to save info into NV                                   
    ZDApp_NwkStateUpdateCB();                                   
     // Reset the total transmit count and the transmit failure counters                                   
    _NIB.nwkTotalTransmissions = 0;                                                                         
     tmp32 = ((uint32)1 << ch); //update the channel mask                                                                          
     (void)osal_nv_write(ZCD_NV_CHANLIST, 0, 4, &tmp32);*/


           
        
           
       // unsigned char packet[40] = {0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};  
    unsigned char packet[40] = {0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a};  

      TransmitApp_DstAddr.addrMode = (afAddrMode_t)afAddrBroadcast;     //   AddrBroadcast;  //(afAddrMode_t)AddrNotPresent;
      TransmitApp_DstAddr.endPoint = 0;
      TransmitApp_DstAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR; //0;
      for (lv=0; lv<1000; lv++){
       
        for (i=0; i<1000; i++){vx= vx+1; vx= vx-1;}; //Delay
       
        tmp = AF_DataRequest( &TransmitApp_DstAddr, &TransmitApp_epDesc,
                               TRANSMITAPP_CLUSTERID_TESTMSG,
                              20, packet,
                              &TransmitApp_TransID,
                               TRANSMITAPP_TX_OPTIONS,
                               AF_DEFAULT_RADIUS );
      }

     

    Any suggestion what I'm missing?

    Regards,

    Vamsi.

  • Hi Lakshman,

     

    I need to send packets over RF just a broad cast packet. Is there some way to send these packets without any delay in between. I.e. no other tasks done just packet sent continuously?

    I think just 802.15.4 packet would be fine for this case. But is there some sample app which does this?

    The code you have given to change channel works. But one more  AF_DataRequest has to be called the following way (code below)before I send the packet I wanted.

     

    uint16 len;
    uint8 ch = 20; //channel number
    uint32 tmp32 ;// = 0x00008000 ;
      // Switch channel                                   
    _NIB.nwkLogicalChannel = ch;                                    
    MAC_MlmeSetReq( MAC_LOGICAL_CHANNEL, &ch);
        // Our Channel has been changed -- notify to save info into NV                                   
    ZDApp_NwkStateUpdateCB();                                   
     // Reset the total transmit count and the transmit failure counters                                   
    _NIB.nwkTotalTransmissions = 0;                                                                         
     tmp32 = ((uint32)1 << ch); //update the channel mask                                                                          
     (void)osal_nv_write(ZCD_NV_CHANLIST, 0, 4, &tmp32);
    // NLME_UpdateNV(0x01);
     AF_DataRequest( &TransmitApp_DstAddr, &TransmitApp_epDesc,
                               TRANSMITAPP_CLUSTERID_TESTMSG,
                               len, TransmitApp_Msg,
                              &TransmitApp_TransID,
                               TRANSMITAPP_TX_OPTIONS,
                               AF_DEFAULT_RADIUS );
       
     

          
    //   DDEFAULT_CHANLIST = 0x04000000;  // 26 - 0x1A   
       
        for (i=0; i<1000; i++){vx= vx+1; vx= vx-1;}; //Delay
       
       // unsigned char packet[40] = {0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};  
    unsigned char packet[40] = {0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a};  

      TransmitApp_DstAddr.addrMode = (afAddrMode_t)afAddrBroadcast;     //   AddrBroadcast;  //(afAddrMode_t)AddrNotPresent;
      TransmitApp_DstAddr.endPoint = 0;
      TransmitApp_DstAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR; //0;
      for (lv=0; lv<1000; lv++){
       
        for (i=0; i<1000; i++){vx= vx+1; vx= vx-1;}; //Delay
       
        tmp = AF_DataRequest( &TransmitApp_DstAddr, &TransmitApp_epDesc,
                               TRANSMITAPP_CLUSTERID_TESTMSG,
                              20, packet,
                              &TransmitApp_TransID,
                               TRANSMITAPP_TX_OPTIONS,
                               AF_DEFAULT_RADIUS );

    Thanks and Regards,

    Vamsi.

     

  • Hi Lakshman,

    In one of the applications I was trying to send packets continuously. This was from

     

     if ( events & SYS_EVENT_MSG )
      {

        
        
      unsigned char packet[40] = {0xFF, 0xFF, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a};  

      TransmitApp_DstAddr.addrMode = (afAddrMode_t)afAddrBroadcast;     //   AddrBroadcast;  //(afAddrMode_t)AddrNotPresent;
      TransmitApp_DstAddr.endPoint = 0;
      TransmitApp_DstAddr.addr.shortAddr = NWK_BROADCAST_SHORTADDR; //0;
     

    do{
       
        for (i=0; i<1000; i++){vx= vx+1; vx= vx-1;}; //Delay
       
        tmp = AF_DataRequest( &TransmitApp_DstAddr, &TransmitApp_epDesc,
                               TRANSMITAPP_CLUSTERID_TESTMSG,
                              20, packet,
                              &TransmitApp_TransID,
                               TRANSMITAPP_TX_OPTIONS,
                               AF_DEFAULT_RADIUS );
      } while(1);

      
     }

     

    The issue is it goes into this while loop sends few packets but comes out of the while loop due to some event I believe.

    How do I stop all interrupts once inside the while loop so that no events would get it out of this while loop? Is it that disabling interrupts would stop the packet transmitt also?

    Thanks and Regards,

    Vamsi.

     

     

  • You should not use endpoint 0 in your TransmitApp_DstAddress.endPoint. Endpoint 0 is a special endpoint and always contains the Zigbee Device Object (ZDO)

  • Hi,

    TransmitApp_DstAddress.endPoint  should be assigned to what in such cases?

    Regards,

    Vamsi.

  • You can only use 1 to 254 as your end point and choose what you want.

  • Hi Lakshman,

    On query regarding GPIO

    I'm trying to make P00 Low and P01 High in transmit app to switch between two antenna we have in our custom solution.

    if ( events & SYS_EVENT_MSG )
      {
      

    if(Antenna_Select == 1)
        {
    P0SEL &= 0xF7;
        P0DIR = 1;
       P0 = 0;
       P0SEL &= 0xFB;
       P0DIR = 1;
       P0 = 1          }

     

    .....}

    this is not working. My guess is because Im using P0 port for uart communication may be this is causing the issue.

    Any suggestions how to make this work?

    Regards,

    Vamsi.
       

  • Hi Vamsi,

    Try the following codes:

    if (Antenna_Select==1)

    {

    P0SEL &=0xFC //Select P0_0 and P0_1 as GPIO function

    P0DIR |=0x03; //Set P0_0 and P0_1 as GPO

    P0_0=0;

    P0_1=1;

    }...

  • Hi Lakshman,

    Im using the PER sample project on our custom board. It is working. But there is no UART support for this project looks like.

    How I go about? Do I include the HAL uart.h and .c files in this project?

    HAL UART .h is present but it is different from the serial app or transmitt app project.

     

    Thanks and Regards,

    K. Vamsi Krishna

     

  • Hi,

    Is there some I could download the hex file to cc2530 generated by IAR.

    Regards,

    vamsi

  • Hello Lakshman,

    Does RFstudio work with all sample applications for cc2530?

    For example sa SerialApp application, in this if there no code to send packets on JTAG/cc-Debugger for RFStudio how would RFStudio get the packets?

    Is it like all these sample examples have some base code which would always communicate through cc-dubugger to cc2530?

    Thanks and Regards,

    Vamsi.

     

  • Hi,

    Wireshark seems support  zigbee, has anybody used it to decode Zigbee frames up to APS payload? If yes, what zigbee dongle is required to capture the frames? and how many zigbee clusters can it decode?

    Thanks!

    Debbie