Author Topic: Usb Keyboard Howto?  (Read 5110 times)

egw

  • Newbie
  • *
  • Posts: 17
    • View Profile
Usb Keyboard Howto?
« on: March 28, 2005, 06:50:44 pm »
Hi,

So I got a mini-A USB adapter and now I'm trying to get my (generic) USB keyboard to work with the Zaurus (c3k, stock.)  I've done

  insmod usbcore
  insmod usbkbd

but when I plug the keyboard in, nothing happens.  There's no movement in dmesg or anything.

  bash-2.05# lsmod
  Module                  Size  Used by
  usbkbd                  2976   0  (unused)
  usbcore                63264   0  [usbkbd]
  usb-monitor             6496   0
  sharp_mmcsd_m          41008   1
  squashfs               31344   1  (autoclean)
  prism2_cs              69584   1
  p80211                 18864   1  [prism2_cs]

anyone know what might be wrong?

Thanks,
Eric

DreamTheater

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • http://
Usb Keyboard Howto?
« Reply #1 on: March 28, 2005, 09:56:25 pm »
Hello egw,

Are you sure you got mini-A cable? not a mini-B?
You don't need to do any insmod to work with USB keyboard, they will be automatically loaded.  What 'lsusb -v' command says?

dvgnx

  • Newbie
  • *
  • Posts: 3
    • View Profile
Usb Keyboard Howto?
« Reply #2 on: March 30, 2005, 04:19:00 am »
hi,
I tried with a qwerty keyboard : everything ok

But I want a azerty keyboard, what i have to do ?

thanks

egw

  • Newbie
  • *
  • Posts: 17
    • View Profile
Usb Keyboard Howto?
« Reply #3 on: April 03, 2005, 05:06:58 am »
Quote
Hello egw,

Are you sure you got mini-A cable? not a mini-B?
You don't need to do any insmod to work with USB keyboard, they will be automatically loaded.  What 'lsusb -v' command says?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=72590\"][{POST_SNAPBACK}][/a][/div]

Hi DreamTheater,

Ya, it's mini-A on one side and A-receptacle (female) on the other.

It's strange.  I get an error when with lsusb

  bash-2.05$ lsusb -v
  cannot open /proc/bus/usb, No such file or directory (2)

The error goes away (replaced with no output) when I "insmod usbcore".

Do you have to use a specific type of keyboard?  I'm using a regular full-sized usb keyboard.  The sticker on the back of the keyboard says it needs 5V @ 100mA -- perhaps that's the problem?

Eric

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Usb Keyboard Howto?
« Reply #4 on: April 03, 2005, 07:17:02 am »
Firstly try plugging in the offending keyboard and issue from a root login...

modprobe usbkbd

If that brings the keyboard to life then tell me what the contents of /proc/bus/usb/devices is.

...actually tell me what the contents of that file is when the keyboard is plugged in even if it doesn't work.

- Andy
« Last Edit: April 03, 2005, 07:22:02 am by iamasmith »
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

egw

  • Newbie
  • *
  • Posts: 17
    • View Profile
Usb Keyboard Howto?
« Reply #5 on: April 03, 2005, 12:31:48 pm »
Quote
Firstly try plugging in the offending keyboard and issue from a root login...

modprobe usbkbd

If that brings the keyboard to life then tell me what the contents of /proc/bus/usb/devices is.

...actually tell me what the contents of that file is when the keyboard is plugged in even if it doesn't work.

- Andy
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

Hi Andy,

When I type in 'modprobe usbkb', both usbkbd and usbcore show up in 'lsmod', but there's nothing (no files at all) in the /proc/bus/usb/ directory.

Code: [Select]
bash-2.05# modprobe usbkbd
bash-2.05# lsmod
Module                  Size  Used by
usbkbd                  2976   0  (unused)
usbcore                63264   0  [usbkbd]
...
usbdcore               35504   0  [pxa_bi storage_fd]
usbdmonitor             5488   0
usb-monitor             6496   0
...
bash-2.05# ls -la /proc/bus/usb/
dr-xr-xr-x    2 root     root            0 Apr  3 09:07 .
dr-xr-xr-x    4 root     root            0 Apr  3 09:07 ..
bash-2.05# cat /proc/bus/usb/devices
cat: /proc/bus/usb/devices: No such file or directory
bash-2.05# uname -a
Linux zaurus 2.4.20 #1 Thu, 28 Oct 2004 09:59:43 +0900 armv5tel unknown

Maybe it's the wrong sort of adapter, even though everything fits physically.  I got it from a '[a href=\"http://www.samsclub.com/eclub/main_shopping.jsp?mt=a&n=0&coe=0&oidPath=0%3A-23542%3A-33761%3A-33775%3A-33777%3A887124]universal usb cable kit[/url]' I got at Target (which was significantly more than the Sam's Club price.)   Maybe the iriver cable would work better.

Does it look lik anything to you?

Thanks,
Eric

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Usb Keyboard Howto?
« Reply #6 on: April 03, 2005, 12:39:14 pm »
Sounds like it.

I got an adapter from Maplins that had the right genders but just didn't work.

If you have nothing in /proc/bus/usb then you are off to a bad start. I think you need a different cable.

- Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

egw

  • Newbie
  • *
  • Posts: 17
    • View Profile
Usb Keyboard Howto?
« Reply #7 on: April 05, 2005, 08:31:39 pm »
Quote
Sounds like it.

I got an adapter from Maplins that had the right genders but just didn't work.

If you have nothing in /proc/bus/usb then you are off to a bad start. I think you need a different cable.

- Andy
[div align=\"right\"][a href=\"index.php?act=findpost&pid=73374\"][{POST_SNAPBACK}][/a][/div]

Ya, that was it exactly.  I got the iRiver cable and now it works fine (well, except for the keyboard mapping -- any hints ?  Or is keyhelper the way to go?)

Anyhow, thanks for all of your help!

Eric

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Usb Keyboard Howto?
« Reply #8 on: April 06, 2005, 08:33:23 am »
Quote
Quote
Sounds like it.

I got an adapter from Maplins that had the right genders but just didn't work.

If you have nothing in /proc/bus/usb then you are off to a bad start. I think you need a different cable.

- Andy
[div align=\"right\"][a href=\"index.php?act=findpost&pid=73374\"][{POST_SNAPBACK}][/a][/div]

Ya, that was it exactly.  I got the iRiver cable and now it works fine (well, except for the keyboard mapping -- any hints ?  Or is keyhelper the way to go?)

Anyhow, thanks for all of your help!

Eric
[div align=\"right\"][a href=\"index.php?act=findpost&pid=73695\"][{POST_SNAPBACK}][/a][/div]

OK, now for the tough bit.. and I'm afraid I'm not going to be able to help out on this one so if there are any competent French Kernel hackers out there please lend an ear.

KeyHelper is attached to the QT keyboard filter (part of QT not QPE) and doesn't seem to handle USB keyboards.. this may related to the fact that the keyboard device isn't present when Qtopia starts but I haven' tried that.. just tried a standard Keyhelper using a USB keyboard.

I think it's going to be necessary to do scancode translation in the usbkbd module of the Kernel to get your keyboard working properly

Sorry, don't have any real time to spend on this for a while.

- Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

DreamTheater

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • http://
Usb Keyboard Howto?
« Reply #9 on: April 06, 2005, 04:48:46 pm »
FYI Eric,

The lsusb error you posted in Post#4 is because of user permission.  If you become root, it should work fine.