1. Prequisites

1.1. Required Software

Contents of this Package
Additional Packages needed

The captured frames will displayed with wireshark, which is available from http://www.wireshark.org/

../u5isniffer-lin-{version}
|-- index.html .............................. this file
|-- images
|   `-- *.png ............................... documentation graphics
|
|-- driver .................................. Patch instructions for Linux drivers
|   |-- ftdi245linux.html
|   |-- ftdi_sio_2.6.13-15-default.patch
|   `-- ftdi_sio_2.6.25.5-1.1-pae.patch
|
|-- firmware
|   |-- sniffer_psk*.hex .................... Atmel ATAVRRZ541
|   `-- sniffer_stb*.hex .................... DE Sensor Terminal Board
|
`-- sniffer
    |-- ieee802154.py  ...................... uracoli-wireshark bridge script
    `-- ...

1.2. Install the USB driver

The sniffer plattforms normally come with a branded FT245BM, which have vendor/product IDs, that differs from the default one.

Since some professional software presumes the branded VID/PID values, it is not always managable to reconfigure or unsolder the eeprom, which is connected to the FT245BM. Instead the use of a customized driver will be a better choice.

A detailed description how to get the driver working with modified VID/PID can be found in this document.

1.3. Flashing the firmware

In the directory firmware the hex files for different sniffer plattforms are stored.

With an ISP or JtagICE programmer this applications can be flashed in the AVR. The software is compiled using the 8MHz internal clock oscilator of the AVR, so the fuses have to be set to:

1.4. Install Wireshark

For your OS you will find the latest version of wireshark here http://www.wireshark.org/download.html.

2. Starting a Live Capture Session

2.1. Start the uracoli-wireshark bridge script

Start the uracoli-wireshark bridge by typing python sniffer/ieee802154.py in a terminal window.

images/snifferlx.png

Which serial port is assigned to the STB or STK541 board you can find out with the dmesg command:

usb 2-3.1: new full speed USB device using ehci_hcd and address 7
usb 2-3.1: configuration #1 chosen from 1 choice
ftdi_sio 2-3.1:1.0: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: Detected FT232RL
usb 2-3.1: FTDI USB Serial Device converter now attached to ttyUSB0
usb 2-3.1: New USB device found, idVendor=1cf1, idProduct=0001
usb 2-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-3.1: Product: SensorTerminalBoard
usb 2-3.1: Manufacturer: dresden elektronik
usb 2-3.1: SerialNumber: DEQA8EHL
Command line options

The program ieee802154.{py,exe} can be started with the following options.

   -p PORT     Name of the serial port where the sniffer plattform
               is connected, e.g. /dev/ttyUSB0 or COM1.
   -r CAPFILE  Name of a capture file which is read @c mytrace.dat.
   -i PIPE     Name of the named pipe.
                On a Linux system, PIPE can be a absolut path name, e.g.
                /tmp/ieee802154. On a Windows system PIPE is a name in a
                special pipe directory, e.g. foo maps to \\.\pipe\foo.
                [ieee802154]
   -c CHAN     IEEE802.15.4 channel number
   -R RATE     IEEE802.15.4 data rate
   -v          increase verbose level
   -h          show help and exit.
   -V          print version and exit.

  Note:
   * -r and -p can be used only exclusively,
   * -c works only with -p.
Interactive Commands
   reopen   - reopens the named pipe and places a pcap header,
              so that wireshark can reconnect.
   chan <n> - set new channel to sniff.
   rate <r> - set IEEE 802.15.4 data rate (e.g. BPSK20, OQPSK100, ...)
   devrst   - reinitialize the sniffer device
   debug    - start python debugger
   info     - show status of sniffer DEVIN
   quit     - end session and terminate all threads
   help     - show command help

2.2. Start wireshark

If wireshark is running, select in the menu Capture/Options or just type Ctrl-K, enter the/path/to/ieee802154 in the Interface field and confirm the dialog with START

Alternatively you can create a batch file/shell script, which starts wireshark directly with the option -i ieee802154.

images/wsrun.png

2.3. Closing and Reopening a Session

If you want to save a packet capture logfile, you have to close the current session by selecting "Capture→Stop" or "Ctrl-E". After "Capture→Start", the wireshark window stays gray shaded. Switch to the ieee802154.{exe,py} window and type reopen. This will place the data of a pcap file header in the named pipe and will allow wireshark to proceed with the frame capturing.

2.4. Changing Channels and Modulation in a Capture Session

In the ieee802154.{exe,py} you can change channel (chan) and rate/modulation (rate) of the transceiver at any time without restarting the wireshark session. NOTE: In the wireshark logfile there is no information about the channel or rate/modulation setting stored.

3. Further Reading

3.1. Trouble Shooting

Error ieee802154.exe: serial.serialutil.SerialException: could not open port

This problem occurs on Windows systems, if the serial port is opened by another programm. To resolve this, close the other application, which has the port opened.

Error ieee802154.exe: AttributeError: PortIn instance has no attribute tscale

This problem occurs in the following cases:

There are no frames of my nodes captured in wireshark

Check in the ieee802154.{py,exe} window, if the channel and rate (modulation) is set correctly, use the commands info, channel, rate.

3.3. Licenses

Wireshark® is available under the GNU General Public License version 2. http://www.wireshark.org/about.html

µracoli (firmware and converter application) is licensed with a Modified BSD License. http://uracoli.nongnu.org/license.html

Driver for FT245BM is (c) 2000-2008 FTDI Ltd. http://www.ftdichip.com/