Configuring the USB swipe reader
Reprogram the swipe reader to work in "ALT-ASCII"-mode
The object is to reprogram the swipe reader from ordinary US keymap-based keyboard emulation to "ALT-ASCII"-mode. In this mode, the swipe reader emulates entering characters by code, by means of holding LEFT ALT and entering the character code on the numpad.
Using the magtek tool
A simple tool for reprogramming is available in the repository. It requires Linux and uses the 'libhid library to communicate with the reader. To check out and compile, do the following:
svn co http://bifrost.projects.linpro.no/svn/trunk/src/OpenWRT/magtek magtek-tool cd magtek-tool make
To print the properties of a plugged in reader, use
./magtek -p
To set a property, use
./magtek -s <number> <value>
The value can either be hex or integer. So for setting the correct mode for the card reader, you would set parameter 15 (ASCII_TO_KEYPRESS_CONVERSION_TYPE) to 1
./magtek -s 15 1
Using Windows
Install software
Download and install USB Swipe & Insert Reader from Magtek.
Overview
Result codes:
00: Success 01: Error 02: Invalid parameters
Commands:
00: Get property 01: Set property
Relevant properties:
0f: ASCII_TO_KEYPRESS_CONVERSION_TYPE
Property values:
00: US keymap (default) 01: ALT-ASCII
Reprogramming the swipe reader
Start the USBMSR demo program and enter the following values. Check for correct results.
Send msg: 01 0f 01
Result: RC=00, LEN=00
The message sent to the swipe reader deconstructs as follows:
CMD = 01 - set property DATA = 0F - property ASCII_TO_KEYPRESS_CONVERSION_TYPE, 01 - mode ALT-ASCII)
In this case, the swipe reader used was preconfigured for keyboard emulation. A MINI USB SWIPE READER MSR configured for HID could be changed to use keyboard emulation using the method above.
