Author Topic: Router data in coordinator WSNDemo  (Read 2780 times)

0 Members and 1 Guest are viewing this topic.

umamaheswary

  • Guest
Router data in coordinator WSNDemo
« on: September 06, 2016, 09:06:49 am »
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?
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11236
  • Country: us
    • Personal site
Re: Router data in coordinator WSNDemo
« Reply #1 on: September 06, 2016, 08:53:54 pm »
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.
Alex
 

umamaheswary

  • Guest
Re: Router data in coordinator WSNDemo
« Reply #2 on: September 07, 2016, 03:01:59 am »
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.
 
« Last Edit: September 07, 2016, 03:04:43 am by umamaheswary »
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11236
  • Country: us
    • Personal site
Re: Router data in coordinator WSNDemo
« Reply #3 on: September 07, 2016, 03:07:09 am »
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.
Alex
 

umamaheswary

  • Guest
Re: Router data in coordinator WSNDemo
« Reply #4 on: September 07, 2016, 03:16:21 am »
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
« Last Edit: September 07, 2016, 03:21:45 am by umamaheswary »
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11236
  • Country: us
    • Personal site
Re: Router data in coordinator WSNDemo
« Reply #5 on: September 07, 2016, 03:28:38 am »
I tried WSNdemo since i have to build mesh network not peer to peer..
Peer2Peer is just an application name, reflecting its function. ZigBee always works as a mesh.

Can I receive temperature value of Coordinator in router and set it as  router's temperature value.
Yes, 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.
Alex
 

umamaheswary

  • Guest
Re: Router data in coordinator WSNDemo
« Reply #6 on: September 07, 2016, 04:47:09 am »
Can I receive uart data in router using wsndemo?I tried using readByteEvent after initializing uart in the router.But it doesnt work
« Last Edit: September 07, 2016, 04:49:50 am by umamaheswary »
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11236
  • Country: us
    • Personal site
Re: Router data in coordinator WSNDemo
« Reply #7 on: September 07, 2016, 04:57:43 am »
Can I receive uart data in router using wsndemo?
Sure, in P2P application both sides (C and R) use UART.

I tried using readByteEvent after initializing uart in the router.But it doesnt work
Provided 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.
Alex
 

umamaheswary

  • Guest
Re: Router data in coordinator WSNDemo
« Reply #8 on: September 07, 2016, 04:59:53 am »
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 to
appDataReq.dstAddr=0xffff
next 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

« Last Edit: September 08, 2016, 03:34:43 am by umamaheswary »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf