Subject: Re: OK, I give up. How do I use USB devices under NetBSD?
To: None <mw@blobulent.com>
From: SUNAGAWA Keiki <Keiki_SUNAGAWA@yokogawa.co.jp>
List: port-macppc
Date: 04/24/2001 15:20:52
Michael Wolfson <mw@blobulent.com> wrote:

Michael> At 5:09 PM +0900 4/17/01, SUNAGAWA Keiki wrote:

> How do you configure your OF settings of input/ouput
> device?

Michael> keyboard/screen

Ok, they're ADB/USB unified devices.

> And what is the model you use?  Just to set input device
> to "keyboard" which combines ADB/USB should work.

Michael> PowerBook (FireWire) with the original Open
Michael> Firmware version (2.3, latest is 4.1.8).  Perhaps
Michael> updating would help?

Hmm, my experience of USB architecture is only on iBook and
iMac which have OF version 3, so I have no idea here.
Updating firmware would fix the device handling problem, but
be sure that it doesn't come compatibility issue recently
reported by several media before doing.

Michael> I've never had the iMate USB keyboard work in Open
Michael> Firmware, only the internal ADB keyboard.
Michael> Actually, I just tried an Apple USB keyboard and it
Michael> works!

Michael> In Open Firmware, both the internal ADB keyboard
Michael> and the USB keyboard work.  Once NetBSD starts,
Michael> only the USB keyboard input is used.  With XF86 I
Michael> can specify either one as input device.

Connecting iMate and boot the machine into OF, dev-ing to
usb keyboard device, then set the path to input-device.  If
it works as well as Apple USB keybaord, it just work under
NetBSD.  Please note that if you set input-device to ohter
than 'keyboard' e.g. adb-keyboard, USB/ADB unification of OF 
doesn't work.

Michael> In any case neither one produces the proper delete
Michael> character.  Does anyone know how to get XF86 to use
Michael> the delete key as delete with either the internal
Michael> ADB keyboard or an USB keyboard?

If the delete key generates a raw key code, xmodmap should
do the trick.  I heard that the keymap of the USB keyboard
is different from the PS/2 one and there is a related PR to
fix it.  I don't recall if it's already incorporated though.

Michael> As to mice, I can indeed use XF86Config to specify
Michael> which one is the input.  Any suggestions on how to
Michael> program the scroll wheel in XF86?

Does macppc XFree86 server support wheel?  Doing 'cat
/dev/wsmouse0|od' and scrolling wheel generates some output?

> Well, unplugging USB conecter losts keyboard/mouse on my
> machine, too.  I heard that connecting USB devices via USB
> hub might solve this, but I have no USB hub, so I can't
> check if this is true.

Michael> I tried that and it didn't help any.  My guess at
Michael> this point is that for some reason NetBSD doesn't
Michael> like the iMate.  Does anyone have any suggestions
Michael> on how to get it working?  Again, the iMate is an
Michael> USB device with an ADB plug so you can use your
Michael> legacy ADB keyboards and mice.  It's recognized by
Michael> the NetBSD kernel as a USB keyboard and mouse, even
Michael> if no ADB devices are plugged into it.

Ok, they appear as USB devices in dmesg, which is desired.
How is the mouse recognized, e.g. wsmouse0 or wsmouse1?

Michael> Since I don't actually own any USB keyboards, I'd
Michael> really like to get it working.

Michael> How do I get Xmacppc *and* Xfree86 to recognize the
Michael> USB keyboard/mouse?

> USB keyboard/mouse is useable once the above problem is
> fixed.  My /etc/XF86Config for iBook is available from
> here.  http://frill.yi.org/~kei/NetBSD/XF86Config

Michael> OK, thanks!  Any idea how to use them with Xmacppc
Michael> (since XF86 doesn't support a lot of the older
Michael> machines yet)?

IIRC, there's no easy way with the old server.  wsmux should
dispatch the event of multiple devices, but it didn't work.
We should modify the server's source code to specify the
prefered device.

Michael> Any ideas how to use the serial devices
Michael> (modem/serial port adapter)?  I *really* want to be
Michael> able to use NetBSD as my router using the ricochet
Michael> modem.

Tsubai-san used the serial adapter replacing with internal
modem.  Some USB-serial adaper is supported in other
architecuters, but no one tested it yet on macppc.

--
SUNAGAWA Keiki <Keiki_SUNAGAWA@yokogawa.co.jp>