Java Mailing List Archive

http://www.redhatconfig.com/

Home » Ubuntu Technical Support »

Re: Writing to a USB Device

Jonathan Hudson

2008-06-14

Replies: Find Java Web Hosting

Author LoginPost Reply
On Sat, 14 Jun 2008 15:23:02 -0600
Karl Larsen <k5di@(protected):

> John wrote:
> > Hi,
> >
> > I'm gathering the courage to write a program which controls an external
> > device via a USB port. The development and target operating systems are
> > Ubuntu 8.
> >
> > Are there any good books or web sites which would give me an idea of
> > what is involved?
> >
> > TIA
> >
> > J
> >
> > (Although couched as a general question, the external device is a Lenz
> > LVZ100 Model Railway controller!)
> >
> >
> >  
>   Well it should be a short book. To see what device your USB device
> is plugged into use $dmesg | tail and you see this:
>

Sadly, once again Karl chooses to pollute the NG with a load of
stuff that is not helpful to the OP .....

John, you have (at least) two choices, depending on the
programming language and your skills:

(a) Write a kernel device driver to interface to the controller, a
Google search for "linux device drivers" will find you excellent
references on the subject;

(b) Write a user-space application using libusb. A google search for
'libusb' will find you the documentation.

I would recommend the latter, which is what I used to to write w1retap,
<http://sourceforge.net/projects/w1retap/>, an application with gathers
data from one-wire weather stations via (inter alia), a USB device.

Unless you device is well documented, be prepared for a lot of hard
work reverse engineering the protocol.

-jh


--
ubuntu-users mailing list
ubuntu-users@(protected)
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
©2008 redhatconfig.com - Jax Systems, LLC, U.S.A.