Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Have any usb device

Bus 001 Device 002: ID 0c45:63e0 Microdia Sonix Integrated Webcam
Bus 005 Device 004: ID 045e:0745 Microsoft Corp. Nano Transceiver v1.0 for Bluetooth
Bus 005 Device 003: ID 04f2:0841 Chicony Electronics Co., Ltd 
Bus 002 Device 007: ID 0525:3424 Netchip Technology, Inc. 

and I need discovery path to device (Bus 002 Device 007) respond. I try send data to /dev/bus/usb/002/007 but is not configured.

Which port should I send my data to communicate with usb device??

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You can use PySerial to access USB ports. I've only used it for regular RS232 serial ports myself, but at least for that it's easy to use and it's even been ported to python3 if you're using that.

You won't use the bus path like you said in your text, but rather use /dev/ttyUSBx where x is the number of your USB port. It's rather common to just iterate through ports 0-255 with PySerial and then catch the exceptions for ports that don't exist. Not sure if you would get the text identifier though. Like I said, I've never used it for USB myself so can't help you much on that end.

share|improve this answer
    
In my list of tty's not have ttyUSB only have ttySx. But I'm not undestand relation with Bus 002 Device 007 and ttyX or ttySx. Have relation? –  Jones Jul 10 '12 at 18:18
    
If you don't have any /dev/ttyUSBx then you haven't installed the device drivers for your USB device, I guess. sudo modprobe usbserial vendor=0x0525 product=0xa4a6 That could be the command to get it, according to this page. –  GaRyu Jul 10 '12 at 18:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.