ccsniffpiper icon indicating copy to clipboard operation
ccsniffpiper copied to clipboard

ccsniffpiper on linux

Open xeonphi opened this issue 9 years ago • 9 comments

Hi! I have try to run ccsniffer on ubuntu but get this error:

Traceback (most recent call last): File "./ccsniffpiper.py", line 549, in snifferDev = CC2531(handlerDispatcher, args.channel) File "./ccsniffpiper.py", line 298, in init self.name = usb.util.get_string(self.dev, 256, 2) # get name from USB descriptor File "/usr/local/lib/python2.7/dist-packages/usb/util.py", line 328, in get_string raise ValueError("The device does not support the specified langid") ValueError: The device does not support the specified langid

Do have any ideas how to fix this?

xeonphi avatar Jul 10 '15 11:07 xeonphi

Hi, is lsusb gives you the following for the 2531 ?: Bus 002 Device 004: ID 0451:16ae Texas Instruments, Inc.

2015-07-10 13:36 GMT+02:00 xeonphi [email protected]:

Hi! I have try to run ccsniffer on ubuntu but get this error:

Traceback (most recent call last): File "./ccsniffpiper.py", line 549, in snifferDev = CC2531(handlerDispatcher, args.channel) File "./ccsniffpiper.py", line 298, in init self.name = usb.util.get_string(self.dev, 256, 2) # get name from USB descriptor File "/usr/local/lib/python2.7/dist-packages/usb/util.py", line 328, in get_string raise ValueError("The device does not support the specified langid") ValueError: The device does not support the specified langid

Do have any ideas how to fix this?

— Reply to this email directly or view it on GitHub https://github.com/andrewdodd/ccsniffpiper/issues/6.

gillesDD avatar Jul 10 '15 12:07 gillesDD

I got this from lsusb: Bus 007 Device 010: ID 0451:16ae Texas Instruments, Inc.

xeonphi avatar Jul 10 '15 13:07 xeonphi

Well, your device is connected. as far as I am concerned, I start ccs with sudo in my ubuntu VM and it works.

gillesDD avatar Jul 10 '15 14:07 gillesDD

Hi Guys,

To be honest, I haven't really touched this in a while. But plenty of people seem to be getting it to work.

I always used these tools with the CC2531EMK modules.

Unfortunately, I can't really help much here anyway, as I left the company I was doing this stuff for and don't have any CC2531EMKs in my possession.

Good luck!

andrewdodd avatar Jul 10 '15 14:07 andrewdodd

thanks you for your quick answers. GillesDD what version of python and ubuntu are you using? I did try with the sudo but still doesn't work.

xeonphi avatar Jul 10 '15 14:07 xeonphi

I put a static value for the device description as a workaround. It seems that pyusb wasn't able to retrieve it directly from the device. self.name = "TI CC2531" #usb.util.get_string(self.dev, 256, 2) # get name from USB descriptor

xeonphi avatar Jul 10 '15 22:07 xeonphi

Hi,

Old thread I know, but wanted to put my input in re macOS Sierra.

Thanks to XeonPhi's workaround, I've now got this working under MacOS.

Steps I had to go thru'

1: Install Homebrew (http://macappstore.org/libusb/) 2: Install Libusb (same url above) 3: Install python 2.7.13 (https://www.python.org/downloads/) 4: Install pyusb (from terminal 'sudo pip install pyusb'; PIP installed with python) 5: Download ccsniffpiper 6: Edit ccsniffpiper.py using IDLE (downloaded with python, in python application folder) to set static value as XeonPhi describes above 7: run ccsniffpiper via terminal; navigate to the ccsniffpiper folder via command line then enter 'sudo python ccsniffpiper' and press return 8: press 's' and return to start capture 9: open Wireshark 10: follow instructions on ccsniffpiper cover page here at GitHub, as provided by author, to set the IEEE802.15.4 protocol preferences and to point Wireshark at the 'pipe' from ccsniffpiper 11: start capture in Wireshark

XD-Andy avatar Feb 28 '17 14:02 XD-Andy

And ..... !

Have gotten it running in Kali Linux on a Raspberry Pi 3, doing pretty much the above, minus the 'homebrew' but needed to install python, libusb, python-pip, pyusb, and edit the ccsniffpiper.py file as XeonPhi suggests (which meant installing idle, which is not installed with python 2.7.13 .... but

need to launch Wireshark from terminal as follows

wireshark -k -i /tmp/ccsniffpiper &

Don;t know if 'sudo' is needed or not, but I've just done it with sudo.

XD-Andy avatar Feb 28 '17 21:02 XD-Andy

I also have the same issue. Perhaps a try/catch block to set the default if it's not working?

skandragon avatar May 16 '18 23:05 skandragon