background image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Transponder Reader 

TWN3 

Technical Manual 

Doc.-Rev. 1.07 

Summary of Contents for TWN3 MIFARE

Page 1: ...Transponder Reader TWN3 Technical Manual Doc Rev 1 07 ...

Page 2: ...Normal Operation 13 5 4 Selecting Mode of Operation 14 5 5 Setting Up the Keyboard Emulation 15 5 5 1 Table of Scan Codes 15 5 5 2 Sending ALT Codes 17 5 5 3 Key Repeat Rate 17 5 6 Installing Scripts 18 5 7 Miscellaneous Settings 19 5 8 Updating the Firmware 20 5 9 Preferences 21 5 10 Export and Import of Configurations 22 5 11 Installing USB Drivers for Configuration 23 6 Transparent Mode 24 6 1 ...

Page 3: ... 2 3 Bit Fields 33 7 2 4 Startup Condition 33 7 2 5 System Function Calls 34 7 2 5 1 Transponder Operations 34 7 2 5 1 1 Generally Available Transponder Operations 35 7 2 5 1 2 Multi125 Specific Transponder Operations 36 7 2 5 1 3 Mifare and MultiISO Specific Transponder Operations 37 7 2 5 1 4 Legic Specific Operations 38 7 2 5 1 5 HID iClass Specific Operations 39 7 2 5 2 Functions for Host Comm...

Page 4: ...art 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 Multi125 Mifare HID Prox HID iClass Transponder Family Depending On Type of Device Transparent Communication Script Controlled Operation Physical COM Port Virtual COM Port Keyb...

Page 5: ... USB Virtual COM Port USB Keyboard Emulation TWNConfig TWNConfig TWN3 Device Type IndiTag MultiISO 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 IndiTag MultiISO Physical type of connection type of cable to the host computer USB or V24 DSUB25 DSUB9 or PS 2 Many...

Page 6: ... 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 bidire...

Page 7: ... 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 your sup...

Page 8: ...e 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 ...

Page 9: ... 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 10: ... 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 11: ... 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 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 wil...

Page 12: ...he appropriate configuration drivers Please refer to Installing USB Drivers for Configuration 5 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 cli...

Page 13: ...g 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 14: ...ce intelligent and emulate a COM port Intelligent Operation Run a script on the TWN3 device intelligent 2 Intelligent Keyboard Emulation Run a script on the TWN3 device intelligent and emulate a keyboard Intelligent Operation Identical to V24 Mode 1 3 Transparent Virtual COM Port Establish a direct link between the virtual COM port and the internal transponder reading module Transparent Operation ...

Page 15: ...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 t...

Page 16: ...g 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 are possible Instead of specifying a key on the keyboard sending the appropriate ASCII as ALT code can be configured ...

Page 17: ...ntages 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 t...

Page 18: ...elect 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 If the compilation is successful following screen will appear ...

Page 19: ...hat in keyboard emulation it makes no sense to send a line feed to the host computer in fact there is no key on a keyboard which does line feed On the other hand sending a line feed after a carriage return might appear quite normal in a terminal session via serial interface The default value is off Conclusions A line feed will only be appended if o This options is selected o The device is in intel...

Page 20: ...mware images which are compatible to the connected device In order to re program the firmware of a TWN3 device click the Program button After successful programming the following screen should be displayed Notes If programming fails for any reason blackout or whatever it is possible to restart the programming process The TWN3 device can only be brought back to normal operation after successful pro...

Page 21: ... output which appears in the list box Protocol into the file TWNConfig log The file is located in the folder TWNConfig resides Activating the checkbox Slow down start of boot loader on HID keyboard devices will do a somewhat slower activation of the boot loader of a TWN3 device This may prevent from problems in activating the boot loader which have been seen on specific PCs ...

Page 22: ...is not possible to read the secret area from a TWN3 device To save a configuration including their secrets you have to compile the appropriate script which defines these secrets After successful compilation of this script you are able to export the configuration including script and secrets Be aware that the configuration file also contains the secrets now so this file should be handled as careful...

Page 23: ...ed Here are the steps to do so Once you have clicked the Connect button within TWNConfig exe the first time the following screen will appear 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 24: ...face V24 or virtual USB and the reading module The direct communication with a transponder reader module is not compatible to each other and requires the knowledge of the specific communication protocol Please see the following documents for related information TWN3 Type Document Multi125 T4T5Handbook x xx pdf Mifare TH_Mifare_x xx pdf MultiISO TH_MultiISO_x xx pdf IndiTag This Document HID Prox T...

Page 25: ...ytes necessary to transport 26 bits These bytes do contain Byte 1 2 3 4 Byte Value 0x80 0x80 0x01 0xC0 Bit Values 1000 0000 1000 0000 0000 0001 11 00 0000 Please note that the unused bits are the lowest significant bits of the last bytes 6 2 IndiTag Transparent Protocol Due to the fact the TWN3 IndiTag performs read access only there are no commands available which can be sent to the reading modul...

