Hi,

i am really new to TinyOS. I'm trying to send messages of type
Ieee154MessageC with TelosB motes. I do not want to use ActiveMessages
because i do not need the additional am_id and because of
interoperability with other motes. When i try to enable ACKs via the
PacketAcknowledgements interface, the packets are actually send without
the acknowledge request bit set and thus there will never be any ACK
send by the receiver.

This is because in chips/cc2420/CC2420Ieee154MessageP.nc the FCF field
of each packet send is overwritten, effectivly clearing the ack request
bit. In contrast in chips/cc2420/CC2420ActiveMessageP.nc the FCF field
is or'ed with the required bits, leaving a potetially set ack request
bit. I would consider this a bug in CC2420Ieee154MessageP.nc, or is
there a specific reason for this behaviour?

Please find attached a patch which fixes the above problem for this
specific chip.

By the way, active messages seem to be implemented for every TinyOS
supported radio. Is there a generic solution for sending packets without
the am_id on (nearly) all supported radios?

Regards,
Sascha

-- 
Dipl.-Inform. Sascha Jopen

University of Bonn                     Tel.:   +49-228-73-54219
Institute of Computer Science 4        Fax:    +49-228-73-4571
Friedrich-Ebert-Allee 144              E-mail: [email protected]
D-53113 Bonn, Germany
diff --git a/tos/chips/cc2420/CC2420Ieee154MessageP.nc b/tos/chips/cc2420/CC2420Ieee154MessageP.nc
index 9619568..6cda793 100644
--- a/tos/chips/cc2420/CC2420Ieee154MessageP.nc
+++ b/tos/chips/cc2420/CC2420Ieee154MessageP.nc
@@ -107,7 +107,7 @@ implementation {
     header->dest = addr;
     header->destpan = call CC2420Config.getPanAddr();
     header->src = call CC2420Config.getShortAddr();
-    header->fcf = ( 1 << IEEE154_FCF_INTRAPAN ) |
+    header->fcf |= ( 1 << IEEE154_FCF_INTRAPAN ) |
       ( IEEE154_ADDR_SHORT << IEEE154_FCF_DEST_ADDR_MODE ) |
       ( IEEE154_ADDR_SHORT << IEEE154_FCF_SRC_ADDR_MODE ) ;
 
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to