zigbee serial port passthrough

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

zigbee serial port passthrough

4,243件の閲覧回数
13560436802
Contributor II

zigbee(JN5169) how to implement  serial port passthrough function? use which cluster?

(如何实现串口透传功能?)

ラベル(3)
0 件の賞賛
返信
8 返答(返信)

3,708件の閲覧回数
13560436802
Contributor II

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);

z.png

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!

0 件の賞賛
返信

3,708件の閲覧回数
13560436802
Contributor II

Hi mario,

Thank you very much for your reply.

1. I can send fixed length array data now:

    //load payload data into APDU

pastedImage_8.png

2.I have anther question about  how to set the data format when send the indefinite length data?

pastedImage_9.png

0 件の賞賛
返信

3,708件の閲覧回数
quanjunzhang
Contributor III

Hi Dylan,

Can you tell me how to receive a fixed amount of data?

Thanks vary much.

capture_20190702225457684.bmp

Regards,

Zhang

0 件の賞賛
返信

3,708件の閲覧回数
mario_castaneda
NXP TechSupport
NXP TechSupport

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:

  • b 8-bit byte
  • h 16-bit half-word (short integer)
  • w 32-bit word l 64-bit long-word (long integer)
  • a\xnn nn (hex) bytes of data (array)
  • p\xnnnn (hex) bytes of packing ... Variable list of data values described by the format string

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

0 件の賞賛
返信

3,708件の閲覧回数
13560436802
Contributor II

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?

pastedImage_1.png

0 件の賞賛
返信

3,708件の閲覧回数
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Dylan,

Please look at the PDUM_pvAPduInstanceGetPayload

https://www.nxp.com/docs/en/user-guide/JN-UG-3116.pdf 

Regards,

Mario

0 件の賞賛
返信

3,708件の閲覧回数
13560436802
Contributor II

Hi,Mario,

I saw it,But i still don't understand how to send  indefinite length data;

Could you give me an example?

0 件の賞賛
返信

3,708件の閲覧回数
mario_castaneda
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信