Jon - I know you sent this awhile ago, and I was just combing through some tinyos help emails and found it. Sorry I didn't see it before.
There is currently no platform independent method of checking CRC's from the application layer. The radio or radio stack is responsible for rejecting packets with bad CRC's, so any packet that does get through is assumed to have a good CRC check. In the case of the CC2420, the radio auto-checks CRC's and flips a bit to indicate good or bad (cc2420 datasheet has more details). CC2420ReceiveP verifies that bit before doing anything with the packet. If you're using the packet link layer and are receiving the same message twice, then yes, something went wrong. Either the message didn't pass the CRC check so it never entered the stack, or the packet was good and the acknowledgement was dropped/corrupted. In both cases the transmitter will continue trying to deliver the packet. It's then up to the UniqueReceive layer to filter out duplicates. -David -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jon Green Sent: Friday, June 01, 2007 7:48 AM To: tinyos-help Subject: [Tinyos-help] Checking CRC Does anyone know how I can check if a packet passed CRC check in a nice platform independent way? I can't find any abstraction for CRC checks... I have an application that is occasionally getting packets with malformed data in them. When it gets a bad packet, a good packet always arrives soon after with the same DSN, which means it didn't ack the bad packet, and the other mote sent the data again. This leads me to believe that the packet failed the CRC check. I'm working with a MicaZ mote. From what I see in the source, the CRC field gets set in the metadata, but nothing ever gets done with it. There is no link layer module for received packets, so the bad packet makes it all the way to the application layer. Now at the application layer I'm trying to figure out if there is a nice way to check if it failed CRC without using CC2420Packet. Has anyone faced this before and how is the accepted way to deal with it? I was also wondering if the optional packet link layer packet PacketLink should include the receive interface? This would allow the networking stack to drop packets that fail CRC checks. -Jon _______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help _______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
