From: Chiara S. <chi...@un...> - 2011-11-17 15:39:01
|
First of all thanks for the help in this post. To complete this discussion, I now write what I had noticed that time... In Contiki-conf should be added: +++ #define WITH_CONTIKIMAC_HEADER 0 and not --- #define CONTIKIMAC_CONF_WITH_CONTIKIMAC_HEADER 0 This makes some errors rise. I solved them by commenting lines 90 and 97 in this way: //#if WITH_CONTIKIMAC_HEADER #define CONTIKIMAC_ID 0x00 struct hdr { uint8_t id; uint8_t len; }; //#endif /* WITH_CONTIKIMAC_HEADER */ And adding at 665 the following line: struct hdr *chdr; I also noticed that - doing this way - packets are visible not only in Wireshark (even if I noticed a time-mismatch in it - anyway: packets are shown) but also in Radio Logger (from which I could not get any information before). Hopefully this may be useful for someone ... Regards, Chiara Message: 5 Date: Fri, 21 Oct 2011 06:34:51 -0400 From: "David Kopf" <da...@em...> Subject: Re: [Contiki-developers] packet analyzer for ContikiMAC To: <con...@li...> Message-ID: <367060D30FA049D688C845D60BC906E3@Ginger> Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Correct, wireshark does not understand the contikimac header so can not decode the packets. As far as I can tell the only reason for the header is to tell how much padding was added to short packets so the other side can remove it (the padding makes the impv6 checksum wrong so without recovering the original length, technically all the icmpv6 options should be ignored), in contikimac.c: /* SHORTEST_PACKET_SIZE is the shortest packet that ContikiMAC allows. Packets have to be a certain size to be able to be detected by two consecutive CCA checks, and here is where we define this shortest size. */ #define SHORTEST_PACKET_ SIZE 43 #define CONTIKIMAC_CONF_WITH_CONTIKIMAC_HEADER 0 in the contiki-conf.h file will remove it and wireshark will then be happy. The only problem I have run into is a bad checksum on the initial multicast DIS at startup which delays joining the network. Fix that with #define SHORTEST_PACKET_SIZE 43-18//fix checksum on multicast RPL DIS Of course any padded packets after that may take more strobes to wake the recipient, but I have not seen any in webserver or ping traffic. I don't understand the 43; the contikimac pdf says two CCAs are done "within 0.5 msec" so the shortest packet length would seem to be 500usec/32usec = 15 bytes See http://www.jennic.com/files/support_files/JN-AN-1035%20Calculating%20802-15-4%20Data%20Rates-1v0.pdf -----Original Message----- From: Chiara Sammarco Sent: Friday, October 21, 2011 4:25 AM To: con...@li... Subject: [Contiki-developers] packet analyzer for ContikiMAC Hi all, So far I've used Cooja for emulating a network of Tmote Sky and I've analyzed the .pcap file (generated by the radio logger) with Wireshark 1.7.0 Development Version. I've noticed that if I use the ContikiMAC as RDC layer, Wireshark inspection with .pcap file does not work properly; instead using sicslowmac or nullrdc, It works (so I manage to the type and the content of the exchanged messages). Does anyone know why this happens? Is there a way to inspect packet exchange for ContikiMAC as RDC layer? Thank you in advance. Regards, Chiara -------------------------------- Chiara Sammarco PhD Student at ARTS Lab - DIMET University of Reggio Calabria Engineering Faculty Via Graziella, loc. Feo di Vito 89122 Reggio Calabria - Italy Tel/fax: +39 0965 875 276 ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ Contiki-developers mailing list Con...@li... https://lists.sourceforge.net/lists/listinfo/contiki-developers -------------------------------- Chiara Sammarco PhD Student at ARTS Lab - DIMET University of Reggio Calabria Engineering Faculty Via Graziella, loc. Feo di Vito 89122 Reggio Calabria - Italy Tel/fax: +39 0965 875 276 |