Elatec TWN3B1, TWN3F1 User Manual

Transponder Reader TWN3 Technical Manual
Doc.-Rev. 1.12
Content
1. FUNCTIONAL OVERVIEW ...................................................................................................................... 4
2. MODES OF OPERATION .......................................................................................................................... 5
2.1 USB-DEVICE ........................................................................................................................................... 6
2.1.1 Keyboard Emulation (USB HID Device) ........................................................................................ 6
2.1.2 Emulating a Virtual Serial Port ...................................................................................................... 6
2.2 RS232-DEVICE ........................................................................................................................................ 6
2.2.1 Serial Communication Parameters ................................................................................................. 6
2.2.2 Pin Assignment ................................................................................................................................ 7
3. INSTALLATION ................................................................ ................................................................ .......... 7
3.1 RS232-DEVICE ........................................................................................................................................ 7
3.2 USB-DEVICE (KEYBOARD EMULATION) .................................................................................................. 8
3.3 USB-DEVICE (VIRTUAL SERIAL PORT) ................................................................................................ .... 8
4. CONFIGURATION .................................................................................................................................... 10
4.1 ENTERING THE CONFIGURATION MODE.................................................................................................. 11
4.2 WRITING A CONFIGURATION TO A TWN3 DEVICE ................................................................................. 12
4.3 RESUMING NORMAL OPERATION ........................................................................................................... 13
4.4 SELECTING MODE OF OPERATION .......................................................................................................... 14
4.5 SETTING UP THE KEYBOARD EMULATION .............................................................................................. 15
4.5.1 Table of Scan Codes ...................................................................................................................... 15
4.5.2 Sending ALT Codes ....................................................................................................................... 17
4.5.3 Key Repeat Rate ............................................................................................................................ 17
4.6 INSTALLING SCRIPTS .............................................................................................................................. 18
4.7 RS232 SETTINGS .................................................................................................................................... 20
4.8 STARTUP CONDITION IN TRANSPARENT MODE....................................................................................... 21
4.9 UPDATING THE FIRMWARE ..................................................................................................................... 22
4.10 PREFERENCES ........................................................................................................................................ 23
4.11 EXPORT AND IMPORT OF CONFIGURATIONS ........................................................................................... 24
4.12 INSTALLING USB-DRIVERS FOR CONFIGURATION .................................................................................. 25
5. TRANSPARENT MODE ........................................................................................................................... 26
5.1 HID PROX TRANSPARENT PROTOCOL .................................................................................................... 27
5.2 INDITAG TRANSPARENT PROTOCOL ....................................................................................................... 27
5.3 CONTROLLING LEDS AND BEEPER ......................................................................................................... 28
5.3.1 Set LEDs ........................................................................................................................................ 28
5.3.2 Get LEDs ....................................................................................................................................... 29
5.3.3 Set Volume ..................................................................................................................................... 30
5.3.4 Beep ............................................................................................................................................... 31
6. SCRIPTING................................................................................................................................................. 32
6.1 LANGUAGE DESCRIPTION ....................................................................................................................... 32
6.1.1 Source Code .................................................................................................................................. 32
6.1.2 Comments ...................................................................................................................................... 32
6.1.3 Case Sensitivity ............................................................................................................................. 32
6.1.4 Preprocessor Directives ................................................................................................................ 32
6.1.5 Functions ....................................................................................................................................... 33
6.1.6 Statements ..................................................................................................................................... 34
6.1.7 Storage Types ................................................................................................................................ 36
6.1.8 Storage Classes ............................................................................................................................. 37
6.1.9 Operators ...................................................................................................................................... 38
6.2 RUNTIME ENVIRONMENT ................................................................ ....................................................... 39
6.2.1 Include File ................................................................................................................................... 39
6.2.2 Basic Definitions ........................................................................................................................... 39
6.2.3 Bit Fields ....................................................................................................................................... 39
6.2.4 Startup Condition .......................................................................................................................... 39
Page 2 of 62
6.2.5 System Function Calls ................................................................................................................... 40
7. FIRMWARE HISTORY ............................................................................................................................ 59
8. TECHNICAL DATA .................................................................................................................................. 60
9. REGULATORY INFORMATION ............................................................................................................ 60
9.1 CE DECLARATION OF CONFORMITY ....................................................................................................... 60
9.2 FCC STATEMENT ................................................................................................................................... 61
9.3 IC (INDUSTRY CANADA) STATEMENT .................................................................................................... 61
10. TRADEMARKS ...................................................................................................................................... 62
Page 3 of 62
Multi125
Mifare HID Prox
HID iClass
Transponder Family Depending On Type of Device
Transparent Communication Script Controlled Operation
Physical COM Port Virtual COM Port
Keyboard
Emulation
USB-InterfaceV24-Interface
TWN3 Transponder Reader
Legic
InditagMultiISO
Legic NFCMifare NFC
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.
1. Functional Overview
Here is a block diagram of the basic functional components of a TWN3 transponder reader:
Page 4 of 62
V24-
Interface
Scripting
Engine
Multi125
Mifare
HID Prox
HID iClass
Legic
Transparent
Communication
Config
Mode
Command
for Config
Mode
TWNConfig
Selected by
Cable
TWNConfig
Scancode
Translation
Table
USB Virtual
COM Port
USB Keyboard Emulation
TWNConfig TWNConfig
TWN3
Device Type
IndiTag
MultiISO
Mifare NFC
Legic NFC
Let‟s take a more detailed view: The diagram below is showing the functional units and how they can be configured:
2. Modes of Operation
The transponder reader TWN3 can be ordered in several hardware configurations:
Support for the specific transponder family (Multi125, Mifare, Mifare NFC, HID Prox,
HID iClass, Legic, Legic NFC, IndiTag, MultiISO)
Physical type of connection (type of cable) to the host computer: USB or RS232, DSUB25,
DSUB9 or 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 62
Parameter
Default Value
Optional Values
Baudrate
9600 Baud
1200 Baud, 2400 Baud, 4800 Baud, 9600 Baud, 19200 Baud, 38400 Baud, 57600 Baud
Databits
8
-
Parity
None (Even parity for TWN3 Multi125 in transparent mode)
None, Even, Odd
Stopbits
1
-
Handshake
None
-
2.1 USB-Device
A TWN3 USB reader is capable of supporting several modes of operation:
2.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.
2.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 RS232 interface.
2.2 RS232-Device
2.2.1 Serial Communication Parameters
These are the default communication parameters for RS232 devices. Baudrate and parity can be configured as follows:
Page 6 of 62
Pin
Signal
2
RxD from host
3
TxD to host
7
Signal ground
24
5V power supply from the host
Pin
Signal
3
RxD from host
2
TxD to host
5
Signal ground
9
5V power supply from the host
Pin
Signal
6
RxD from host
2
TxD to host
3
Signal ground
4
5V power supply from the host
2.2.2 Pin Assignment
Following pin assignment for the DSUB25 plug:
Following pin assignment for the DSUB9 plug:
Following pin assignment for the PS/2 plug:
3. Installation
3.1 RS232-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 your supplier for a specific solution.
The installation of the reader is as simple as connecting a USB device to a host.
Page 7 of 62
3.2 USB-Device (Keyboard Emulation)
Installing a TWN3 reader emulating a keyboard is rather simple due to the fact, that drivers do come with the operating system. Therefore, the device simply can be connected to the host computer and can be immediately used.
3.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.
Page 8 of 62
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:
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:
Page 9 of 62
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.
4. 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 RS232 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.
Page 10 of 62
4.1 Entering the 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 11 of 62
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”.
4.2 Writing a 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 12 of 62
4.3 Resuming Normal Operation
In order to leave the 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 keep the device in configuration
mode!
Page 13 of 62
TWN3 USB
TWN3 RS232
Intelligent Virtual COM Port:
Run a script on the TWN3 device (“intelligent”) and emulate a COM port
Intelligent Operation: Run a script on the TWN3 device
(“intelligent”)
Intelligent Keyboard Emulation:
Run a script on the TWN3 device (“intelligent”) and emulate a keyboard
Intelligent Operation:
Run a script on the TWN3 device (“intelligent”)
Transparent Virtual COM Port:
Establish a direct link between the virtual COM port and the internal transponder reading module.
Transparent Operation
Establish a direct link between the serial port and the internal transponder reading module.
4.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 RS232 devices:
Page 14 of 62
4.5 Setting Up the Keyboard Emulation
4.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 often used characters „0‟ – „9‟, „A‟ – „F‟, carriage return and the space character.
There are some reasons, why you may want to change the existing setup:
You need a setup for a specific country, where the 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 15 of 62
In order to do this, you may double-click on an existing entry in the table or specify a new entry by pressing the “Add”-button. In the following dialog you now are able to select the appropriate keys.
Please keep in mind, that the keyboard keys are to be specified in relation to a standard U.S. QUERTY keyboard, which is shown below:
Source: www.wikipedia.org
Notes:
A maximum of 48 entries in the scan code table is possible. Instead of specifying a key on the keyboard, sending the appropriate ASCII as ALT code
can be configured.
Page 16 of 62
4.5.2 Sending ALT Codes
You may send ALT codes instead of key strokes on a keyboard.
Example:
The character „A‟ (ASCII code 65) should be sent to the host. Following sequence is executed:
- Press ALT key
- Press key „6‟ on the numeric keypad
- Release key „6‟ on the numeric keypad
- Press key „5‟ on the numeric keypad
- Release key „5‟ on the numeric keypad
- Release ALT key. There are advantages and disadvantages in doing so:
Advantages:
There is no table of keystrokes necessary, which have to be set up. All characters with ASCII
codes in the range from 1 to 255 can be sent.
No adaptations to different keyboard layouts are necessary.
Disadvantage:
Some programs do not accept sending ALT codes and react in a complete different way.  The amount of key strokes is higher. Therefore, the maximum transfer speed is slower.
4.5.3 Key Repeat Rate
The repeat rate, with which key strokes are sent to the host can be adjusted. The time between key strokes is specified in multiples of milliseconds.
Page 17 of 62
4.6 Installing Scripts
In order to install a script on a TWN3 device, perform following actions:
Select the tab folder “Scripting”. Select a script file (extension “.twn.c”) by clicking the button “Select Script”. Click the “Compile Script”. This will start the script compiler. If there is an error detected in the script, the line number and type of error will be displayed.
Page 18 of 62
If the compilation is successful, following screen will appear:
The compiled script is now part of the configuration within TWNConfig. Some additional information is displayed on how much storage space is occupied by this script. Up to now, the script has not been saved to the TWN3 device.
Page 19 of 62
Loading...
+ 43 hidden pages