1.1. Required Software
Contents of this Package
-
a customized version of the FT245BM CDM driver, which honors
the special vendor and product IDs of STK541 and STB.
-
the AVR-wireshark interface programm ieee802154.{py,exe}
-
the sniffer firmware for different plattforms sniffer_{platform,radio}.hex
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.
-
FTDI: VID 0x0403, PID 0x6001, 0x6010,
-
Atmel: VID 0x03EB, PID 0x2109
-
Dresden Elektronik: VID 0x1CF1, PID 0x0001
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.
-
sniffer_psk230.hex → STK w/ AT86RF230 Rev.A RCB
-
sniffer_psk230b.hex → STK w/ AT86RF230 Rev.B RCB
-
sniffer_psk231.hex → STK w/ AT86RF231 RCB
-
sniffer_psk212.hex → STK w/ AT86RF212 RCB
-
sniffer_stb230.hex → STB w/ AT86RF230 Rev.A RCB
-
sniffer_stb230b.hex → STB w/ AT86RF230 Rev.B RCB
-
sniffer_stb231.hex → STB w/ AT86RF231 RCB
-
sniffer_stb212.hex → STB w/ AT86RF212 RCB
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:
-
LF: 0xe2 - 8MHz internal RC Osc.
-
HF: 0x11 - without boot loader
-
HF: 0x10 - with boot loader (in this case set LOCK: 0xef -→ protection of boot section)
-
EF: 0xff
1.4. Install Wireshark
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.
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.
Now capture can be started by clicking this icon:
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.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:
-
the RCB does not respond on the serial interface,
→ check wiring, connect a terminal and press the reset button in order
to see, if the platform is working.
-
the RCB is not programmed with the current sniffer firmware
→ programm the correct firmware hex file.in the RCB.
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.2. Links
3.3. Licenses