Elatec TWN3I1, TWN3M1, TWN3A1, TWN3N1, TWN3H1 User Manual

Transponder Reader TWN3 Technical Manual
Rev. 1.04
Content
1. Introduction..................................................................................................................... 4
2. Functional Overview....................................................................................................... 4
3. Modes of Operation......................................................................................................... 5
3.1 USB-Device .............................................................................................................................. 6
3.1.1 Keyboard Emulation (USB HID Device)......................................................................................... 6
3.1.2 Emulating a Virtual Serial Port ........................................................................................................6
3.2 V24-Device............................................................................................................................... 6
3.2.1 Serial Communication Parameters...................................................................................................6
3.2.2 Pin Assignment ................................................................................................................................7
4. Installation ...................................................................................................................... 7
4.1 V24-Device............................................................................................................................... 7
4.2 USB-Device (Keyboard Emulation) ...................................................................................... 7
4.3 USB-Device (Virtual Serial Port) .......................................................................................... 8
5. Configuration ................................................................................................................ 10
5.1 Starting Configuration Mode .............................................................................................. 10
5.2 Writing Configuration to a TWN3 Device ......................................................................... 11
5.3 Resuming Normal Operation............................................................................................... 12
5.4 Selecting Mode of Operation ............................................................................................... 13
5.5 Setting Up the Keyboard Emulation................................................................................... 14
5.5.1 Table of Scan Codes ......................................................................................................................14
5.5.2 Key Repeat Rate ............................................................................................................................15
5.6 Installing Scripts ................................................................................................................... 16
5.7 Miscellaneous Settings.......................................................................................................... 17
5.8 Updating the Firmware ........................................................................................................ 18
5.9 Export and Import of Configurations................................................................................. 19
5.10
Installing USB-Drivers for Configuration...................................................................... 20
6. Transparent Mode......................................................................................................... 21
6.1 HID Prox Transparent Protocol.......................................................................................... 22
7. Scripting ........................................................................................................................ 22
7.1 Language Description........................................................................................................... 22
7.1.1 Source Code...................................................................................................................................22
7.1.2 Comments ...................................................................................................................................... 23
7.1.3 Case Sensitivity..............................................................................................................................23
7.1.4 Preprocessor Directives .................................................................................................................23
7.1.4.1 #include Directive...................................................................................................................... 23
7.1.5 Functions........................................................................................................................................23
7.1.5.1 Return Values............................................................................................................................. 23
7.1.5.2 Arguments..................................................................................................................................24
7.1.5.3 System Functions .......................................................................................................................24
7.1.5.4 Function main ............................................................................................................................24
7.1.6 Statements......................................................................................................................................24
7.1.6.1 if Statement ................................................................................................................................24
7.1.6.2 if else Statement......................................................................................................................... 25
7.1.6.3 while Statement..........................................................................................................................25
Page 2 of 44
7.1.6.4 do while Statement.....................................................................................................................25
7.1.6.5 for Statement.............................................................................................................................. 25
7.1.6.6 switch Statement ........................................................................................................................25
7.1.6.7 break Statement..........................................................................................................................26
7.1.6.8 continue Statement.....................................................................................................................26
7.1.6.9 return Statement.........................................................................................................................26
7.1.6.10 goto Statement .......................................................................................................................26
7.1.6.11 Labels..................................................................................................................................... 26
7.1.6.12 Empty Statement.................................................................................................................... 27
7.1.7 Storage Types ................................................................................................................................ 27
7.1.8 Storage Classes .............................................................................................................................. 27
7.1.8.1 const...........................................................................................................................................27
7.1.8.2 secret .......................................................................................................................................... 27
7.1.9 Operators .......................................................................................................................................28
7.2 Runtime Environment.......................................................................................................... 29
7.2.1 Include File .................................................................................................................................... 29
7.2.2 Basic Definitions............................................................................................................................29
7.2.3 Bit Fields........................................................................................................................................ 29
7.2.4 Startup Condition...........................................................................................................................29
7.2.5 System Function Calls....................................................................................................................30
7.2.5.1 Transponder Operations.............................................................................................................30
7.2.5.1.1 Generally Available Transponder Operations .....................................................................31
7.2.5.1.2 Multi125-Specific Transponder Operations ........................................................................ 32
7.2.5.1.3 Mifare Specific Transponder Operations ............................................................................ 33
7.2.5.1.4 Legic Specific Operations ................................................................................................... 33
7.2.5.2 Functions for Host Communication ...........................................................................................34
7.2.5.3 Accessing LEDs.........................................................................................................................36
7.2.5.4 Accessing the Beeper................................................................................................................. 37
7.2.5.5 Bit Operations ............................................................................................................................37
7.2.5.6 Byte Operations .........................................................................................................................39
7.2.5.7 Timer Operations .......................................................................................................................40
7.2.5.8 Retrieving System Information ..................................................................................................41
7.2.5.9 Miscellaneous ............................................................................................................................41
8. Technical Data .............................................................................................................. 42
9. Regulatory Information ................................................................................................ 42
9.1 CE Declaration of Conformity ............................................................................................ 42
9.2 FCC Statement...................................................................................................................... 43
9.3 CI (Canada Industry) Statement......................................................................................... 43
10. Trademarks.................................................................................................................... 44
Page 3 of 44
1. Introduction
This document is the reference guide for the transponder reader family TWN3.
Note:
In order to use the functionality, which is described in this document, your TWN3 reader needs a firmware version V4.00 or above. The latest version of the firmware is part of the developer pack. Please revere to section “Updating the Firmware”, if you would like to update the firmware.
2. Functional Overview
Here is a block diagram of the basic functional components of a TWN3 transponder reader:
Page 4 of 44
Let’s take a more detailed view:
The diagram below is showing the functional units and how they can be configured:
USB
Keyboard
Emulation
USB Virtual
COM Port
V24-
Interface
TWNConfig TWNConfig
Scancode
Translation
Table
TWNConfig
Selected by
Command
for Config
Mode
TWNConfig
Cable
Scripting
Engine
Transparent
Communication
Config
Mode
TWN3
Device Type
Multi125
Mifare
HID Prox
HID iClass
Legic
3. Modes of Operation
The transponder reader TWN3 can be ordered in several hardware configurations:
Support for the specific transponder family (Multi125, Mifare, HID Prox, HID iClass, Legic)
Physical type of connection (type of cable) to the host computer (USB or V24 (DSUB25,
DSUB9, PS/2))
Many other configurations can be done by the system integrator:
Type of USB mode (USB devices only)
Behavior of keyboard emulation
Scripting mode
Page 5 of 44
3.1 USB-Device
A TWN3 USB reader is capable of supporting several modes of operation.
3.1.1 Keyboard Emulation (USB HID Device)
This is the default mode for USB devices. No drivers are required for running the device in a typical environment like Windows XP or Linux. Any output from the TWN3 transponder reader to the host is sent like keyboard input from a user. Therefore, any characters are displayed at the current position of the cursor on the screen of the computer.
Please be aware, that the communication between TWN3 device and host computer is unidirectional. This means, there is no possibility to send data from the host to the TWN3 device. In situations where this is required, we recommend the emulation of a serial port.
3.1.2 Emulating a Virtual Serial Port
Optionally, a USB device can be configured to emulate a virtual serial port. This mode of operation is to be preferred, if a direct communication between application and TWN3 transponder reader is required. This mode also enables a bidirectional communication between .
The communication protocol is identical to the version of TWN3 reader with a physical V24 interface.
3.2 V24-Device
3.2.1 Serial Communication Parameters
Parameter Value
Baudrate 9600 Baud
Databits 8
Parity None
Stopbits 1
Handshake None
Connector DSUB25 or DSUB9 or PS/2
(1)
TWN3 Multi125 in transparent mode is using even parity, which is the native setup for the T4
transponder reader family.
(1)
Page 6 of 44
3.2.2 Pin Assignment
Following pin assignment for the DSUB25 plug:
Pin Signal
2 RxD from host
3 TxD to host
7 Signal ground
24 5V power supply from the host
Following pin assignment for the DSUB9 plug:
Pin Signal
3 RxD from host
2 TxD to host
5 Signal ground
9 5V power supply from the host
Following pin assignment for the PS/2 plug:
Pin Signal
6 RxD from host
2 TxD to host
3 Signal ground
4 5V power supply from the host
4. Installation
4.1 V24-Device
Installing a TWN3 reader with a serial port requires an additional power supply, which is not standard for usual PCs. On the other hand, many devices do supply the 5V on a rarely used pin of the serial connector. Please contact Elatec for a specific solution for you.
The installation of the reader is as simple as connecting a USB device to a host.
4.2 USB-Device (Keyboard Emulation)
Installing a TWN3 reader emulating a keyboard is rather simple due to the fact, that drivers come with the operating system. Therefore, the device simply can be connected to the host computer and can be immediately used.
Page 7 of 44
4.3 USB-Device (Virtual Serial Port)
In order to install a TWN3 reader, which emulates a virtual serial port under Windows XP, keep the drivers nearby and follow these steps:
Plug in the TWN3 reader into your host computer. The following screen should appear (in your native language)
Select to install the software from a specific source.
The following screen should appear:
Select the directory, where the drivers reside and click continue. The drivers will be installed now.
After installation, the following screen should appear:
Page 8 of 44
The installation is now completed. In order to find the serial communication port, which is emulated by the TWN3 transponder reader, you may take a look into the device manager:
In this example, we find the TWN3 reader at COM7.
Depending on the further configuration of the device, you may now test the TWN3 transponder reader with a normal terminal program.
Page 9 of 44
5. Configuration
In order to configure a TWN3 transponder reader, the program TWNConfig.exe is required. Configuration is supported under Windows XP or Windows Vista. During configuration, a TWN3 transponder reader is switched into configuration mode. In this mode the entire setup of the device can be done. Configuration is possible both for V24 and USB devices.
Note:
Please do not connect more than one TWN3 device at a time to your computer during the usage of TWNConfig. This ensures the knowledge about the TWN3 device which is actually to be configured.
5.1 Starting Configuration Mode
Assuming, that the TWN3 transponder reader is already connected to the host computer, start the program TWNConfig.exe. The following screen will appear:
Depending on the physical interface of the TWN3 transponder reader, choose the appropriate port in the top left combo box. Click the “Connect”-button.
Page 10 of 44
TWNConfig is searching and connecting to a TWN3 device. You are now ready to do the required configurations on the device.
Note:
If you are configuring a USB device the first time, you have to install the appropriate configuration drivers. Please refer to “Installing USB-Drivers for Configuration”.
5.2 Writing Configuration to a TWN3 Device
Once a configuration has been set up completely (either via importing a configuration or manually via the tab folders), the configuration can be written back to the TWN3 device. This will save the configuration permanently in the TWN3 device. In order to do that, click the button “Write Config”.
Page 11 of 44
5.3 Resuming Normal Operation
In order to leave configuration mode of the TWN3 device and resume to normal operation click the “Restart” button.
Note:
Disconnecting the device from the host or a power cycle will not leave configuration mode.
Page 12 of 44
5.4 Selecting Mode of Operation
In the tab folder “Mode of Operation” you select the basic mode in which the TWN3 device operates. This setup is used both for USB and V24 devices:
Mode USB Device V24 Device
1
2
3
Intelligent Virtual COM Port: Run a script on the TWN3 device (“intelligent”) and emulate a COM port
Intelligent Keyboard Emulation:
Run a script on the TWN3 device (“intelligent”) and emulate a keyboard
Transparent Virtual COM Port:
Establish a direct link between the virtual COM port and the internal transponder reading module.
Intelligent Operation: Run a script on the TWN3 device (“intelligent”)
Intelligent Operation:
Identical to V24 Mode 1
Transparent Operation
Establish a direct link between the serial port and the internal transponder reading module.
Page 13 of 44
5.5 Setting Up the Keyboard Emulation
5.5.1 Table of Scan Codes
This tab folder enables you to change the scan codes of the keyboard emulation, which are sent to the host for a specific character. The default setup of the device already contains the mainly used characters ‘0’ – ‘9’, ‘A’ – ‘F’ and the carriage return. This enable the reader to send any hex number and an ENTER to the host computer.
There are some reasons, why you may want to change the existing setup:
You need a setup for a specific country, where the key layout of a keyboard is different from the default one.
You need some additional keys in order to achieve your specific format to be sent to the host. This might be an additional space or a tab instead of return.
Page 14 of 44
Loading...
+ 30 hidden pages