Subject: Re: Trying to use the USB ugen device with a Handspring Visor
To: Lennart Augustsson <lennart@augustsson.net>
From: Ken Hornstein <kenh@cmf.nrl.navy.mil>
List: current-users
Date: 12/23/1999 00:39:24
>> 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.

Not a huge problem.  I did notice that playing around with the different
endpoints got us quite a few number of panics, and I figured that
many of them were fixed in -current :-)

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

"Ask, and ye shall receive".  Here you go (actually, I think this is
from ugendev, but it's the same output format):

DEVICE descriptor:
bLength=18 bDescriptorType=1 bcdUSB=1.00 bDeviceClass=0 bDeviceSubClass=0
bDeviceProtocol=0 bMaxPacketSize=16
idVendor=0x082d idProduct=0x0100 bcdDevice=100
iManufacturer=1 iProduct=2 iSerialNumber=0 bNumConfigurations=1

Current configuration is number 1

CONFIGURATION descriptor index 0:
bLength=9 bDescriptorType=2 wTotalLength=46 bNumInterface=1
bConfigurationValue=1 iConfiguration=0 bmAttributes=c0 bMaxPower=2 mA

  INTERFACE descriptor index 0, alt index 0:
  bLength=9 bDescriptorType=4 bInterfaceNumber=0 bAlternateSetting=0
  bNumEndpoints=4 bInterfaceClass=255 bInterfaceSubClass=0
  bInterfaceProtocol=0 iInterface=0

    ENDPOINT descriptor index 0:
    bLength=7 bDescriptorType=5 bEndpointAddress=1-in
    bmAttributes=2 wMaxPacketSize=16 bInterval=10

    ENDPOINT descriptor index 1:
    bLength=7 bDescriptorType=5 bEndpointAddress=1-out
    bmAttributes=2 wMaxPacketSize=16 bInterval=0

    ENDPOINT descriptor index 2:
    bLength=7 bDescriptorType=5 bEndpointAddress=2-in
    bmAttributes=2 wMaxPacketSize=64 bInterval=0

    ENDPOINT descriptor index 3:
    bLength=7 bDescriptorType=5 bEndpointAddress=2-out
    bmAttributes=2 wMaxPacketSize=64 bInterval=0

As I read this, there are four endpoints: two at address "1", and two
at address "2", with input and output versions for both addresses.

At the very least, I think we can now phrase some intelligent
questions to the Handspring folks, but I think it might have to
wait until either I or my co-worker upgrades to -current.

Oh, just in case y'all were curious: I hacked up pilot-xfer to open
the device twice (once for reading, once for writing) and pointed
it at both of the endpoints.  In both cases it never seemed to get
any data (I believe that for address one, it just hung, and for
address two it returned a series of EIOs), and when the sync finally
timed out on the pilot, the laptop panic()'d.

--Ken