Page 26: ...tinguish normal C code from TWN3 scripting code it is furthermore recommended to expand the extension to twn c This is also the default extension which is used by the configuration tool TWNConfig The preferred extension for include files is twn h A TWN3 script is one file of source It is possible to include additional source files via a directive to the preprocessor 7 1 2 Comments In order to plac...

Page 27: ...ue byte or not void Following form is required to return a value return expression 7 1 5 2 Arguments If a function has no arguments the list of arguments has to be left empty do not write void In order to declare arguments write the list of arguments separated by commas Arguments are passed by value or by reference In order to pass an argument by reference instead of value insert the before the id...

Page 28: ...nts A block statement can be used wherever a single statement can be used 7 1 6 1 if Statement An if statement has the form if expression statement Statement is executed only if the result of expression is not equal to zero 7 1 6 2 if else Statement An if else statement has the form if expression statement1 else statement2 Statement1 is executed only if the result of expression is not equal to zer...

Page 29: ...ipt is evaluating expression Depending on the result of the expression the appropriate case is executed If there is no appropriate case the default case is executed If there is no default label execution is continued after the switch statement 7 1 6 7 break Statement Form break The break statement can be used in while do while for and switch statements loop or switch statements In a loop statement...

Page 30: ...10 goto Statement Form goto label The goto statement directly passes execution to the position within a function where the label statement has been defined 7 1 6 11 Labels A label has the form identifier statement They may appear on any position within a function body A label is used as destination for a goto statement 7 1 6 12 Empty Statement A statement which is doing nothing is the semicolon Ex...

Page 31: ...mple const byte c 15 7 1 8 2 secret The secret data space is a read only segment The content of this segment is written once during programming the script into the TWN3 transponder reader Furthermore this segment can not be read directly by the script itself Therefore there is no way to simply read the content of this memory and send it to the host There are only a few system functions which take ...

Page 32: ...t A B C Shift Right A B C Lower A B C Lower or Equal A B C Greater A B C Greater or Equal A B C Equal A B C Not Equal A B C Binary And A B C Binary Exclusive Or A B C Binary Or A B C Logical And A B C Logical Or A B C Assignment A B Addition Assignment A B Subtraction Assignment A B Multiplication Assignment A B Division Assignment A B Modulus Assignment A B Bitwise Or Assignment A B Bitwise And A...

Page 33: ... array of bytes where a count of bits is and or a start bit is specified The table shows how the bits are enumerated within the array of bytes Byte Index 0 1 2 Bit Index 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Functions which only specify a bitcount operate on bits 0 to bitcount 1 Functions which specify a startbit and bitcount operate on bits startbit to startbit bitcount 1 ...

Page 34: ...read by the family of TWN3 transponder readers TWN3 Type Transponder Types Multi125 TAGTYPE_EM4102 TAGTYPE_HITAG1S TAGTYPE_HITAG2 TAGTYPE_EM4150 TAGTYPE_ISOFDX Mifare TAGTYPE_MIFARE HID Prox TAGTYPE_HIDPROX HID iClass TAGTYPE_HIDICLASS Legic TAGTYPE_LEGIC TAGTYPE_MIFARE TAGTYPE_ISO15693 IndiTag TAGTYPE_INDITAG MultiISO TAGTYPE_MIFARE TAGTYPE_ISO14443B TAGTYPE_ISO15693 ...

Page 35: ...tiple of 8 bits Multi125 64 8 Yes Mifare 56 7 Yes HID Prox 128 16 No HID iClass 128 16 Yes Legic 128 16 Yes IndiTag 64 8 Yes MultiISO 64 8 Yes If IDBitCnt is a multiple of 8 bits then the number of involved bytes simply can be calculated by following formula IDByteCnt IDBitCnt 8 If IDBitCnt is not a multiple of 8 bits then the number of involved bytes can be calculated by a somewhat more complicat...

Page 36: ...bits the ID consists of byte TagType Type of tag which has been found byte Secret Reference to an array of bytes which must contain four bytes These bytes represent the key for the login process Return If the operation was successful the return value is TRUE otherwise it is FALSE byte Multi125Generic byte TXData byte TXCount byte RXData byte RXCount byte MaxRXCount byte Timeout Send a specific com...

Page 37: ...hich has to contain six bytes These bytes represent the key for the login process byte KeyType Specifies with which key the operation has to be performed This is one of the defined constants KEYA or KEYB byte Sector Specifies the sector for the login Return If the operation was successful the return value is TRUE otherwise it is FALSE void ModuleSendChar byte Char Send a single ASCII character to ...

