[TriLUG] USB communication

Brian McCullough via TriLUG trilug at trilug.org
Mon Oct 24 14:52:30 EDT 2016


Folks,

I am working on a new project, started last week, and am running into
some questions.

Not having much experience with USB hardware or the programming thereof,
I am likely not either asking the right questions or understanding what
I am finding.



I am attempting to create a sort of test rig, using my laptop, for a
device that has two USB ports.

One of the ports expects to have a WiFi dongle plugged in, attached to a
wireless mouse, and the other has a cable attached to a computer, acting
as the same wireless mouse to that computer.

What I would like to do is to plug a cable from the first port to a USB
port on my laptop, and a second cable from the second port to a second
port on the same laptop.

The goal is to send a signal to the "input" port and measure that signal
coming out of the "output" port. ( the codes that the mouse sends to the
computer )  

When I plug this device into my laptop, I do see the "output" port
appearing in lsusb, but not the "input" port.  I am obviously missing
something, and need some guidance which may include a primer on how to
make all of this work.

My intent was to use what I have read, in the way of documentation and
example code, to write a program in Python, using the PyUSB library, to
generate the "input" codes and read the "output" result, comparing them.

However, if I can't send the "input" codes to the device, that plan has
a small flaw.



Any suggestions, help, pointers to How-Tos?


Thanks,
Brian  ( the other one! )




More information about the TriLUG mailing list