Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ccsniffpiper on linux #6

Open
xeonphi opened this issue Jul 10, 2015 · 9 comments
Open

ccsniffpiper on linux #6

xeonphi opened this issue Jul 10, 2015 · 9 comments

Comments

@xeonphi
Copy link

xeonphi commented Jul 10, 2015

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?

@gillesDD
Copy link

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 notifications@github.com:

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
#6.

@xeonphi
Copy link
Author

xeonphi commented Jul 10, 2015

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

@gillesDD
Copy link

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

@andrewdodd
Copy link
Owner

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!

@xeonphi
Copy link
Author

xeonphi commented Jul 10, 2015

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
Copy link
Author

xeonphi commented Jul 10, 2015

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

@XD-Andy
Copy link

XD-Andy commented Feb 28, 2017

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
Copy link

XD-Andy commented Feb 28, 2017

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.

@skandragon
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants