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-win-0.0.1
|   index.html .............................. this file
+---images
|       *.png ............................... documentation graphics
|
+---CDM 2.04.06 ............................. FTDI driver with modified inf files
|       ftdibus.inf
|       ftdiport.inf
|       ...
|
+---firmware
|       sniffer_psk*.hex .................... Atmel ATAVRRZ541
|       sniffer_stb*.hex .................... DE Sensor Terminal Board
|
+---sniffer
    +---bin
    |      ieee802154.exe .................. uracoli-wireshark bridge script
    |      ...                               (after py2exe conversion)
    +---src
            ieee802154.py ................... pythons source code
            ...                               (requires packages pyserial and pywin32)

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.

When the sensor terminal board is connected for the first time, the hardware assistent is started. As driver installation directory use the directory "CDM 2.04.06" in this package. Since the *.inf files for this driver are updated with other VID/PID combinations, the WHQL certificate is invalid and you have to confirm the installation of a driver with a broken signature.

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

The uracoli-wireshark bridge script will be started by clicking on the program icon ieee802154.exe in the folder sniffer. Since there are no command line options passed to the programm, you get prompted to enter the serial port, where the sniffer plattform is connected. You can get this information from the hardware manager. The program 802154.{py,exe} runs in a text window, where you can type commands. Type help to view a list of the available commands.

images/sniffer.png Sensor Terminal Board in Hardware Manager

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 \\.\pipe\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/wscfg.png

Now capture can be started by clicking this icon:

images/wsstart.png 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/