General Information
VID | 05f3h |
PID (w Magnetic Strip Reader ) | 0301h or 769 |
PID (w/o Reader ) | 0302h or 770 |
PID (w Bar Code Reader ) | 0303h or 771 |
Consumer Usage Page | 1 |
Usage Page | 000Ch or 12 |
X-keys LCD Keypad Input Report
The following types of input reports are available; General Incoming Data, Bar Code or Magnetic Strip Data, Descriptor and Check Key.
Figure 1: X-keys LCD Keypad key reference.
Endpoint: 1, consumer usage page
Report Length: 32 bytes.
1. General Incoming Data
This is received when keys are pressed and/or a card is swiped.
Byte 1 |
Byte 2 |
Byte 3 |
Byte 4 |
Bytes 5-31
|
Byte 32 |
Constant
|
Keys 0 to 7 |
Keys 9 to 16 |
Message Length |
Message Data |
Unit ID (0-255) |
0
|
Digital1 |
Digital2 |
MsgLen |
MsgData |
<data> |
Digital1: For all bits 0 if key is up, 1 if key is down.
Bit 1=key 0, bit 2=key 1, bit 3=key 2, bit 4=key 3, bit 5=key 4, bit 6=key 5,
bit 7=key 6, bit 8=key 7, see Figure 2 for key numbers.
Digital2: For all bits 0 if key is up, 1 if key is down.
Bit 1=key 16, bit 2=key 17, bit 3=key 18, bit 4=key 19, bit 5=key 20, bit 6=key
21, bit 7=key 22, bit 8=key 23, see Figure 2 for key numbers.
MsgLen: The number of bytes of the following message
including the start and stop bytes. The maximum value is 27.
MsgData: Incoming message data from the bar code reader
or magnetic strip reader. The reader frames the data with a start byte
of 2 and a stop of 3. Depending on the length of the total message it
may take several ReadData() calls or callback notifications to collect it all.
If a stop byte is not encountered on the first read then it and subsequent reads
must be “assembled” to get the complete message.
Example: A message of 00 00 00 05 02 65 65 65 03 says that there are 5 bytes to follow, 02 is the start of the message, 65 65 65 is the content and 03 is the end of the message. The message is AAA in ASCII equivalent.
Acknowlegment messages are sent out following certain output reports (see X-keys LCD Keypad Output Reports), in which case MsgLen=1 and MsgData=06 (successful) or 21 (unsuccessful).
2. Descriptor
The descriptor contains information about the device. The descriptor is received after a Request for Descriptor output report is sent, see Output Reports below.
Byte 1 |
Byte 2 |
Byte 3 |
Byte 4 |
Byte 5 |
Byte 6 |
Byte 7 |
Byte 8 |
Byte 9 |
Byte 10 |
Byte 11 |
Bytes 12-32
|
Constant
|
Vendor ID high |
Vendor ID low |
PID high |
PID low |
Rev high |
Rev low |
Unit ID |
Read Report Length |
Write Report Length |
Report Rate |
Reserved |
0
|
5 |
243 (F3h) |
3
|
1
|
RevH |
RevL |
<data> |
32 |
9 |
RR
|
0 or value
|
REVH: Bit 8=1 always. Bits 1 to 7 are the high
byte of the chip firmware revision.
REVL: The low byte of the chip firmware revision.
RR: The report rate is how often data is spontaneously
refreshed if nothing is “forcing” a refresh such as pressing keys
or sliding cards. The X-keys LCD devices have a report rate of 32 which
equates to approximately 500ms.
X-keys LCD Keypad Output Reports
The following types of output reports are shown in the summary below.
Report Length: 9 bytes.
Report
|
Format
|
Description
|
---|---|---|
1
|
0*, 148, LED1, LED2, 0, 0, 0, 0, 0 | Set LEDs |
2
|
0*, 137, 137, 0, 0, 0, 0, UnitID, 16 | Set Unit ID |
3
|
0*, 137, 137, 0, 0, 0, 0, 0, 132 | Request Descriptor |
4
|
0*, 237, 3, 2, 67, 3, 0, 0, 0 | Clear LCD+ |
5
|
0*, 237, 5, 2, 68, 48, Page, 3, 0 |
Show Pre-saved Message page on LCD+ |
6
|
0*, 237, MsgLen, 2, 89, Option, <Data…>, 3 | Write Text to LCD+ |
7
|
0*, 237, 4, 2, 77, Option, 3, 0, 0 | Enable/Disable Reader+ |
8
|
0*, 237, 4, 2, 66, BeepStr, 3, 0, 0 | Control Beep+ |
9
|
0*, 237, 3, 2, 70, 3, 0, 0, 0 | Blink Display+ |
10
|
0*, 237, 3, 2, 64, 3, 0, 0, 0 | Initialize Device (Reset)+ |
11
|
0*, 137, 137, 0, 0, 0, 0, BeepCtrl, 18 | Control when beep occurs based on events |
12
|
0*, 151, 32, 2, 0, 0, 0, 0, 0 | Beep device 18ms at 2000 Hz |
*In most cases this number is 0. This number is read from the input report.
+Acknowledgement is sent after sending the output report.
1. Set LED State
Byte 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7
|
Byte 8
|
Byte 9
|
Constant
|
LED Command
|
LEDs for keys 0 to 7
|
LEDs for keys 8 - 15
|
Constant
|
Constant
|
Constant
|
Constant
|
Constant
|
0
|
148
|
LED1
|
LED2
|
0
|
0
|
0
|
0
|
0
|
LED1: Bit 1=LED for key 0, bit 2=LED for key 1, bit 3=LED for key 2, bit 4=LED for key 3, bit 5=LED for key 4, bit 6=LED for key 5, bit 7= LED for key 6, bit 8=LED for key 7.
LED2: Bit 1=LED for key 9, bit 2=LED for key 10, bit 3=LED for key 11, bit 4=LED for key 12, bit 5=LED for key 13, bit 6=LED for key 14, bit 7= LED for key 15, bit 8=LED for key 16, see Figure 2 for key numbers.
Example: A value of 67=1+2+64 would turn on the LEDs for keys 0, 1 and 6.
2. Set Unit ID
The Unit ID is a value between 0 and 255 which can be set and read. This number stays permanently in the device independent of computer. It is useful if more than one device of the same PID will be connected to the same computer in order to distinguish the devices uniquely.
Byte 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7
|
Byte 8
|
Byte 9
|
Constant
|
General Command
|
General Command
|
Constant
|
Constant
|
Constant
|
Constant
|
Unit ID
(0-255) |
Unit ID Command
|
0
|
137
|
137
|
0
|
0
|
0
|
0
|
value
|
16
|
3. Request Descriptor
After sending this command the next ReadData or callback notification will be the descriptor data as described in Input Report 3., see above.
Byte 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7
|
Byte 8
|
Byte 9
|
Constant
|
General Command
|
General Command
|
Constant
|
Constant
|
Constant
|
Constant
|
Constant
|
Request Descriptor
|
0
|
137
|
137
|
0
|
0
|
0
|
0
|
0
|
132
|
4. Clear LCD Screen
The device will reply with an Acknowledgement.
Byte 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7
|
Byte 8
|
Byte 9
|
Constant
|
LCD Command
|
Message Length
|
Start Byte
|
Clear Command
|
Stop Byte
|
Constant
|
Constant
|
Constant
|
0
|
237
|
3
|
2
|
67
|
3
|
0
|
0
|
0
|
5. Display Pre-Saved Message Page on LCD
The device will reply with an Acknowledgement.
Byte 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7
|
Byte 8
|
Byte 9
|
Constant
|
LCD Command
|
Message Length
|
Start Byte
|
Write Default Text Pg
|
Constant
|
Page #
|
Stop Byte
|
Constant
|
0
|
237
|
5
|
2
|
68
|
48
|
Page
|
3
|
0
|
Page: The page number. The following is a list of the default text pages.
49 – Welcome 53 – Card error 57 – Verify fail
50 – Enter PIN 54 – Press ENT 58 – Re-enter PIN
51 – PIN error 55 – Time out 59 – Thank you
52 – Swipe card 56 – Please try again 60 – Not working
6. Write Text to LCD Screen
The device will reply with an Acknowledgement. The Write Text
to LCD Screen requires several WriteData commands if the desired text is longer
than 2 digits since only 9 bytes at a time can be sent. The first table
present the general format to write text. Each WriteData command must
include the LCD Command= 237 and the Data Length= MsgLen. The start and
stop bytes occur only once in the series of write commands.
Byte 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7
|
Byte 8
|
Byte 9
|
Constant
|
LCD Command
|
Message Length
|
Start Byte
|
Write Text Command
|
Save Text Option
|
Message Data
|
Message Data
|
Stop Byte
|
0
|
237
|
MsgLen
|
2
|
89
|
Option
|
<data…>
|
<data…>
|
3
|
MsgLen: The length of the message to follow including start and stop bytes. Maximum value possible is 6.
Option: 48 to show text but never save it or 49 to 60 to show text and save it to the text message page number corresponding to Option. See Output Report 5.
The maximum number of text characters is 32 per page. The maximum number of pages is 12. If save text to page option is selected the new message will replace the pre-saved page of the factory default for next use.
Example: The following shows the 3 output reports needed to write an 11 character message of ABCDEFGHIJK.
Byte 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7
|
Byte 8
|
Byte 9
|
Constant
|
LCD Command
|
Message Length
|
Start Byte
|
Write Text Command
|
Save Text Option
|
Message Data
|
Message Data
|
Message Data
|
0
|
237
|
6
|
2
|
89
|
48
|
65
|
66
|
67
|
Byte 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7
|
Byte 8
|
Byte 9
|
Constant
|
LCD Command
|
Message Length
|
Message Data
|
Message Data
|
Message Data
|
Message Data
|
Message Data
|
Message Data
|
0
|
237
|
6
|
68
|
69
|
70
|
71
|
72
|
73
|
Byte 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7
|
Byte 8
|
Byte 9
|
Constant
|
LCD Command
|
Message Length
|
Message Data
|
Message Data
|
Stop Byte
|
Constant
|
Constant
|
Constant
|
0
|
237
|
3
|
74
|
75
|
3
|
0
|
0
|
0
|
7. Enable/Disable Reader
The device will reply with an Acknowledgement.
Byte 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7
|
Byte 8
|
Byte 9
|
Constant
|
LCD Command
|
Message Length
|
Start Byte
|
Enable/Disable Reader
|
Reader Option
|
Stop Byte
|
Constant
|
Constant
|
0
|
237
|
4
|
2
|
77
|
Option
|
3
|
0
|
0
|
Option: 49 to enable the reader or 48 to disable the reader.
8. Control Beep
The device will reply with an Acknowledgement.
Byte 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7
|
Byte 8
|
Byte 9
|
Constant
|
LCD Command
|
Message Length
|
Start Byte
|
Control Beep Command
|
Beep String
|
Stop Byte
|
Constant
|
Constant
|
0
|
237
|
4
|
2
|
66
|
BeepStr
|
3
|
0
|
0
|
BeepStr: Each bit either 0 or 1. Each 1 will activate the beeper, 0 will stop the beeper. Each bit controls the beeper for 0.1 sec.
Example: BeepStr=11110101=245 sounds like “BBBB-B-B”.
9. Blink Display
The device will reply with an Acknowledgement. Display will blink until the device is interrupted by next operation.
Byte 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7
|
Byte 8
|
Byte 9
|
Constant
|
LCD Command
|
Message Length
|
Start Byte
|
Blink Command
|
Stop Byte
|
Constant
|
Constant
|
Constant
|
0
|
237
|
3
|
2
|
70
|
3
|
0
|
0
|
0
|
10.Initialize Device (Reset)
The device will reply with an Acknowledgement. If successful all settings are reset to factory default.
Byte 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7
|
Byte 8
|
Byte 9
|
Constant
|
LCD Command
|
Message Length
|
Start Byte
|
Initialize Command
|
Stop Byte
|
Constant
|
Constant
|
Constant
|
0
|
237
|
3
|
2
|
64
|
3
|
0
|
0
|
0
|
11. Beep on keypress
Byte 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7
|
Byte 8
|
Byte 9
|
Constant
|
General Command
|
General Command
|
Constant
|
Constant
|
Constant
|
Constant
|
Beep Control
|
Constant
|
0
|
137
|
137
|
0
|
0
|
0
|
0
|
BeepCtrl
|
18
|
BeepCtrl: 0=no beep, 1=beep. Bit 3= auto beep if key is pressed.
12. Beep device 18ms at 2000Hz
This beep is different in frequency from the Control Beep described in output report 8. This is a single shot only beep.
Byte 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7
|
Byte 8
|
Byte 9
|
Constant
|
Single Beep
|
Single Beep
|
Single Beep
|
Constant
|
Constant
|
Constant
|
Constant
|
Constant
|
0
|
151
|
32
|
2
|
0
|
0
|
0
|
0
|
0
|