Page 38: ...s FALSE 7 2 5 1 4 Legic Specific Operations byte LegicGeneric byte TXData byte TXCount byte RXData byte RXCount byte MaxRXCount byte Timeout Send a specific command to the built in module of a Legic reader Parameters byte TXData Reference to an array of bytes which contains the command to be sent to the module byte TXCount Count of bytes in the specified array of bytes to be sent byte RXData Refer...

Page 39: ...swer from the module byte RXCount Count of bytes to be received byte Timeout Timeout time in multiples of 100 milliseconds Return If the operation was successful the return value is TRUE otherwise it is FALSE byte IClassTagSearchApp byte AppData byte AppBitCnt Receive application data from the module In order to use this function no other transponder functions are allowed to be used Parameters byt...

Page 40: ...oid HostSendChar byte Char Send a single character to the host Parameter byte Char Char represents the ASCII value of the character to be sent to the host Return None void HostSendHex byte Data byte BitCnt byte Width Convert a number which is given as a bit field into hexadecimal ASCII format and send it to the host Letters are sent in upper case Parameters byte Data A reference to an array of byt...

Page 41: ... 16 0 Result is 4660 HostSendDec ID 8 5 Result is 00018 HostSendDec ID 13 5 Result is 00582 byte HostTestCmd byte Cmd byte CmdLen byte MaxCmdLen This command implements a generic method for receiving an array of bytes from the host This enables the programmer to implement a simple interface which executes commands sent from the host to the reader A host command is any sequence of ASCII characters ...

Page 42: ... the following constants OFF Turn off ON Turn on BLINK Blink TOGGLE Toggle on off state This has no influence on a blinking LED Return None Examples LEDSet GREEN RED ON Turn on both green and red LED LEDSet GREEN BLINK Let the green LED blink byte LEDGet byte LED Get the current status of a LED Only the status of one LED can be retrieved at a time Parameter byte LED Specifies either the value for ...

Page 43: ...SS A low high sequence which is intended to signal a successful operation BEEPFAILED A high low sequence which is intended to signal an operation which has not been successful Return None 7 2 5 5 Bit Operations byte CompBits byte Data1 byte Data2 byte BitCount Compare two bit sets Parameters byte Data1 Reference to an array of bytes which represent a bit field byte Data2 Reference to an array of b...

Page 44: ...s First bit within the source bit field where the bits are copied from byte BitCount Number of bits to be copied Return None void FillBits byte Dest byte StartBit byte Value byte BitCount Fill bits within a given bit field with either 0 or 1 Parameters byte Dest Reference to an array of bytes which represent a bit field which is the destination for the operation byte StartBit First bit within the ...

Page 45: ...ying will be chosen Parameters byte DestBytes Reference to an array of bytes which is the destination of the copy operation byte SourceBytes Reference to an array of bytes which is the source of the copy operation byte ByteCount Number of bytes to be copied Return None void FillBytes byte Dest byte Value byte ByteCount Fill bytes within a given array with a value Parameters byte Dest Reference to ...

Page 46: ...r A timer is running in real time in the background This means that even if other tasks are performed by the script the time till time out is still kept correctly The timed out state is reached only one time Parameters byte ID The ID of a timer which maybe one of the four available timer 0 to 3 byte Time The timeout values specified in multiples of 100 milliseconds Return None void StopTimer byte ...

Page 47: ...OM port Parameter None Return Either one of the defined constants USBVCOM The TWN3 reader is emulating a virtual COM port USBHID The TWN3 reader is emulating a keyboard byte GetDeviceType Retrieve the information which family of transponders this device supports Parameter None Return Either one of the defined constants DEVTYPE_MULTI125 Multi125 DEVTYPE_MIFARE Mifare DEVTYPE_HIDPROX HID Prox DEVTYP...

Page 48: ... 9 Technical Data HID Prox Multi125 Inditag Mifare MultiISO HID iClass Legic Housing Material ABS colour black or white Frequency 125 kHz 13 56 MHz Dimensions 88mm x 56mm x 18mm Power Supply 5V 10 via communication cable Supply Current 140mA 220mA 220mA 120mA N A 220mA 280mA Temperature Range 0 C up to 50 C Antenna Aircoil PCB Aircoil Read Write Distance Up to 10cm depending on transponder Support...

Page 49: ...ed and found to comply with the limits for a Class B digital device pursuant to part 15 of the FCC Rules These limits are designed to provide reasonable protection against harmful interference in a residential installation This equipment generates uses and can radiate radio frequency energy and if not installed and used in accordance with the instructions may cause harmful interference to radio co...

Page 50: ...me NMB 003 du Canada Operation is subject to the following two conditions 1 this device may not cause interference and 2 this device must accept any interference including interference that may cause undesired operation of the device 11 Trademarks All referenced brands product names service names and trademarks mentioned in this document are the property of their respective owners ...

Reviews: