Software

The software for the KBSnoop has been developed using Atmel AVR Studio 3.10. The AVR Studio 3.10 software can be downloaded for free from Atmel.

To be able to download the software to the Atmel processor, I bought an Atmel STK200 Starter Kit (1MB pdf-manual). It costs around $50, so it's pretty cheap.

However, we have designed the KBSnoop so that it is possible to download the code to the Atmel CPU without the need of a special programmer. The software is downloaded to the Atmel CPU via the PC's parallel port using a special cable. You can download this software with instructions about how to build the needed cable from the Download page.

If you don't like this idea, you have to buy some sort of programmer to be able to download the software into the Atmel CPU. An Atmel STK200 Starter Kit can be used for this.

You can download the software needed to make the KBSnoop work from the Download page.


PC software

In order for the PC to be able to display the data that KBSnoop sends to it on the serial port, you need to run some sort of terminal program. 

The following example shows how to use Windows HyperTerminal for this:

Start the HyperTerminal program Hypertrm.exe (it's on the Start menu under "Programs / Accessories / Communications / HyperTerminal").
In the "Connection Description" window, write "KBSnoop" in the "Name:"-box.
Click "OK"
Choose "Direct to ComX" in the "Connect using:"-box, where X is the COM-port where KBSnoop is attached.
In the "Port Settings" window, use the following values:
    Bits per second: 38400
    Data bits: 8
    Parity: None
    Stop bits: 1
    Flow control: None
Click "OK"

That's all! Now you should be able to see data being displayed in the HyperTerminal main window whenever you press or release a key on the keyboard (or moving the mouse, if you have the PS/2 mouse connected to KBSnoop).

So how do you interpret the text that is displayed in the HyperTerminal main window? Here are some rules:

All text displayed is in hexadecimal notation.
There is always a space character between each hexadecimal byte.
If a hex-value is preceded by a star ('*'), it means that it is transmitted from the PC to the keyboard (or PS/2 mouse). Otherwise it is transmitted from the keyboard (or PS/2 mouse) to the PC.
If KBSnoop receives two bytes from the same source (KB/mouse or PC) with more than 5 milliseconds delay between them, a comma will be inserted in the text.

So, to show how this shows up on the HyperTerminal window, let's look at an example:

In the above example, the following has happened:

KBSnoop has started and has written out it's version number.
The keyboard has sent "Left Ctrl key Make" (14).
The keyboard has sent "Left Ctrl key Break" (F0 14).
The PC has started sending the "Set Typematic Rate/Delay" command (*F3).
The keyboard has ACK'ed this (FA).
The PC continued by sending the Rate/Delay value byte (*00).
The keyboard has ACK'ed this (FA).

That's about it! In order to get a feel for it, start typing and you will see how it works.

 

Back to main page