A jQuery Plugin To Handle Support For Scriptel ST1501U Web Signature Pad
- Start: Right Brace ('}')
- Pen Up: Space (' ')
- Complete: Right Bracket (']')
When a signature transmission is started, an identifying sequence is sent to the host before the first coordinate data. This sequence consists of:
- a start character
- the string
SCRIPTEL
(with caps lock off) orscriptel
(with caps lock on) - a pen up character
- a variable length string containing the protocol version – currently
A
- a pen up character
- a variable length string containing the device model – e.g.
ST1501
- a pen up character
- a variable length string containing the firmware version – e.g.
01.00.04
- a pen up character
Example Signature Preamble: }SCRIPTEL A ST1501 01.00.04
(includes a trailing space)
The actual signature is encoded as follows:
- A radix-23 encoding scheme is used to convert coordinate values from 0 to 499 into two characters ("digits").
- The most significant "digit" and the least significant "digit" are converted to key codes using different encoding tables to ensure that both "digits" can be transmitted simultaneously.
- The X coordinate key codes are transmitted with the Shift indicator set TRUE while the Y coordinates are transmitted with the Shif indicator set FALSE.
- A coordinate point will always consist of two “shifted” key codes followed by two “un-shifted” key codes.
Example Coordinates Point: F?7;
(F?
is X, ;7
is Y)
The decoder function can be used to identify the numerical values as follows:
F == 15
Found In Most Significant Digits For X? == 18
Found In Least Significant Digits For X- We know
X = (MSD*23) + LSD
, soX = (15 * 23) + 18
orX = 363
; == 19
Found In Least Significant Digits For Y7 == 7
Found In Most Significant Digits For Y- We know
Y = (MSD * 23) + LSD
, soY = (7 * 23) + 19
orY = 180
- Therefore, we have our point at
(363, 180)
Note that while the coordinate pair will come as two "shifted" key codes (the full X value) followed by two "un-shifted" key codes (the full Y value), the order of the Most Significant Digit (MSD) and the Least Significant Digit (LSD), together making up either the X or Y value, cannot be assumed but must be determined using the decoder mapping. E.g. F?7;
== F?;7
== ?F7;
== ?F;7
and all represent the same point (363, 180)
.
The signature is defined as complete when the user selects and releases the "OK" button on the signature pad. This causes a special complete character to be reported to the host. There may or may not be a pen up reported prior to complete.
Full Short Signature Example: }SCRIPTEL A ST1501 01.00.04 ${a'%Ma[%Nbm%Obr%Obs%Obt%Obu%Obw%Obx%Obw%Obv ^Ub;^Ub=^Ub[^Ub\^Ub[ ]