obcanka-reader

A simple java app that runs on raspberry pi and uses https://github.com/ParalelniPolis/obcanka-public to read Czech ID smartcards. It outputs JSON formatted data from the card which are then parsed and sent to a PC as keystrokes using Teensy USB board.

Build

And copy obcanka-reader/build/libs/obcanka-reader-all.jar to Raspberry.

HW

Tested with Teensy 3.0 and Raspberry Pi 3 Model B.

Teensy emulates the keyboard and is connected to the user PC via micro USB.

Raspberry Pi is connected to Teensy via UART / Serial line pins:

Raspberry GPIO and Teensy’s Serial are both on the same voltage so no level conversion is needed.

Raspberry uses USB only for power.

hw connection

Installation

Teensy

Install Arduino IDE and Teensyduino, see https://www.pjrc.com/teensy/teensyduino.html and upload the teensy/serial-to-keyboard/serial-to-keyboard.ino sketch into your Teensy.

Raspberry Pi

auto-start

Configuration

Emulated keyboard’s output can be configured by editinag a file on Raspberry’s SD card. This can be done on raspberry Pi directly or by using a SD card reader on your computer.

Edit (or create) the file named obcanka-reader-template.txt in the /boot partition.

Example:

$givenName  →  $surname↵

hw connection

You can use any characters that would be typed directly (e.g. tab or spaces to separate fields) or the following variables that are read from the ID card.

TODO