Router data in coordinator WSNDemo - Page 1
Forum section: electronics / beginners

author: Unknown
author_rank: Unknown
timestamp: September 06, 2016, 09:06:49 am
content: I downloaded and implemented wsndemo app from bitcloud.The app works fine.But i couldn't get the place in source code for sending data from router to coordinator.can anyone please help to obtain the place for sending data of router in WSNdemo application?

author: ataradov
author_rank: Super Contributor
timestamp: September 06, 2016, 08:53:54 pm
content: Can you clarify? Do you need a place where C sends data to R? There is example of this in the stock WSNDemo. It is used for device identification. Exact data path from serial port is complicated, but it all ends up in the function appMsgSender() that performs actual sending.

author: Unknown
author_rank: Unknown
timestamp: September 07, 2016, 03:01:59 am
content: Thanks for your reply. I want to know the place where C sends data to router and also the place where router sends data to C.So that I can build an application in such a way that when coordinator sends the string "request" to router it should reply with the string "reply".In WSNDemo code where can I include the comparison of string and return the response string.

author: ataradov
author_rank: Super Contributor
timestamp: September 07, 2016, 03:07:09 am
content: It would be easier to start with another application (like Peer2Peer).There is no single place you can do this without breaking everything else.Key things you should be looking for are:1. APS_DataReq() - sends data to the network. Destination and other parameters are defined via APS_DataReq_t structure.2. appApsDataIndHandler() - function that is called when something is received.

author: Unknown
author_rank: Unknown
timestamp: September 07, 2016, 03:16:21 am
content: Thanks I will check these functions .I tried WSNdemo since i have to build mesh network not peer to peer..Can I receive temperature value of Coordinator in router and set it as router's temperature value.please reply

author: ataradov
author_rank: Super Contributor
timestamp: September 07, 2016, 03:28:38 am
content: Quote from: umamaheswary on September 07, 2016, 03:16:21 amPeer2Peer is just an application name, reflecting its function. ZigBee always works as a mesh.Quote from: umamaheswary on September 07, 2016, 03:16:21 amYes, if you introduce corresponding modifications. They are not trivial, since WSNDemo is heavily architected to do what it does. And it is not easy to extend it with new functionality. That's why I'm telling you to look at simple applications, or simplify WSNDemo yourself.There is not going to be an easy way out, ZigBee is complicated and you will have to understand how things work before you can do meaningful development.

author: Unknown
author_rank: Unknown
timestamp: September 07, 2016, 04:47:09 am
content: Can I receive uart data in router using wsndemo?I tried using readByteEvent after initializing uart in the router.But it doesnt work

author: ataradov
author_rank: Super Contributor
timestamp: September 07, 2016, 04:57:43 am
content: Quote from: umamaheswary on September 07, 2016, 04:47:09 amSure, in P2P application both sides (C and R) use UART.Quote from: umamaheswary on September 07, 2016, 04:47:09 amProvided that you have initialized everything correctly, it should work. It is impossible to say what may be wrong in your particular case without debugging or at least looking at the changes you've made.

author: Unknown
author_rank: Unknown
timestamp: September 07, 2016, 04:59:53 am
content: Thanks for your reply. I am working on peer to peer..The basic application works fine.I can send data to and from devices.Then I tried to broadcast a message so that one of the addresses of device is set toappDataReq.dstAddr=0xffffnext device address is 1.Remaing part remains same.no modification made.At this time i couldn't receive data to and from devices.What I am missing.Please reply