Other Parts Discussed in Thread: Z-STACK, CC2530
Hi Yikai,
Ya i can implement uartRx callback function at end device end.
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.
Hi Yikai,
Here I have included sniffer log and data sending image file using z-tool. In sniffer log APS source end point is coming as 0x01 although i am using 0x02 for both source and destination as you can see in z-tool image file.
4885.1.psd
I see the end device responses APS ack which means your end device receives command from ZC. Why do you think your end device doesn't receive data.
My code may look eratic. Here i have included part of my temperature sensing code. When data is received at the end device then i am setting event for sensing temperature in void zb_ReceiveDataIndication( uint16 source, uint16 command, uint16 len, uint8 *pData ) using osal_set_event ( sapi_TaskID, TEMPERATURE_SENSING_EVENT); //event set for sensing temperature After the event is set, this event will be processed in
void zb_HandleOsalEvent( uint16 event ) function and temperature data will be sent to the coordinator using
zb_SendDataRequest( Dest_Addr, TEMPERATURE_SENSOR_CMD_ID, 8, pData, 0, AF_ACK_REQUEST, 0 ); //temperature sensor should send data like this;-@TEMx### where x denotes temperature value8713.temp.txt
I had placed breakpoint at switch(pData[0]). After that i pressed Step Into button of downloading file. Next statement it executed was pData[0] = 0; although pData[0] had 'A' value in switch(pData[0])
1. Try to change optimization in project option to low and see if you can set breakpoint in zb_ReceiveDataIndication.
2. If you use HalUARTWrite, it will output to ZTOOL. it won't show on ZTOOL because it is not in MT command format.
Here i have included the response in z-tool. I had left my ZC and ZED powered on and after about 10 min i had checked by sending data using z-tool then i got response as shown highlighted and no data was received. After that i resetted ZED and again sent data then ZED replied correctly. What may be reason for this?