How to read keys from USB keyboard on AT91SAM9260


 
Thread Tools Search this Thread
Operating Systems Linux How to read keys from USB keyboard on AT91SAM9260
# 8  
Old 11-10-2009
Well, your inittab makes one thing clear... Your system creates one and only one terminal, hardwired to the serial port and nothing else.

I don't know of any straightforward way to attach your keyboard to it instead, though, for a couple reasons:
  • A keyboard is not a terminal. You cannot write data to a keyboard. You need to somehow multiplex two things into one device here.
  • You could easily brick your machine here by messing up the primary terminal. Does it by any chance have a second serial port?
I've been looking for a way to multiplex two things into one device. Nothing yet. It might be necessary to create a pseudo-terminal device yourself and emulate it.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. HP-UX

Configure X windows with both keyboard and USB barcode reader

Greetings. Seeking guidance on adding a USB barcode reader (BCR) to an HP c3750 workstation with HP-UX 11.11 which is essentially configuring X windows to accept input from both a primary keyboard and a secondary keyboard that happens to be the BCR. Historically, I have successfully added a BCR... (2 Replies)
Discussion started by: mnkaltenbach
2 Replies

2. Shell Programming and Scripting

While read won't run keyboard function

I am using while read do/ done to retrieve menu item. Works as advertised, no problem. I am using this hack function "pause" to stop script execution and wait for keyboard "enter" key to continue. Sort of break point function. Also works fine with one exception - it does not work when used... (4 Replies)
Discussion started by: annacreek
4 Replies

3. Shell Programming and Scripting

Input keyboard keys upon program launch

Hey guys, first post! I want to write a script that will wait 1 second and then input the keys CTRL+ALT+J to the application i just opened. The program is dosbox, and thay key combination starts video recording :) I have no idea how to program this, can anyone help please? thanks in advance! (2 Replies)
Discussion started by: brunobliss
2 Replies

4. UNIX for Dummies Questions & Answers

read from terminal/keyboard > /dev/tty

Hi, I need to provide more than one character to "> /dev/tty" through terminal/keyboard input, I have this: ok=false while do echo " Enter r1 to reformat " > /dev/tty read choice case $choice in ) echo " bla bla bla " ;; done However, in this way,... (3 Replies)
Discussion started by: Gery
3 Replies

5. Solaris

Keys on Keyboard stop working

Hello, I hope I put this in the right forum... I searched for similar threads, but I couldn't find any that seem to deal with the problem I am having. My workplace is using (among other Solaris-machines) Dell Dimension T3500 as workstations (running Solaris 10 X86 10/09 u8,... (0 Replies)
Discussion started by: areichart
0 Replies

6. SCO

SCO 6.0-Keys in keyboard function differently

Sir I have HP installed with SCO 6.0. The problems are (1) some keys in board like 'del' 'backspace', 'pageup/dn" do not function and display some special characters on conole. (2) Files transferred from Windows machine invariably contain control Z/M characters. How to resolve these issues. ... (4 Replies)
Discussion started by: chssastry
4 Replies

7. Shell Programming and Scripting

Detect USB keyboard and other peripherals

Hi there, I have a Debian machine without any peripherals (no screen, no keyboard, etc.). I'd like to be able to detect and log when someone plugs a USB keyboard. Something like : 2009-07-04 12:21 warning: keyboard pluged! Is that possible? I see two ways : 1. Either actively react to the... (4 Replies)
Discussion started by: chebarbudo
4 Replies

8. Shell Programming and Scripting

How to read arrow keys on really old bash?

I would like to get a script to respond to arrow key presses to scroll up and down a menu. The platform is CDLinux which uses a prehistoric version of bash, version 1.14.7. I would like to do something like "read -sn 1 keyin" but the "read" command is so primative that it only has the -r... (1 Reply)
Discussion started by: simonb
1 Replies

9. UNIX for Dummies Questions & Answers

USB keyboard in Solaris

I have a USB keyboard/mouse combo hooked up to an x86 box and when it loads the mouse works fine, but the ctrl, shift, alt, and i think the function keys don't do anything. Is there a setting I need to change, or a way to manually configure them. There are no drivers, it is supposed to emulate a... (0 Replies)
Discussion started by: Winzernotman
0 Replies
Login or Register to Ask a Question
UKBD(4) 						   BSD Kernel Interfaces Manual 						   UKBD(4)

NAME
ukbd -- USB keyboard driver SYNOPSIS
To compile this driver into the kernel, place the following line in your kernel configuration file: device ukbd Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): ukbd_load="YES" DESCRIPTION
The ukbd driver provides support for keyboards that attach to the USB port. usb(4) and one of uhci(4) or ohci(4) must be configured in the kernel as well. CONFIGURATION
By default, the keyboard subsystem does not create the appropriate devices yet. Make sure you reconfigure your kernel with the following option in the kernel config file: options KBD_INSTALL_CDEV If both an AT keyboard USB keyboards are used at the same time, the AT keyboard will appear as kbd0 in /dev. The USB keyboards will be kbd1, kbd2, etc. You can see some information about the keyboard with the following command: kbdcontrol -i < /dev/kbd1 or load a keymap with kbdcontrol -l keymaps/pt.iso < /dev/kbd1 See kbdcontrol(1) for more possible options. You can swap console keyboards by using the command kbdcontrol -k /dev/kbd1 From this point on, the first USB keyboard will be the keyboard to be used by the console. If you want to use a USB keyboard as your default and not use an AT keyboard at all, you will have to remove the device atkbd line from the kernel configuration file. Because of the device initialization order, the USB keyboard will be detected after the console driver initial- izes itself and you have to explicitly tell the console driver to use the existence of the USB keyboard. This can be done in one of the fol- lowing two ways. Run the following command as a part of system initialization: kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null (Note that as the USB keyboard is the only keyboard, it is accessed as /dev/kbd0) or otherwise tell the console driver to periodically look for a keyboard by setting a flag in the kernel configuration file: device sc0 at isa? flags 0x100 With the above flag, the console driver will try to detect any keyboard in the system if it did not detect one while it was initialized at boot time. DRIVER CONFIGURATION
options KBD_INSTALL_CDEV Make the keyboards available through a character device in /dev. options UKBD_DFLT_KEYMAP makeoptions UKBD_DFLT_KEYMAP=fr.iso The above lines will put the French ISO keymap in the ukbd driver. You can specify any keymap in /usr/share/syscons/keymaps with this option. options KBD_DISABLE_KEYMAP_LOADING Do not allow the user to change the keymap. Note that these options also affect the AT keyboard driver, atkbd(4). FILES
/dev/kbd* blocking device nodes EXAMPLES
device ukbd Add the ukbd driver to the kernel. SEE ALSO
kbdcontrol(1), ohci(4), syscons(4), uhci(4), usb(4), config(8) AUTHORS
The ukbd driver was written by Lennart Augustsson <augustss@cs.chalmers.se> for NetBSD and was substantially rewritten for FreeBSD by Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>. This manual page was written by Nick Hibma <n_hibma@FreeBSD.org> with a large amount of input from Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>. BSD
November 22, 2006 BSD