Subject: Trying to use the USB ugen device with a Handspring Visor
To: None <email@example.com>
From: Ken Hornstein <firstname.lastname@example.org>
Date: 12/22/1999 16:02:42
A coworker brought in a new Handspring Visor to work today. For those
of you not familar with it, it's a Pilot clone, but the cradle is USB
(you can get a serial cradle as well, but he didn't have one).
We were curious if it would work under NetBSD, so we plugged it into
my laptop which is running 1.4.1. It turns out this behaves a bit odd ...
it doesn't show up as a USB device until you hit the "sync" button
on the cradle. Once you do that, it shows right up, and it's attached
as a "ugen" device (which makes sense).
I knew that the Visor worked fine with the pilot-link tools with the serial
cradle, so I theorized that the protocol was just the same, just being
run over USB. So I hacked on pilot-xfer a small bit to remove the calls
to set the termios parameters and tried pointing pilot-xfer at
/dev/ugen0.00 (BTW, maybe this is a USB thing .... but I don't understand
why there are 16 devices for each ugen device .... I guess it's one
device per endpoint? How are endpoints assigned?).
Anyway, once I did that, I got a whole lot of messages of the form:
ugenread: no edesc
ugenwrite: no edesc
peeking into the kernel shows me that this is because there is no "endpoint
descriptor" for this particular device node. But it's not clear to me
how an endpoint descriptor gets created in the first place.
So, I'm wondering:
- Am I doing things wrong from a programming standpoint? Probably,
but what else do I need to do?
- How come you can't open devices with O_RDWR?