USB HID Service
Introduction
This service offers USB emulation as an HID device.
This is available in AdvanReader Series 70 and AdvanReader Series 160.
This service captures events generated during the system operation and converts them to keyboard events.
Possible events are:
TAG_READ events: as generated from inventory operations
TAG_WRITE events: as generated when writing tags
AdvanPay events:
TAG_ADPY_PAYMENT
TAG_ADPY_RETURN
TAG_ADPY_READ
Configuration
In order to enable and configure this service go to the system tab and in the Services drop-down select USBHIDService
General Settings
The connection options are:
Enabled: to enable/disable the service
true/false
Send read events: allows sending read events
true/false
Send write events: allows sending write events
NONE: disable write events
OLD_EPC: after a successful write, sends the old epc
NEW_EPC: after a successful write, sends the new epc
BOTH: after a successful write, sends the old epc followed by the new epc
Send adpy payment events: allows sending AdvanPay payment events
NONE: disable write events
OLD_EPC: after a successful AdvanPay payment event, sends the old epc
NEW_EPC: after a successful AdvanPay payment event: sends the new epc (if rewrite is enabled)
NEW_IF_EXISTS_____OLD_IF_DOESNT: after a successful AdvanPay payment event: sends the new epc, if it exists, or the old epc if no re-write has been configured.
BOTH: after a successful AdvanPay payment event, sends the old epc followed by the new epc
Send adpy return events: allows sending AdvanPay return events
NONE: disable write events
OLD_EPC: after a successful AdvanPay return event, sends the old epc
NEW_EPC: after a successful AdvanPay return event: sends the new epc (if rewrite is enabled)
NEW_IF_EXISTS_____OLD_IF_DOESNT: after a successful AdvanPay return event: sends the new epc, if it exists, or the old epc if no re-write has been configured.
BOTH: after a successful AdvanPay return event, sends the old epc followed by the new epc
Send adpy read events: allows sending AdvanPay read events
true/false
AdvanPay settings
The AdvanPay settings options are:
EPC Encoding
AUTO: auto-detects encoding. Supported encodings are
gtin96
gid96
bc
gtin96: expects SGTIN96 epcs
gid96: expects GID96 epcs
bc: expects Keonn proprietary BC encoded epcs
none: do not any expect encodings
Convert GTIN14 to GTIN13: when SGTIN96 is used, convert GTIN14 decoded values to GTIN13
true/false
Convert GTIN14 to GTIN12: when SGTIN96 is used, convert GTIN14 decoded values to GTIN12
true/false
Detect GTIN8: when SGTIN96 is used, convert GTIN14 decoded values to GTIN8
true/false
Process uncoded tags: when an encoded epc is expected and is not found, what to do with the epc
true: emulate epc undecoded
false: do not send
Sending advanced conf: advance send options. See following chapter
Post-process regexp: regular expression to post-process symbol just before sending it. See following chapter
Tag TTL (s): do not send the same epc in a certain time window
Chars between EAN codes (ascii codes): comma separated list of chars to be inserted between different symbols sent. Common case is to send a line feed: 13,10
Modifiers: list of modifiers to be sent along with the symbol codes. Allowed modifiers are:
NONE
CTRL_LEFT
SHIFT_LEFT
ALT_LEFT
CTRL_RIGHT
SHIFT_RIGHT
ALT_RIGHT
Connection method to POS PC:
hid
Advanced settings
Sending advanced conf
This allows total control on the symbols sent on any emulated line.
It is expressed as a JSON conf.
Possible symbols sent are:
EPC: undecoded epc
SKU: decoded epc according to certain encoding scheme
SKU_SERIAL: decoded serial found in epc according to certain encoding scheme
URI: the read URI of the EPC (may be empty)
This configuration allow to send something like
3035ea247c437cc0000003e8;8030495691073 (epc;sku)
The JSON expression to send this in a ES keyboard would be:
[{"symbol":"SKU"}, {"chars":",","modifiers":"SHIFT_LEFT"},{"symbol":"EPC"}]
or
[
{"symbol":"SKU"},
{"chars":",","modifiers":"SHIFT_LEFT"},
{"symbol":"EPC"}
]
Or,
8030495691073;10034 (sku;sku-serial)
The JSON expression to send this in a ES keyboard would be:
[{"symbol":"SKU"}, {"chars":",","modifiers":"SHIFT_LEFT"},{"symbol":"SKU_SERIAL"}]
or
[
{"symbol":"SKU"},
{"chars":",","modifiers":"SHIFT_LEFT"},
{"symbol":"SKU_SERIAL"}
]
Or,
8030495691073;10034 (sku;uri)
The JSON expression to send this in a ES keyboard would be:
[{"symbol":"SKU"}, {"chars":",","modifiers":"SHIFT_LEFT"},{"symbol":"URI"}]
or
[
{"symbol":"SKU"},
{"chars":",","modifiers":"SHIFT_LEFT"},
{"symbol":"URI"}
]
SKU_SERIAL is available starting at AdvanNet 2.3.17
Post-process regexp
This allows manipulation of the symbol that is about to be sent through the USB bus.
The manipulation is done through a regular expression:
The regular expression must follow Java regular expression format
The regular expression must define at least one group
The sent symbol will be the first group of the regular expression
Imagine the epcs in certain application are
000833b2ddd9014000010005
They start with one or more 0
They do not follow any encoding scheme
We want to emulate the same epc without the leading 0.
The required regular expression would be
[0]*(.*)\\d$
Advanced JSON conf
This allows additional configuration options:
debug: additional debug messages
keyboardCode: define the keyboard layout that will receive the events.
Available keyboard codes are:
US: covers most of the english speaking countries
IT: Italian
ES: Spanish keyboards
FR: French keyboards
epcInDecimal: if true the epc is sent in decimal instead of hexadecimal
For example the following configuration defines the keyboard as Italian
{"keyboardCode":"IT"}
or
{"debug":true,"keyboardCode":"IT"}
Minimum time between emulations
Adds a delay between prints.
keyboardCode must be defined only when the symbol URI is used.
In case your keyboard is not supported, please contact support@keonn.com
Persist settings
Once the configuration works as expected, persist the changes using the "Save current" button at the top.
Bluetooth
This service can also use bluetooth to send data. More information in Bluetooth HID Service.
Use cases
AdvanPay
For the AdvanPay use case, the screenshot options are the default and work well for the majority of cases as it prints out the EPC EAN code just fine.
Tag Reads
For the cases when the read mode is Autonomous or Sequential and tags must be printed on the USB HID:
Activate Generate TAG READ events under Read modes tab
Activate Enabled
Activate Send read events
Activate Process unencoded tags if your tags' EPCs don't start with 30 (they are unencoded)