[Tinyos-help] Forwarding Message to base station from Mesh network
Hi all, I would like to forward msg for one node to another finally back to the station without changing any msg information. What interface should i use is there any ready make program for that ..thanks in advance regards, steve ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] Forwarding Message Pls help
Hi, It's always a good idea to send a copy to the forum so that others can contribute. Also, somebody else might have a similar problem and would be glad to see what we have been discussing. For multihop communication, I strongly recommend to start with the Collection protocol, as everything you need there is already implemented: http://docs.tinyos.net/index.php/Network_Protocols#Collection Basically, instead of the regular send/receive interfaces you send your packets over the collection interface, and it does all the routing/multi-hop transport for you. The anchor node calls RootControl.setRoot(true), and forwards any received messages over the serial port. The relay does not need to do anything specific (just start the radio), in fact the targets will also act as relays. I recommend to use the same code for all three types of nodes (easier to maintain) and to just configure a node as the anchor when the node ID has a specific value (as demonstrated in the tutorial). On the relay nodes you just need to increment the hop count for each message. You can intercept messages before they are forwarded. To do this you'll have to implement the Intercept interface. The code could look something likes this: event bool forward(message_t* msg, void* payload, uint8_t len) { MyMsg* data = (MyMsg*)payload; // cast to your own data structure data-hopCount++; // increase the hop count of the message return true; // tell the underlying system to forward the message } Cheers, Urs On 10/18/10 5:11 AM, (¯`•._.•Lance•._.•´¯) wrote: Hi Hunkeler, Thanks for u reply. Well my project is about tracking the target inside the mesh network.I will have three types of node .. 1) *Target *: Only board casting the message which contain Hop count , node i d, and temperature 2,)*Relay * : Received the bcast and check the Node it ..if the Id is from the target increase the hop count if the ID is from other relay increase the hop count inside the msg by 1 and re boardcast the msg. 3)*Ancho*r : Received the bcast and check the node ID just like the realy .. but this time the anchor will send the msg directly to the base satation which is within the transmisssion range by fixing the address in the msg. * Implementation... * Assume we have four anchors( position is alrady known) arrange into square form.the distance between the any two anchor is two transmisssion range distance , Some realy node in between . Forming a mesh network and track the target by looking at the hop count from each Anchor. Now my problem is that if i put the base station close to one of the Anchor (A1) .then i am not able to receive the infromation from the rest of the anchor A2,A3,A4. SO now i wan to forward the information from Each anchor back to the base without changing any information. IS that possibile? Currently my program code is working fine for every anchor just that i don't know how to forward the message back to station . HOpe you can understand what i mean..I really need ur value advices. Pls help me and looking forward to ur reply. Thanks for ur time. Regards, lance ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] Forwarding Message
For multihop communication, I strongly recommend to start with the Collection protocol, as everything you need there is already implemented: http://docs.tinyos.net/index.php/Network_Protocols#Collection Basically, instead of the regular send/receive interfaces you send your packets over the collection interface, and it does all the routing/multi-hop transport for you. The anchor node calls RootControl.setRoot(true), and forwards any received messages over the serial port. The relay does not need to do anything specific (just start the radio), in fact the targets will also act as relays. I recommend to use the same code for all three types of nodes (easier to maintain) and to just configure a node as the anchor when the node ID has a specific value (as demonstrated in the tutorial). On the relay nodes you just need to increment the hop count for each message. You can intercept messages before they are forwarded. To do this you'll have to implement the Intercept interface. The code could look something likes this: event bool forward(message_t* msg, void* payload, uint8_t len) { MyMsg* data = (MyMsg*)payload; // cast to your own data structure data-hopCount++; // increase the hop count of the message return true; // tell the underlying system to forward the message } Cheers, Urs On 10/18/10 5:11 AM, (¯`•._.•Lance•._.•´¯) wrote: Hi Hunkeler, Thanks for u reply. Well my project is about tracking the target inside the mesh network.I will have three types of node .. 1) *Target *: Only board casting the message which contain Hop count , node i d, and temperature 2,)*Relay * : Received the bcast and check the Node it ..if the Id is from the target increase the hop count if the ID is from other relay increase the hop count inside the msg by 1 and re boardcast the msg. 3)*Ancho*r : Received the bcast and check the node ID just like the realy .. but this time the anchor will send the msg directly to the base satation which is within the transmisssion range by fixing the address in the msg. * Implementation... * Assume we have four anchors( position is alrady known) arrange into square form.the distance between the any two anchor is two transmisssion range distance , Some realy node in between . Forming a mesh network and track the target by looking at the hop count from each Anchor. Now my problem is that if i put the base station close to one of the Anchor (A1) .then i am not able to receive the infromation from the rest of the anchor A2,A3,A4. SO now i wan to forward the information from Each anchor back to the base without changing any information. IS that possibile? Currently my program code is working fine for every anchor just that i don't know how to forward the message back to station . HOpe you can understand what i mean..I really need ur value advices. Pls help me and looking forward to ur reply. Thanks for ur time. Regards, lance ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Forwarding Message
On Mon, Oct 18, 2010 at 10:15 AM, Urs Hunkeler urs.hunke...@epfl.ch wrote: On the relay nodes you just need to increment the hop count for each message. You can intercept messages before they are forwarded. To do this you'll have to implement the Intercept interface. The code could look something likes this: event bool forward(message_t* msg, void* payload, uint8_t len) { MyMsg* data = (MyMsg*)payload; // cast to your own data structure data-hopCount++; // increase the hop count of the message return true; // tell the underlying system to forward the message } If you use CTP, you can read the value of the THL field for hopcount. - om_p ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Forwarding Message
Hi, It's always a good idea to send a copy to the forum so that others can contribute. Also, somebody else might have a similar problem and would be glad to see what we have been discussing. For multihop communication, I strongly recommend to start with the Collection protocol, as everything you need there is already implemented: http://docs.tinyos.net/index.php/Network_Protocols#Collection Basically, instead of the regular send/receive interfaces you send your packets over the collection interface, and it does all the routing/multi-hop transport for you. The anchor node calls RootControl.setRoot(true), and forwards any received messages over the serial port. The relay does not need to do anything specific (just start the radio), in fact the targets will also act as relays. I recommend to use the same code for all three types of nodes (easier to maintain) and to just configure a node as the anchor when the node ID has a specific value (as demonstrated in the tutorial). On the relay nodes you just need to increment the hop count for each message. You can intercept messages before they are forwarded. To do this you'll have to implement the Intercept interface. The code could look something likes this: event bool forward(message_t* msg, void* payload, uint8_t len) { MyMsg* data = (MyMsg*)payload; // cast to your own data structure data-hopCount++; // increase the hop count of the message return true; // tell the underlying system to forward the message } Cheers, Urs On 10/18/10 5:11 AM, (¯`•._.•Lance•._.•´¯) wrote: Hi Hunkeler, Thanks for u reply. Well my project is about tracking the target inside the mesh network.I will have three types of node .. 1) *Target *: Only board casting the message which contain Hop count , node i d, and temperature 2,)*Relay * : Received the bcast and check the Node it ..if the Id is from the target increase the hop count if the ID is from other relay increase the hop count inside the msg by 1 and re boardcast the msg. 3)*Ancho*r : Received the bcast and check the node ID just like the realy .. but this time the anchor will send the msg directly to the base satation which is within the transmisssion range by fixing the address in the msg. * Implementation... * Assume we have four anchors( position is alrady known) arrange into square form.the distance between the any two anchor is two transmisssion range distance , Some realy node in between . Forming a mesh network and track the target by looking at the hop count from each Anchor. Now my problem is that if i put the base station close to one of the Anchor (A1) .then i am not able to receive the infromation from the rest of the anchor A2,A3,A4. SO now i wan to forward the information from Each anchor back to the base without changing any information. IS that possibile? Currently my program code is working fine for every anchor just that i don't know how to forward the message back to station . HOpe you can understand what i mean..I really need ur value advices. Pls help me and looking forward to ur reply. Thanks for ur time. Regards, lance ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Forwarding Message
Hi Lance, I'm not sure what your question is. What kind of mesh networking protocol are you using? Some protocols are described in the tutorials: http://docs.tinyos.net/index.php/TinyOS_Tutorials#Network_Protocols You seem to use (or want to use) something similar to the Collection protocol: http://docs.tinyos.net/index.php/Network_Protocols#Collection To count the hops, you could add a hop count variable in your message and initialize it to 0 on the sending node. Then you intercept messages (with the Intercept interface) and increment this counter before forwarding the message. Do you have a working data collection program? If so, all you need to do is to add the functionality to count the number of hops of messages. Cheers, Urs On 10/17/10 7:34 AM, (¯`•._.•Lance•._.•´¯) wrote: hi all, I am currently working on a wsn ( Micaz) project.I encountered some issues .The issue is that i want to forward message( hop count that i received from the target in the mesh network ) back to the base station but in between there will be some relay nodes. . Is there anyone can advice me what should i do in order to solve this problem. Some programming guide as well . Thanks for your time and appriciate it. Regards, lance ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] Forwarding Message
hi all, I am currently working on a wsn ( Micaz) project.I encountered some issues .The issue is that i want to forward message( hop count that i received from the target in the mesh network ) back to the base station but in between there will be some relay nodes. . Is there anyone can advice me what should i do in order to solve this problem. Some programming guide as well . Thanks for your time and appriciate it. Regards, lance ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help