====== Zigbee Sniffer mit Texas Instruments CC2531 ====== ===== Vorbereitungen auf dem Raspberry Pi mit Rasbian Buster ===== Die Instruktionen sind auf den folgenden zwei Seiten zu finden * https://www.zigbee2mqtt.io/information/flashing_the_cc2531.html * https://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html Wie so oft, begegnen einem kleinere Fehlermeldungen - daher notiere ich hier welche Pakete ich installiert habe. sudo apt install dh-autoreconf libusb-1.0-0-dev libboost-all-dev sudo apt install p7zip-full sudo apt install libusb-1.0 # Dies war noetig, da ich vom CC-Tool den Hinweis bekam dass # es libusb-1xx nicht findet: # libusb-1.0-0 is already the newest version (2:1.0.22-2). # libusb-1.0-0 set to manually installed. CC-Tool git clone https://github.com/dashesy/cc-tool.git cd cc-tool/ ./bootstrap ./configure make CXX src/main.o CXX src/application/cc_flasher.o CXX src/application/cc_base.o CXX src/common/log.o CXX src/common/common.o CXX src/common/timer.o CXX src/usb/usb_device.o CXX src/data/binary_file.o CXX src/data/data_section.o CXX src/data/data_section_store.o CXX src/data/file.o CXX src/data/hex_file.o CXX src/data/read_target.o CXX src/data/progress_watcher.o CXX src/programmer/cc_253x_254x.o CXX src/programmer/cc_251x_111x.o CXX src/programmer/cc_243x.o CXX src/programmer/cc_programmer.o CXX src/programmer/cc_unit_driver.o CXX src/programmer/cc_unit_info.o CXXLD cc-tool prüfen #1 checking for LIBUSB... no configure: error: Package requirements (libusb-1.0 >= 1.0.0) were not met: No package 'libusb-1.0' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. prüfen #2 ./configure checking for the toolset name used by Boost for g++... configure: WARNING: could not figure out which toolset name to use for g++ TI-Installer auspacken um an **sniffer_fw_cc2531.hex** zu kommen: https://www.ti.com/tool/PACKET-SNIFFER#downloads 7z e Setup_SmartRF_Packet_Sniffer_2.18.0.exe Flashen der Firmware auf USB-Stick Für diesen Schritt werden der TI-CC-Debugger & der USB-Stick **beide** per USB angeschlossen! sudo ./cc-tool -e -w ../PACKET-SNIFFER/sniffer_fw_cc2531.hex Programmer: CC Debugger Target: CC2531 Erasing flash... Completed Writing flash (8 KB)... Completed (0.68 s.) curl -L https://github.com/homewsn/whsniff/archive/v1.3.tar.gz | tar zx cd whsniff-1.3make mkdir -p obj cc -c src/whsniff.c -o obj/whsniff.o -I. cc -o whsniff obj/whsniff.o -lusb-1.0 -lrt/ sudo make install install -d -m 755 "/usr/local/bin" install -m 755 whsniff "/usr/local/bin/" Zugriffsproblem lösen sudo chmod 755 /usr/bin/dumpcap prüfen ob man den TI Stick sieht - sonst ist evtl. noch der Debugger dran? Dann muss das Kabel abgezogen werden (wenn der Debugger nicht mehr eingesteckt ist) - sonst leuchtet die LED am TI Stick auch nicht pi@powerpi:~ $ lsusb ... Bus 001 Device 012: ID 0451:16ae Texas Instruments, Inc. ... sudo whsniff -c 11 | wireshark -k -i - Standardmäßig kommt OV/Stellar für Assa Abloy mit PAN-ID 27104 Für Ikea Tradfri stellen wir dies auf 6754 um {{ ::zigbee.zip |}}