JN5189 failed to send data

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

JN5189 failed to send data

673 Views
Viki
Contributor II

The SDK version I use is SDK2.6.2_JN5189DK6, and the program I use is Zigbee_ed_ex_on. The logic of the program is as follows: when the serial port receives a byte of data, it prints the data "7", then unicast a packet of wireless data to the coordinator , and prints the status of data transmission.

 

The current phenomenon is that when the board is powered on and the networking is successful (confirmed by capturing the packet), a data is sent to the serial port, and the serial port will successfully print "7".The abnormal situation is that the board can sometimes send the data out (visible by capturing the packet) and print the state of sending the data (0, indicating that the data is sent successfully), and sometimes can not send the data out, and the serial port has no state of printing the data to send, at this time the board can not operate normally, can only be restarted.

 

Here are the serial port interrupt handling functions and the wireless data transmission functions in the code:

 

send.png

 

uart.png

 

1.png

 

 

What causes the program to jam after calling ZPS_eAplAfUnicastAckDataReq()?What's the solution?

Thank you for your time!

0 Kudos
4 Replies

640 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @Viki,

I recommend adding your send data function in the function APP_taskEndDevicNode. you will process all the information that you are getting through the UART driver. You could set a flag in the UART callback and in the ED task you could send the information that you want.

However, I recommend looking at the JN-AN-1243 example that we provide. The example shows how is the UART interface using the coordinator. 

Regards,

Mario

 

0 Kudos

638 Views
Viki
Contributor II

Hi Mario,

Thank you for your reply. Your answer is very useful to me.

Best Regards,

Viki

665 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @Viki,

Could you please try to implement the send data routine in a different part of the code?

You are sending data in the USAR handler, that could be the reason why the data is sent and sometimes not..

Try to add the same function in a non-blocking routine, remember that the Zigbee stack works with FreeRTOS.

Regards,

Mario

0 Kudos

658 Views
Viki
Contributor II

Hi @mario_castaneda ,


I am not familiar with the ZigBee protocol stack of NXP, my idea is to generate an event after receiving a serial port data, and send wireless data in this event.However, I am not clear how to achieve the serial port data to generate an event, I would like to ask how to implement this function?

Thank you for your time!

0 Kudos