469,140 Members | 1,211 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,140 developers. It's quick & easy.

How to communicate via USB "port"

Can someone explain how I would read the data from the USB "port"? I
don't know if it matters, but I am trying to read the data from a GPS
plugged in to the USB port.

Thank you,
Robin

Apr 18 '07 #1
4 19980
On Apr 18, 12:54 am, "robinp...@gmail.com" <robinp...@gmail.com>
wrote:
Can someone explain how I would read the data from the USB "port"? I
don't know if it matters, but I am trying to read the data from a GPS
plugged in to the USB port.

Thank you,
Robin
Just a guess, but can you use pyserial to talk to USB001?

-- Paul

Apr 18 '07 #2
On 2007-04-18, ro*******@gmail.com <ro*******@gmail.comwrote:
Can someone explain how I would read the data from the USB "port"?
You can't. There's no such thing from a SW point of view. ;)
I don't know if it matters, but I am trying to read the data
from a GPS plugged in to the USB port.
It's probably a serial device. Try using pyserial to talk to
/dev/ttyUSB0.

--
Grant Edwards grante Yow! Used staples are good
at with SOY SAUCE!
visi.com
Apr 18 '07 #3
jkn
Have a look for PyUSB - there are (confusingly) two different packages
called pyUSB. one interfaces to FTDI chips connected to a USB port:

http://bleyer.org/pyusb/

The other uses libusb to interface to devices generally under windows:

http://pyusb.berlios.de/
HTH
jon N

Apr 18 '07 #4
"ro*******@gmail.com" <ro*******@gmail.comwrote:
>
Can someone explain how I would read the data from the USB "port"? I
don't know if it matters, but I am trying to read the data from a GPS
plugged in to the USB port.
USB is a "protocol" bus. It isn't like a serial port, where you can just
start reading bits. Each device has one or more "interfaces", and each
interface has one or more "pipe" for transmitting data. You have to know
which "pipe" to talk to, what kind of pipe it is, and how to force the
device to send before you can talk to it.

On the other hand, as someone else pointed out, many types of USB devices
fall into standard device classes, and the operating system supplies
drivers for those classes. If your GPS device is in the communication
class, you might be able to pretend it is a serial device.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Apr 19 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Jako Menkveld | last post: by
5 posts views Thread by EdgarBM | last post: by
3 posts views Thread by Oscar Thornell | last post: by
4 posts views Thread by Lloyd Dupont | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.