nccgroup / Sniffle

A sniffer for Bluetooth 5 and 4.x LE
https://www.nccgroup.trust/us/our-research/sniffle-a-sniffer-for-bluetooth-5/?research=Public+tools
GNU General Public License v3.0
852 stars 127 forks source link

(device disconnected or multiple access on port?) #89

Closed cornpo closed 2 months ago

cornpo commented 2 months ago

The following happens quite often under Manjaro and (Ubuntu) DragonOS. I've tried lsof | grep /dev/tty. which returns no results. The hardware is ZBDongle-P 1.10.0 flashed with this fork (https://github.com/sultanqasim/cc2538-bsl). It's the 1M marked firmware with no changes to sniffle_hw.py and confirmed (n) marked 2M serial.

Quirks; I can't seem to get into the bootloader by holding the button/putty||screen. Terminal draws trash, occasionally closes itself. It seem to only want to work immediately after plugging it in. I tried it plugged in directly, thru 5' extension, and finally new Sabrent powered hub. I can get one dongle up sniffing, then do the drone spoof, then it detects, but crashes. I haven't set udev, but my groups are right and still can't figure out why I have to sudo.

Thanks for any help. And congrats, sniffle is amazing.

$ sudo python3 uart_test.py

success, len 144, latency 7.0 ms success, len 116, latency 6.5 ms success, len 150, latency 6.9 ms success, len 31, latency 3.4 ms success, len 213, latency 8.9 ms success, len 222, latency 9.5 ms success, len 169, latency 7.9 ms success, len 167, latency 7.9 ms success, len 198, latency 8.9 ms success, len 16, latency 2.9 ms FAILURE, receive timeout Traceback (most recent call last): File "/home/cornpop/cc2538-bsl/Sniffle/python_cli/sniffle/python_cli/uart_test.py", line 41, in main() File "/home/cornpop/cc2538-bsl/Sniffle/python_cli/sniffle/python_cli/uart_test.py", line 29, in main msg = hw.recv_and_decode() ^^^^^^^^^^^^^^^^^^^^ File "/home/cornpop/cc2538-bsl/Sniffle/python_cli/sniffle/python_cli/sniffle/sniffle_hw.py", line 362, in recv_and_decode mtype, mbody, msg = self._recv_msg(desync) ^^^^^^^^^^^^^^^^^^^^^^ File "/home/cornpop/cc2538-bsl/Sniffle/python_cli/sniffle/python_cli/sniffle/sniffle_hw.py", line 335, in _recv_msg pkt += self.ser.read((word_cnt - 1) * 4) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/serial/serialposix.py", line 595, in read raise SerialException( serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

dmesg output;

[ 6845.417495] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0 [ 6845.417577] cp210x 1-1:1.0: device disconnected [ 6850.483014] usb 1-1: new full-speed USB device number 8 using xhci_hcd [ 6850.871806] usb 1-1: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00 [ 6850.871813] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 6850.871816] usb 1-1: Product: Sonoff Zigbee 3.0 USB Dongle Plus [ 6850.871820] usb 1-1: Manufacturer: ITead [ 6850.871823] usb 1-1: SerialNumber: c62e420821a6ed11a79eeba32981d5c7 [ 6850.887623] cp210x 1-1:1.0: cp210x converter detected [ 6850.907839] usb 1-1: cp210x converter now attached to ttyUSB0 [ 6851.677005] pps pps0: new PPS source usbserial0 [ 6851.677020] pps pps0: source "/dev/ttyUSB0" added

cornpo commented 2 months ago

The problem was I had gpsd starting as a service looking for /dev/ttyUSB0