Subject: Re: Trying to use the USB ugen device with a Handspring Visor
To: Lennart Augustsson <>
From: Ken Hornstein <>
List: current-users
Date: 12/22/1999 17:58:39
>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.

>If you want to know what endpoints your device has
>you should run the usbctl program from the usbutil package.

Ahhhh .... I had forgotten about the usbutil package!  I didn't see
anything about the endpoint information from usbdevs.

>> ugenread: no edesc
>> ugenwrite: no edesc
>This is a kernel bug, you should never get these messages.  You should not
>have been able to get that far in the code.  Are you not running -current?
>I thought I fixed this bug about a month ago.

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 :-)

>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

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

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