-
-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
This guide will help you set up Zigbee Analyzer and perform your first packet capture.
- Operating System: Linux, macOS, or Windows
- Rust: 1.70 or newer
- USB: Working USB port for hardware adapter
- Permissions: USB device access (may require udev rules on Linux)
You need at least one supported Zigbee adapter:
- TI CC2531 USB Dongle (recommended for beginners)
- TI CC2652R/P (more advanced features)
- See Hardware Support for complete list
If you don't have Rust installed:
# Linux/macOS
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Windows
# Download from: https://rustup.rs/Verify installation:
rustc --version
cargo --versiongit clone https://github.com/yourusername/zigbee-analyzer.git
cd zigbee-analyzer# Build all crates
cargo build --release
# This may take a few minutes on first buildCreate a udev rule for your adapter:
# For TI CC2531
sudo tee /etc/udev/rules.d/99-zigbee.rules << EOF
# TI CC2531
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="16ae", MODE="0666"
# TI CC2652R
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="16c8", MODE="0666"
# TI CC2652P
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="16c9", MODE="0666"
EOF
# Reload rules
sudo udevadm control --reload-rules
sudo udevadm trigger
# Unplug and replug your deviceThe CC2531/CC2652 should work with Windows' built-in USB serial drivers. If you have issues:
- Download [Zadig](https://zadig.akeo.ie/)
- Select your device
- Install WinUSB driver
Should work out of the box. If you have permission issues:
# Check device
system_profiler SPUSBDataType | grep -A 10 "CC25"cargo run --release -- --list-devicesExpected output:
Scanning for Zigbee devices...
Found 1 device(s):
✓ TI CC2531 USB Dongle (0451:16ae) on /dev/ttyACM0
Run the basic capture example:
cargo run --example simple_captureYou should see:
Zigbee Analyzer - Simple Capture Example
==========================================
Found 1 device(s):
- TI CC2531 USB Dongle (0451:16ae)
Initializing TI CC2531 USB Dongle...
Device initialized successfully!
Device Capabilities:
Packet injection: false
Promiscuous mode: true
Supported channels: [11, 12, 13, ..., 26]
Max sample rate: 1000 packets/sec
Setting channel to 11...
Capturing packets (press Ctrl+C to stop)...
Packet #1
Channel: 11
RSSI: -65 dBm
LQI: 180
Length: 23 bytes
Frame Type: Data
Src: 0x1234
Dst: 0xFFFF
...
Capture packets and save to Wireshark-compatible format:
# Record for 60 seconds
cargo run --example pcap_record -- capture.pcap 60Open in Wireshark:
wireshark capture.pcapLaunch the interactive terminal interface:
cargo run --releaseNavigation:
-
Tab- Switch between views -
Space- Start/stop capture -
C- Change channel -
S- Save to PCAP -
Q- Quit
# Set channel to match your network (usually 11, 15, 20, or 25)
cargo run --release -- --channel 15# Capture with detailed logging
RUST_LOG=debug cargo run --release# Record packets and analyze offline
cargo run --example pcap_record -- output.pcap 300
# Import into Wireshark or analyze with:
cargo run --example pcap_analyze -- output.pcapLinux:
# Check if device is visible
lsusb | grep 0451
# Check permissions
ls -la /dev/ttyACM0
# Reload udev rules
sudo udevadm control --reload-rules
sudo udevadm triggerWindows:
# List COM ports
modeLinux:
# Add your user to dialout group
sudo usermod -a -G dialout $USER
# Log out and back in, then verify:
groups- Check channel: Make sure you're on the right channel (11-26)
- Device proximity: Get closer to Zigbee devices
- Network activity: Ensure there's actually traffic (try pairing a device)
-
Hardware: Verify with
--list-devicesthat hardware is detected
# Clean and rebuild
cargo clean
cargo build --release
# Update dependencies
cargo update
# Check Rust version
rustc --version # Should be 1.70+Now that you have a working setup:
- Architecture - Understand the system design
- Protocol Documentation - Learn about Zigbee layers
- Examples - Try more advanced examples
- API Reference - Use the API in your own code
- Driver Development - Add support for new hardware
- [Zigbee Alliance Documentation](https://zigbeealliance.org/)
- [IEEE 802.15.4 Overview](https://standards.ieee.org/standard/802_15_4-2020.html)
- [Wireshark Zigbee Dissector](https://www.wireshark.org/docs/dfref/z/zbee.html)
Need help? Open an issue on [GitHub](https://github.com/yourusername/zigbee-analyzer/issues) or join our [Discussions](https://github.com/yourusername/zigbee-analyzer/discussions).