The PS/2 & USB Sniffer adapter plank sits inline between a keyboard and a computer and passively records everything that crosses the wire. PS/2 and low speed USB are decoded live: raw packets scroll past as they happen, and a key tracker rebuilds the typed text right next to them, so you read words instead of scan codes.

PS/2 & USB Sniffer plank features:

  • Two PS/2 (mini-DIN 6P) connectors and two USB connectors, wired as pass-throughs so the keyboard keeps working while you capture
  • PS/2 scan code set 2 decoded to keystrokes, and the commands the PC sends to the keyboard
  • Bus syntax commands to a PS/2 keyboard, with the Bus Pirate as its host: LEDs, ID, reset, keys
  • Low speed USB HID boot protocol decoded to keystrokes
  • A key tracker in each mode that reconstructs the typed text as a plain string
  • TRIGGER input to start a USB capture with a button or an external signal
  • PWR SWITCH to take bus power from the Bus Pirate VOUT supply or from the PC (EXT)

🛒

Get Bus Pirate & Accessories

Adapter pinout

Bus Pirate pinLabelDescription
1VOUTBus power, when the PWR SWITCH is in the VOUT position
2TRIGTrigger input: with the trigger on, a low level starts a USB capture
3D+USB D+
4D-USB D-
5RESVReserved
6DATPS/2 data
7CLKPS/2 clock
8RESVReserved
9RESVReserved
10GNDCommon ground with the keyboard and the PC

The Bus Pirate shows these same labels under the pin numbers in the status bar, so you can confirm the plank is wired the right way round at a glance.

Connectors

The keyboard plugs into a DEVICE connector, and the cable to the PC into the HOST connector of the same kind: PS/2 DEVICE and PS/2 HOST for a PS/2 keyboard, the USB-A DEVICE socket and the USB-C HOST socket for a USB keyboard. Each pair is wired straight through, data and power, and the Bus Pirate listens on the data lines.

Trigger

The TRIGGER header has two pins, TRG and GND. TRG is the Bus Pirate TRIG pin (IO0), pulled up to the Bus Pirate VOUT pin by a 2K resistor. When the USB sniffer’s capture trigger is enabled, a capture starts as soon as TRG goes low: connect it to GND with a button or a jumper wire, or pull it low with a signal from your circuit.

Power switch

SW1 selects where the sniffed bus takes its power from. Slide it to VOUT to power the bus from the Bus Pirate supply, or to EXT to let the PC power it, exactly as it would without the plank in the way. A backflow prevention circuit between the Bus Pirate VOUT pin and the switch keeps the PC supply out of the Bus Pirate.

The PWR LED lights when the bus has power. On the VIN header, + is the bus supply that the four connectors share and - is ground.

Schematic

PS/2 & USB Keyboard Sniffer adapter schematic and PCB are available in the Bus Pirate 5 hardware repository.

BOM

ItemQuantityReference(s)ValueFootprint
13C1, C2, C347uF/CL21A226MAYNNNECapacitor_SMD:C_0805_2012Metric
21D2LEDLED_SMD:LED_0805_2012Metric
31D4011N4148WTDiode_SMD:D_SOD-523
42J1, J4Mini-DIN-6connector-mini-din-6:Connector_Mini-DIN_Female_6Pin_2rows
51J2Conn_01x10Connector_PinSocket_2.54mm:PinSocket_1x10_P2.54mm_Horizontal
61J5USB_AConnector_USB:USB_A_CONNFLY_DS1095-WNR0
71J7TYPE-C-31-M-12TYPE-C-31-M-12:HRO_TYPE-C-31-M-12
82J8, J9Conn_01x02_PinConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical
94L1, L2, L4, L5CBW201209U300TInductor_SMD:L_0805_2012Metric
101Q401BCM857BS-7-FPackage_TO_SOT_SMD:SOT-363_SC-70-6
111Q402BC2301T 2.8APackage_TO_SOT_SMD:SOT-523
122R1, R55.1KResistor_SMD:R_0805_2012Metric
132R2, R32KResistor_SMD:R_0805_2012Metric
141R40868KResistor_SMD:R_0805_2012Metric
151R41010KResistor_SMD:R_0805_2012Metric
161R412100KResistor_SMD:R_0805_2012Metric
171SW1SW_SPDTButton_Switch_SMD:SW_SPDT_PCM12

Resources

Get a Bus Pirate

🛒

Get Bus Pirate & Accessories

Community

Documentation

Here’s some other fun stuff you might enjoy.