How to communicate via USB "port"

R

robinp.la

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
 
P

Paul McGuire

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
 
G

Grant Edwards

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.
 
T

Tim Roberts

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top