zigbee(JN5169) how to implement serial port passthrough function? use which cluster?
(如何实现串口透传功能?)
Thank you for your reply.
My application like that,for example ,i have 100 bytes data send from" STM32 A" to "STM32 B" .
In this process,the jn5169(A) get the data from serial port and send to another jn5169(B) through the zigbee wireless. the jn5169(B) send the received data to the STM32 B through serial port at once when get the data from jn5169(A);
i have saw the zigbee cluster library user guide, but i can't find a suitable cluster to do it;
waiting for your reply,thank you!
Hi mario,
Thank you very much for your reply.
1. I can send fixed length array data now:
2.I have anther question about how to set the data format when send the indefinite length data?
Hi Dylan,
Can you tell me how to receive a fixed amount of data?
Thanks vary much.
Regards,
Zhang
Hi Dylan,
Did you check the parameters?
hAPduInst Handle of the APDU instance to write the data into
u32Pos The starting position (least significant byte) of the data within the APDU instance
*szFormat Format string of the data:
Note that the compiler will not correctly interpret the format string “a\xnnb” for a data array followed by a single byte, e.g. “a\x0ab”. In this case, to ensure that the ‘b’ (for byte) is not interpreted as a hex value, use the format “a\xnn” “b”, e.g. “a\x0a” “b”.
Regards,
Mario
Hi Mario,
I have another question about receiving;
For example, if A device send data to the B device. the B device how to get the data in the application layer?
Hi Dylan,
Please look at the PDUM_pvAPduInstanceGetPayload
https://www.nxp.com/docs/en/user-guide/JN-UG-3116.pdf
Regards,
Mario
Hi,Mario,
I saw it,But i still don't understand how to send indefinite length data;
Could you give me an example?
Hi Dylan,
I am not sure, what is the final application that you want.
You can look at the ZigBee Cluster Library User Guide document and look at one cluster that could be equal for your application, or you can create a custom cluster.
Regards,
Mario