Subject: Re: corresponding callout device?
To: James Hartley <jjhartley@gmail.com>
From: Greg Troxel <gdt@ir.bbn.com>
List: netbsd-users
Date: 10/03/2007 16:47:58
"James Hartley" <jjhartley@gmail.com> writes:

> I'm apparently not understanding callout devices well enough.

No, that's not the problem :-)

> I would like to observe the NMEA sentence traffic generated by a USB
> GPS device.  When attached to a 4.0_RC1 system, I see the following
> messages on the console:
>
> uhidev0: DeLorme Publishing DeLorme USB Earthmate, rev 1.00/0.01, addr
> 4, icleass 3/0
> uhid0 at uhidev0: input=32, feature=5

> In looking at the manpage for uhid(4), I'm not seeing information on
> what is the corresponding device name which can be used with cu(1).
> Any clarification anyone can provide would be greatly appreciated.

uhid is about reading knobs, not about serial ports.  The earthmate
probably has several endpoints and one is probably serial.  So, the USB
code needs to figure this out and make the serial port available,
probably through ugensa.  We did that for a high-end GPS that had
serial-over-USB and was ugensa-compatible once we added the descriptor.

So, you might modify the USB code to not attach as uhid, and to use
ugensa, and see where you get with that.  The recent commit to exclude
APC UPSes from uhid would be helpful as an example.

I'd also look on the gpsd homepage and lists to see how they deal - I
think gpsd people use earthmates.  Or check out how OpenBSD deals with
this device; one of the gpsd authors is also an OpenBSD developer and it
wouldn't surprised me if this is already solved in OpenBSD, which would
make it much easier to fix here.

Things you should check out:

http://www.nabble.com/USB-GPS-on-NetBSD-t3678567.html

http://developer.berlios.de/projects/emul/

http://www.mp3car.com/vbulletin/gps/24211-usb-earthmate-patch-gpsd-support.html