AnsweredAssumed Answered

Sample codes to communicate with ZED by ZC

Question asked by Dias Kuo on Feb 4, 2016
Latest reply on Feb 19, 2016 by Dias Kuo

Hi everyone,

 

I have both a TWR-KW24D512 (MKW24D512 Microcontroller Tow) and a MKW24D512VHA5 (ZC) connected to a host processor via SPI (maybe change SPI to UART).

My goal is to communicate with ZED by the ZC on the host using ZTC.

 

I got a example below to toggle a Philips Hue light on i.MX6 host via UART, and I know that sending correct ZTC commands to a ZC (ZigBee KW20) can communicate with a ZED (light).

Does NXP provide any sample codes to communicate with ZED by ZC connected to the host using ZTC?

May I have a easy way to call some functions to do it?

For example, called connect() and action() function, then the functions can generate corresponding ZTC commands to communicate with ZED by ZC via SPI or UART.

In addition, I cannot find opcode group 0xA3 and opcode 0x52 in BeeStack BlackBox ZigBee Test Client (ZTC) Reference Manual (Rev. 1.6, 07/2014, BSBBZTCRM.pdf).

 

[Example to toggle the light]

echo ‐en '\x02\xA3\x52\x03\xC0\x01\x10\x23' > /dev/ttyACM0

echo ‐en '\x02\xA3\x52\x03\x80\x01\x08\x7B' > /dev/ttyACM0

echo ‐en '\x02\x70\x50\x10\x02\xFF\xFF\x00\x00\xD0\x00\x00\x00\x0B\x06\x00\x08\x00\x05\x02\xE0' > /dev/ttyACM0

 

Thank you for your help.

 

Best regards,

Dias

Outcomes