BastilleResearch / mousejack

MouseJack device discovery and research tools
GNU General Public License v3.0
1.28k stars 254 forks source link

need to reseat or reboot after cancelling out #26

Open mastre opened 8 years ago

mastre commented 8 years ago

Hey Marc,

Invoking the scanner on Raspbian ARM seems to work, but after I Ctrl-C out the next time I try to run the scanner I get what's seen below, a state I can only clear by either reseating the USB device or rebooting -- is there a better/easier way? Is there a graceful way to end a scan instead of ^C?

~/git/mousejack/nrf-research-firmware$ sudo ./tools/nrf24-scanner.py -c 2
Traceback (most recent call last):
  File "./tools/nrf24-scanner.py", line 35, in <module>
    common.radio.enter_promiscuous_mode(prefix_address)
  File "/home/duke/git/mousejack/nrf-research-firmware/tools/lib/nrf24.py", line 76, in enter_promiscuous_mode
    self.dongle.read(0x81, 64, timeout=nrf24.usb_timeout)
  File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 988, in read
    self.__get_timeout(timeout))
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 833, in bulk_read
    timeout)
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 936, in __read
    _check(retval)
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 595, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 110] Operation timed out
mepher commented 8 years ago

This might help, as a dirty work around;

http://unix.stackexchange.com/questions/234581/disconnect-and-reconnect-usb-port-via-cli

some c that reset the usb port. works most of the time (on a debian VM too).