homewsn / whsniff

Whsniff is a command line utility that interfaces TI CC2531 USB dongle with Wireshark for capturing and displaying IEEE 802.15.4 traffic at 2.4 GHz.
GNU General Public License v2.0
131 stars 33 forks source link

Issue on kali with CC2531 #16

Closed kurtjarvis closed 2 years ago

kurtjarvis commented 3 years ago

Attempting to use whsniff, it is stuck in the for loop looking for libusb_control_handle to return data. To preface, the hard-coded idProduct had to be changed to 0x16a8 for the CC2531 device. That enables it to find the hardware in the usb list. However, I put in some debugging statements and the "get identity check" above returns a "-9" which is an error but the code doesn't error-check that result and continues down. Any way I can fix this?

schasj commented 2 years ago

I just ran into the exact same issue with building from scratch on Arch Linux. I don't know any more about fixing it than the OP so it sure would be nice id @homewsn would address this.

schasj commented 2 years ago

I've dug a little deeper and found that, after setting the idProduct correctly, the for(;;) loop never exits at the comment "// check if powered up". It appears that libusb has to be built from source and NOT stripped for gdb to be of further use.

schasj commented 2 years ago

All the above is a red herring. This tool works as described, without modification, IF you flash the CC2531 with the proper code. That code is https://www.ti.com/lit/zip/swrc045 and I followed only the 3 instructions here https://xaviercovis.github.io/CC2531-flash-packet-sniffer/#flashingCC2531 in the section "Flashing the CC2531 stick..." and then proceeded with the cc-tool from https://github.com/dashesy/cc-tool.git to flash the extracted HEX file.

I recommend closing this issue.