Using Wireshark with Contiki and Cooja

来源:互联网 发布:ubuntu 16.04安装 分区 编辑:程序博客网 时间:2024/04/30 01:11

1、Cooja pcap export

In cooja go to tools and thenradio messages (instead of radio logger)in the radio messages window go to analyzer and choose6LoWPAN with PCAP.A log file calledradiolog-xxxxxxx.pcap will be created in contiki/tools/cooja/build directoryjust open the file with wire-shark and it's done. These log files can be opened in Wireshark to perform deeper analyzations.

注意,这里日志文件的存储是和cooja的目录有关,桌面上的cooja存储的目录是contiki/tools/cooja/build;若是在contiki-2.7中启动cooja,那么目录就是contiki-2.7下的tools/cooja/build目录


2、Use Wireshark
Due to 6lowpans statefull compression you might need to set prefix preferences to match your needs
Set Edit->Preferences->Protocols->6LoWPAN->Context 0
For most applications you may want to set the Context 0 to aaaa:: as it is the default prefix for Contiki nodes.

USC ANRG 中还提到了一种分析数据包的方法:sniffer+foren6  可以对实际节点间的数据进行捕获

正如tcpdump至于有线网络一样,sniffer用于无线网络,当然sniffer也用于有线网络(看网上说wireshark也可以抓无线的)

foren6则专用于分析6Lowpan协议的工具

You can also use Cooja (Network Simulator) to analyze an network. In Cooja use "Radio Message with a 6LoWPAN analyzer with pcap export" to store the packet capture in pcap format. Thus you can then use Wireshark or Foren6 to visualize the network and debug it.

1 0
原创粉丝点击