BastilleResearch / mousejack

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

Several errors - "Operation timed out" and "Cannot find USB dongle" #14

Closed pavetheway closed 8 years ago

pavetheway commented 8 years ago

Sorry, hit enter and posted - adding issue text...

Installed as instructed

make

make install

Which gave me: Please unplug your dongle or breakout board and plug it back in.

So, I think everything was fine at that point. Then I tried running a tool and got the following:

./nrf24-scanner.py -v -c 1
[2016-03-25 17:58:57.431]  Using channels 1
Traceback (most recent call last):
  File "./nrf24-scanner.py", line 35, in <module>
    common.radio.enter_promiscuous_mode(prefix_address)
  File "/opt/mousejack/tools/lib/nrf24.py", line 69, 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

All other tools give "Operation timed out" as well. So, I tried a "make", and "make install" again. "Make" went fine, but "make install" gave me this:

make install
./prog/usb-flasher/usb-flash.py bin/dongle.bin
[2016-03-25 18:09:30.012]  Looking for a compatible device that can jump to the Nordic bootloader
[2016-03-25 18:09:30.036]  Device found, jumping to the Nordic bootloader
[2016-03-25 18:09:30.045]  Looking for a device running the Nordic bootloader
[2016-03-25 18:09:31.047]  No compatbile device found
Traceback (most recent call last):
  File "./prog/usb-flasher/usb-flash.py", line 90, in <module>
    raise Exception('No compatible device found.')
Exception: No compatible device found.
Makefile:25: recipe for target 'install' failed
make: *** [install] Error 1

And the output from running tools is now:

./tools/nrf24-scanner.py -c {1..5}
Traceback (most recent call last):
  File "./tools/nrf24-scanner.py", line 27, in <module>
    common.parse_and_init()
  File "/opt/mousejack/tools/lib/common.py", line 57, in parse_and_init
    radio = nrf24()
  File "/opt/mousejack/tools/lib/nrf24.py", line 64, in __init__
    raise Exception('Cannot find USB dongle.')
Exception: Cannot find USB dongle.

Any thoughts?

marcnewlin commented 8 years ago

Does the dongle populate correctly in lsusb? (I'm guessing this will be the case based on the output of the make install.)

It is possible that there is a permission issue. Does sudo make install run successfully?

If this does not work, then it will be worth trying the CrazyRadio firmware flashing utility. To use this, you might need to update the USB ID that it looks for from 1915:7777 to 1915:0102 depending on the current state of the dongle. This is a one line change here:

https://github.com/bitcraze/crazyradio-firmware/blob/master/usbtools/cradioFlasher.py#L207

Using the CrazyRadio flashing utility, you can select the compiled binary (bin/dongle.bin) and it will write it to the dongle.

Let me know how it works out!

pavetheway commented 8 years ago

Hi Marc. Sorry I let this issue die off. Just wanted to say that I was able to re-flash with the tool you linked. Thanks!

Can't wait for a proof of concept to come out! I have a wireless keyboard sitting around somewhere that I want to try it out on.