On Dec 18, 2006, at 7:01 PM, ricardo tiago wrote:
Hi all,
I have setup 2 nodes, with BlinkToRadio and BaseStationCC2420, with
id 5 and 400 to test Listen (like in lesson 4).
This is what i get in Listen:
00 01 90 90 01 04 00 06 00 05 03 FB
From Serial.h this is what i'm seeing (plus the payload):
typedef nx_struct serial_header {
nx_am_addr_t dest;
nx_am_addr_t src;
nx_uint8_t length;
nx_am_group_t group;
nx_am_id_t type;
} serial_header_t;
Everything seems fine except in the 3rd/4th bytes. Why i'm seeing
"90 01"and not the addr of the node with BlinkToRadio "00 05". Any
illumination in the subject will be greatly appreciated.
I think it might be a bug in BaseStationCC2420, where it is not
correctly copying the source address over. Instead, you're seeing two
bytes of the 15.4 packet, which are aligned differently. Rather than
this:
msg = uartQueue[uartOut];
tmpLen = len = call RadioPacket.payloadLength(msg);
id = call RadioAMPacket.type(msg);
addr = call RadioAMPacket.destination(msg);
It should be doing something like this:
am_addr_t source = call RadioAMPacket.source(msg);
msg = uartQueue[uartOut];
tmpLen = len = call RadioPacket.payloadLength(msg);
id = call RadioAMPacket.type(msg);
addr = call RadioAMPacket.destination(msg);
call SerialAMPacket.setSource(source);
Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help