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: UART communication between CC2530 and openwrt

Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK

Hi All,

I have a customized board(ZC) having cc2530 and it's uart lines connected to linkit smart 7688 which is also mounted on ZC. 

I have one Zigbee switch(ZR) to communicate with cc2530. So whenever I press the switch(ZR),  ZC will respond.

Now I want to collect the logs in openwrt (on linkit smart 7688) for ZR activities.So please guide me to establish uart communication between cc2530 and openwrt.

( For now i can connect cc2530 with ztool and can see some logs.  If I use some serial terminal like termite or real-term then it's giving some hex value

but i need some decoded value So my program can understand the specific logs for ZR activities and write it 's status to a file)

Thanks,

Hardik

  • There's a Z-Stack ZNP interface specification.pdf in document folder which shows you some details.
  • Hi YK Chen,

    Thanks for your reply.

    I have connected cc2530 to my PC and using Tera-term to see the data but it's showing some junk value.
    Could you please let me know the format of data sent by cc2530 ?

    If it's some other format then we can convert it into suitable format to make the use of logs.


    I am just trying to compare the received data in z-tool and Tera-term.

    In Z-Tool it's showing something like this

    /*******

    Start Time: 8/9/2017 9:18:49 PM

    *** WARNING ***
    Expected Z-Stack version (2.7.0) does not match with actual Z-Stack version (2.6.3). Z-Tool may not work properly.

    <RX>09:18:50.01 COM3 ZDO_MGMT_PERMIT_JOIN_RSP (0x45B6)
    SrcAddr: 0x0000
    Status: ZDP_SUCCESS (0x0)

    <RX>09:18:50.02 COM3 ZDO_END_DEVICE_BIND_RSP (0x45A0)
    SrcAddr: 0x0000
    Status: ZDP_NO_MATCH (0x86)

    <RX>09:18:50.02 COM3 ZDO_END_DEVICE_BIND_RSP (0x45A0)
    SrcAddr: 0x0000
    Status: ZDP_NO_MATCH (0x86)

    <RX>09:18:50.03 COM3 AF_DATA_CONFIRM (0x4480)
    Status: afStatus_SUCCESS (0x0)
    Endpoint: 0x00
    TransID: 0xB9

    <RX>09:18:50.12 COM3 AF_DATA_CONFIRM (0x4480)
    Status: afStatus_SUCCESS (0x0)
    Endpoint: 0x00
    TransID: 0xBA

    <RX>09:18:50.12 COM3 AF_DATA_CONFIRM (0x4480)
    Status: afStatus_SUCCESS (0x0)
    Endpoint: 0x00
    TransID: 0xBB

    *** WARNING ***
    Unsupported or unformatted message received. Raw data:
    01 45 CB 00

    <RX>09:18:50.13 COM3 AF_DATA_CONFIRM (0x4480)
    Status: afStatus_SUCCESS (0x0)
    Endpoint: 0x00
    TransID: 0xBB

    <RX>09:18:50.14 COM3 AF_DATA_CONFIRM (0x4480)
    Status: afStatus_SUCCESS (0x0)
    Endpoint: 0x00
    TransID: 0xBA

    <RX>09:18:50.15 COM3 AF_DATA_CONFIRM (0x4480)
    Status: afStatus_SUCCESS (0x0)

    ***/


    But when i close z-tool and connect to Tera-term then it's displaying some junk value as given below
    /***
    'þD¶qþEËþD¶qþE¶ðþD·pþEËÿpþD·pþE¶ðþD¸þEËþD¸þE¶ðþD¹~þEËÿpþD¹~þE¶ðþDº}þEËþDº}þE¶ðþD»|þEËÿpþD»|þE¶ðþD¼{þEËþD¼{þE¶ðþD½zþEËÿpþD½zþE¶ðþD¾yþEËþD¾yþE¶ðþD¿xþEËÿpþD¿xþE¶ðþDÀþEËþDÀþE¶ðþDÁþEËÿpþDÁþE¶ðþDÂþEËþDÂþE¶ðþDÃþEËÿpþDÃþE¶ðþDÄþEËþDÄþE¶ðþDÅþEËÿpþDÅþE¶ðþDÆþEËþDÆþE¶ðþDÇþEËÿpþDÇþE¶ðþ
    ***/
    ( cc2530 working with baud rate 38400 So setting the baud rate for tera-term and z-tool accordingly)

    Also I want to know the meaning of z-tool logs as given below
    /*****
    *** WARNING ***
    Unsupported or unformatted message received. Raw data:
    01 45 CB 00

    *****/
    Is z-stack sending any command internally or something similar like that?
    really don't know how it's working, Request for some guidance.

    Thanks,
    Hardik

  • The communication is MT command. You can refer to Z-Stack Monitor and Test API.pdf in Z-Stack document folder for details.