OK, the bytes I show are already sorted (I mean, I've switched the bytes because I knew that the lower byte of a unit16_t was sent first). According to what you say (PAN in bit 5 & 6), I'm sending a packet to PAN 0xFFFF and address 0x0001. The problem is that all the motes receive this packet (not only the one with id=0x0001). I can filter the packets in the event ReceiveMsg.receive(), but I just thought that this was unnecessary since the provider of ReceiveMsg should do it.
I'm using tmotes. Does anyone knows wheter the provider of ReceiveMsg (which is GenericComm in my wiring) should actually filter the packets?


Michael Schippling <[EMAIL PROTECTED]> escribió:
FWIW using mica2,z all I need to do to direct a message from the pc
side to a specific mote is to set the TOS_Msg.addr field to the moteID.
With the mica's at least, TOSBase just passes this message directly
to the air and the receivers filter out what's not addressed to them.
One little caviet however, the standard TOSBase translates message
structs between mica2 (types/AM.h) and micaz (platforms/micaz/AM.h)
formats and thus may-or-may-not fill in destpan.

Using the send() interface should set the destination addrs correctly
on whichever platform format. Both destpan and addr are defined as
uint16's which will be two bytes long, and in a byte array the low byte
will come first. What you show is 4 bytes and bigendian so you may be
looking at the wrong fields. Aside from 7E sync bytes the destpan
should be bytes 5 & 6 in the message stream.

MS

Pablo Gil Montaño wrote:
> Sorry, perhaps I didn't explain myself correctly.
>
> The nodes that are sending the packets are not running TOSBase, but with
> a node running TOSBase I can see that the address field of the packet
> (PAN+address) is 0xFFFF 0x0001 (when I try to send a packet to node 1).
> I don't know if the field order is PAN + address o viceversa, so perhaps
> the destination address is correct and the PAN address is 0xFFFF.
> Anyway, ReceiveMsg.receive() is signaled on every node, not only in node
> 1. However, I think that ReceiveMsg.receive() should filter all the
> packets and deliver to the user of the interface only those packet
> directed either to all (bradcast) or to the node itself, so I think that
> I might be doing somthing wrong.
>
> Any ideas?
>
>
> */Siirtola Harri <[EMAIL PROTECTED]>/* escribió:
>
> TosBase only sends broadcast packets. So, the easiest way of unicast
> is to embed your destination address into the data payload and make
> your app sw extract it, compare to TOS_LOCAL_ADDRESS and act
> accordingly (drop or interpret).
>
> Regards,
>
> Harri
>
> ------------------------------------------------------------------------
> *From:* [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] *On Behalf Of
> *Pablo Gil Montaño
> *Sent:* Thursday, September 14, 2006 2:54 PM
> *To:* tinyos-help_list
> *Subject:* [Tinyos-help] Unicast radio transmission
>
> Hi.
>
> I'm trying to send a packet throught SendMsg to a specific node.
> Scanning the sent packets with TOSBase I can see that the first
> argument passed to SendMsg.send() is set as the PAN address, and the
> field TOS_Msg.addr has no effect either on the PAN address or the
> destination address. Thus, I cannot change the destination address
> and the event ReceiveMsg.receive is signaled in all the nodes.
> How can I send a packet that signals this event only in the
> destination node?
>
> Thanks in advance
> ------------------------------------------------------------------------
>
> LLama Gratis a cualquier PC del Mundo.
> Llamadas a fijos y móviles desde 1 céntimo por minuto.
> http://es.voice.yahoo.com
>
>
>
> ------------------------------------------------------------------------
>
> LLama Gratis a cualquier PC del Mundo.
> Llamadas a fijos y móviles desde 1 céntimo por minuto.
> http://es.voice.yahoo.com
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to