LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
LinkBack Search this Thread
Old 12-09-2010, 04:22 PM   #1
lqu
LQ Newbie
 
Registered: Aug 2009
Posts: 15

Rep: Reputation: 0
Question How to use USB keyboard on embedded Linux?


I need to connect a usb keyboard to W5300E01 board from wiznet. The problem is there's no device file in /dev or /dev/usb or /dev/input. I also rebuild the kernel to include all the USB related features (usb HID, input->keyboard), but still there are no device files in /dev.

However, I know the kernel recognizes the keyboard from reading the kmsg and /proc/bus/input/device.

==================================
Here is the output from /proc/bus/input/devices:
==================================
I: Bus=0003 Vendor=046d Product=c312 Version=0110
N: Name="LITEON Technology USB Multimedia Keyboard"
P: Phys=usb-s3c24xx-1/input0
S: Sysfs=/class/input/input0
U: Uniq=
H: Handlers=kbd event0 evbug
B: EV=120013
B: KEY=10000 7 ff9f207a c14057ff febeffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

=======================================
Here is the console output when I connect the usb keyboard:
=======================================
usb 1-1: new low speed USB device using s3c2410-ohci and address 3
usb 1-1: configuration #1 chosen from 1 choice
input: LITEON Technology USB Multimedia Keyboard as /class/input/input1
input,hidraw0: USB HID v1.10 Keyboard [LITEON Technology USB Multimedia Keyboard] on usb-s3c24xx-1
usb 1-1: Product: USB Multimedia Keyboard
usb 1-1: Manufacturer: LITEON Technology

Last edited by lqu; 12-09-2010 at 04:24 PM.
 
Old 12-10-2010, 02:17 AM   #2
cnxsoft
Member
 
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
You may need to create the devices:
1. manually with mknod OR
2. In device_tables.txt when you build the image OR
3. With udev or mdev.
 
Old 12-10-2010, 11:53 AM   #3
lqu
LQ Newbie
 
Registered: Aug 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Thank you for your reply. I am thinking to manually create dev nodes with mknod, which major number should I use? Here is my /proc/devices. Thanks.

Character devices:
1 mem
2 pty
3 ttyp
4 /dev/vc/0
4 tty
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
29 fb
90 mtd
128 ptm
136 pts
162 raw
166 ttyACM
180 usb
188 ttyUSB
189 usb_device
204 s3c2410_serial
252 hidraw
253 usb_endpoint
254 rtc

Block devices:
1 ramdisk
7 loop
31 mtdblock
43 nbd
179 mmc
180 ub


Quote:
Originally Posted by cnxsoft View Post
You may need to create the devices:
1. manually with mknod OR
2. In device_tables.txt when you build the image OR
3. With udev or mdev.
 
Old 12-11-2010, 12:09 AM   #4
cnxsoft
Member
 
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
The 1st column in /proc/devices is the major number
But I'm not really sure, which nodes you need for your devices. After a google search, I found some other people did the following for their USB Keyboard:

mkdir -p /dev/usb/hid
mknod /dev/usb/hid/hiddev0 c 180 96
mknod /dev/usb/hid/hiddev1 c 180 97
mknod /dev/usb/hid/hiddev2 c 180 98
mknod /dev/usb/hid/hiddev3 c 180 99
mknod /dev/usb/hid/hiddev4 c 180 100
mknod /dev/usb/hid/hiddev5 c 180 101
mknod /dev/usb/hid/hiddev6 c 180 102
mknod /dev/usb/hid/hiddev7 c 180 103
mknod /dev/usb/hid/hiddev8 c 180 104
mknod /dev/usb/hid/hiddev9 c 180 105
mknod /dev/usb/hid/hiddev10 c 180 106
mknod /dev/usb/hid/hiddev11 c 180 107
mknod /dev/usb/hid/hiddev12 c 180 108
mknod /dev/usb/hid/hiddev13 c 180 109
mknod /dev/usb/hid/hiddev14 c 180 110
mknod /dev/usb/hid/hiddev15 c 180 111

There is also the kernel doc about this: http://www.kernel.org/doc/Documentation/usb/hiddev.txt
 
  


Reply

Tags
keyboard, linux, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Mouse on Embedded Linux (Debian) lbuccola Linux - Hardware 1 08-14-2010 08:49 AM
MSC (UMS) instead MTP on linux embedded device. Linux-USB Gadget / GadgetFS rclemente Linux - Embedded & Single-board computer 2 08-28-2009 03:34 AM
Special Edition DSL-SE-Embedded-4.4.10 USB with Persistent Qemu for Linux/Windows linus72 DamnSmallLinux 3 04-21-2009 04:56 AM
Embedded usb software support linux wprs General 2 03-19-2007 02:00 PM


All times are GMT -5. The time now is 09:36 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration