2

using Xmeshfor wireless sensors nodes,

1- it is possible to make nodes (Motes) to send and received by each other ?? not just to send information to the base station ??

2-can i modify its packet to add some field ??

3-it is possible to store some values at Motes storage ?

i used TinyOs for programming the motes, motes from type MICAZ??

Hana90
  • 943
  • 5
  • 17
  • 37

1 Answers1

2

1- Yes, if you study the message header, there are destination address and source addresses. When you send a packet using AMSend interface, you can provide the first argument of that method with the ID of the node you are trying to reach.

The ID for nodes are set during compile. for example if you run the below command you will give the board a unique ID that you can send to. Of course you can give as many ids you want to many number of nodes:

$make telosb install.1 bsl,/dev/ttyUSB0

The above command will upload your program to a node and give a unique ID of 1 to it. Now in another node when you receive the packet you can check for the ID. this can be extracted from the packet header, or simply in your own custom packet you can have a unit16_t to store the node id from TOS_NODE_ID constant that always equals the unique ID you specified during upload.

2 - yea you can have a packet as big as 255 bytes. you can define packets like:

typedef nx_struct MyPacket
{
    nx_uint16_t NodeID;
    nx_uint8_t yourCustomField;
    nx_uint32_t anotherField; //and so on

} MyPacket_t;

3- mote storage? IF you mote comes with a flash chip yes you can. there are some interface and components that allow you to write/read from flash memory chip on sensor board if available.

You can learn more form my tutorials Here.

Dumbo
  • 13,555
  • 54
  • 184
  • 288