Dongles to Fake Presence of a Keyboard?
An anonymous reader asks: "I have a Compaq IPAQ desktop system (legacy free) that will not boot headless. (Yes I did try to tell the BIOS to not generate a no keyboard error, but there is no such setting for the BIOS of this system.) Since I would like to use it such and don't wish to waste a keyboard just to keep it from complaining, I'd like to come up with a small dongle that would fake the system into thinking that there is a keyboard attached. This is the same basic thing that KVM's do, so the circuit shouldn't be that difficult to find. Has anyone heard of such a thing? Can anyone provide or point to somewhere where I can find the basic circuit for this?"
How hard would it be to take the connector part from a old non-working keyboard and wiring something like this up?
Our local Portland Oregon USA computer recycler FreeGeek is selling used PS2 keyboards for about a dollar each.
However that doesn't really address the issue of avoiding having to have a keyboard inserted to boot the PC. I have been looking into this issue recently and found that an inexpensive microcontroller can reproduce keyboard signals quite easily. The Atmel AVR Tiny11 sells at DigiKey for $0.41 each in quantity 25 and $0.56 in quantity one. It's an 8 pin DIP that runs at 1 MHz with no external parts. Its Flash memory holds 512 instructions and it has 32 registers. The companion chip, the AVR Tiny 12, sells for $1.10 quantity 25 and can be programmed directly from the PC parallel port. The PIC controllers from Microchip Inc. have devices in the same price/performance range, but they are more difficult to develop software for and they need external programmers to write the code into their Flash memory.
It's necessary to know what bytes the PC sends to the keyboard on power-up and what the keyboard sends back to the PC. Then these bytes can be formatted by the dongle and sent to the PC to mimic a keyboard.
The PC keyboard has weird programming. Each key sends at least one byte when pressed and some send two or more. When released the same byte set is resent preceeded by the byte 0xf0.
Now any Slashdotter, when given the job of encoding a keyboard with less than 128 individual keys, would assign a 7-bit scan code to each key with the high bit either set or clear depending on whether the key was pressed or released. Simple and elegant. But the standard PC keyboard has this strange multibyte configuration that makes it difficult to decode the keypresses. Not to mention that there is no way to turn off the auto-repeat for the entire keyboard.
Nevertheless, the keyboard scancodes are standardized throughout the world. And there are hundreds of millions of keyboards out there. The newer ones only use about 13 milliAmps of power.
I developed an AVR program to take the PS2 keypresses and mimic a MIDI keyboard by sending note on/off messages according to the keypresses. I'm surprised at how well it works. Except for a few key combinations that don't register together, the PS2 keyboard can function like a MIDI music keyboard (without velocity and aftertouch detection, of course). For a few dollars, I have a small light portable keyboard that plugs into a tone module and adds hundreds of musical instrument sounds to small music group jams. This application is posted on www.avrfreaks.org in the user projects section of the Academy forum.
Then, I strolled into CompUSA and saw this Wireless Keyboard and Mouse Combo. The PS2 connectors stay plugged into the machine and the (nice, UFO-shaped, blinking-light) receiver stays duct-taped to the top of the machine.
All I need to do is remember to take the keyboard and mouse along with me to the colo facility when I need to make a personal visit.
WWW
Hope this still reaches the original requestor, but...
There is a hidden setting in most compaq bioses that lets you boot headless.
Take the following steps:
- go into the bios
- set a power-on password
- a new option will appear, probably "password options"
- here you can set "Network Server Mode" to enabled
- reboot, remove keyboard and behold!
Good luck.