Subject: Re: Trying to use the USB ugen device with a Handspring Visor
To: Ken Hornstein <>
From: Lennart Augustsson <>
List: current-users
Date: 12/23/1999 00:21:51
Ken Hornstein wrote:

> >This will never work.  You can only do ioctl() on the control device.
> Ah, okay, understood :-)
> >>  How are endpoints assigned?).
> >
> >Endpoints are assigned by the manufacturer of the device.  Have you
> >read ugen(4)?
> I did, several times, but it wasn't completely clear what we had to do
> from a programming standpoint.

Well, the man page is not a USB tutorial...  So, admittedly, it is very difficult
to know how to use the device from just reading the man page.

> I'm one of those strange people who like running stable releases ... I
> did say earlier that I was running 1.4.1, but it was easy to miss :-)

I missed it. :)
Well, several bugs relating to ugen have been fixed since 1.4 so I wouldn't
count on getting it working without using -current.  These fixes will not
be back ported to the 1.4 branch (at least not my be), because there are
simply to many changes involved.

> >Yes, you are.  You cannot read()/write() on the control endpoint.  To know
> >what to do you really need to get the protocol spec from the manufacturer
> >(good luck!).  Or make some very educated guesses.  If dare a guess I'd
> >say that the device probably has two bulk endpoints, one for each data
> >direction.
> Well ... I believe the protocol is the standard "Pilot" protocol, with just
> a thin layer to transport it over USB.  (The reason I think this?  Because
> you can buy a different cradle to use it with a serial port, and it works
> with the standard utilities).

You may still have to do some transactions on the control pipe to get things
started.  Or maybe all data is transferred via the control pipe.  You can never
know unless you have the specs, or a protocol analyzer.
But do tell me what the usbctl says about the device.

> >> - How come you can't open devices with O_RDWR?
> >
> >This is also something that should work in -current.
> Thanks!  I believe the -current ugen.4 man page hasn't been updated, though ...
> (or maybe I'm looking at an old -current).

The man page is wrong.  Thanks!


        -- Lennart