The text of a manual · part 13 of 18
TouchProbe Communications for DOS Computers, pages 121 to 130
Pages 121 to 130 of 171
The original document is the PDF (1.7 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Videx TouchProbe
Page 121
M Commands* The M commands are command strings or messages for communications between the TouchProbe and modem or between the TouchProbe Downloader Plus and the modem. The following characters have special meaning and are translated as shown before they are sent to the modem. Character
Command M0*<string>
Description
~
Imposes approximately 1 second pause before sending next character
|
Carriage return (ASCII 13)
`
Line feed (ASCII 10) Description Initialization string to send to the modem when the TouchProbe is in Answer mode. Default: Range:
*
M1 <string>
Initialization string to send to the modem when the TouchProbe is in Dial (originate) mode. Default: Range:
*
M2 <string>
|~AT&FE0| 1–80 characters
|~AT&FE0| 1–80 characters
Dial string sent when the TouchProbe is in Dial mode. Default:
| ~ATDTxxx-xxxx| Range: 1–60 characters
Appendix F Writing a Download Program for TouchProbe
113
Page 122
Command *
M3 <string>
Description Modem BUSY string. This string should match whatever the modem sends back when the line is busy. When the TouchProbe receives a match to this error code, it triggers a retry. (See the H command). Note that a substring match will work, but the substring should be long enough to uniquely identify the modem’s result code. Default: Range:
M4* <string>
Modem NO DIALTONE string. This string should match whatever the modem sends back if it detects no dial tone when it goes off hook. When the TouchProbe receives a match to this error code, it triggers a retry. (See the H command) Note that a substring match will work, but the substring must be long enough to uniquely identify the modem’s result code. Default: Range:
*
M5 <string>
*
NO CARRIER 1–20 characters
Modem hang-up command. This string is sent to the modem to terminate a call. Default: Range:
114
NO DIALTONE 1–20 characters
Modem NO CARRIER string. This string should match whatever the modem sends back when the connection fails. When the TouchProbe receives a match to this error code, it triggers a retry. (See the H command). Note that a substring match will work, but the substring should be long enough to uniquely identify the modem’s result code. Default: Range:
M6 <string>
BUSY 1–20 characters
~~+++~~ATH| 1–20 characters
Appendix F Writing a Download Program for TouchProbe
Page 123
Command
Description
*
M7 <string> Modem OK string. This string should match whatever the modem sends back when it successfully executes a command. The TouchProbe Downloader Plus attempts to match this string after sending a modem initialization string. Note that a substring match will work, but the substring must be long enough to uniquely identify the modem’s result code. Default: Range:
OK 1–20 characters
*
M8 <string> Modem CONNECT string. This string should match whatever the modem sends back when it successfully connects to another modem. The TouchProbe attempts to match this string after sending the M2 modem dial string. If no match is received after a 60-second period it triggers a retry. (See the H command). Note: A substring match will work, but the substring must be long enough to uniquely identify the modem’s result code. Default: Range:
CONNECT 1–20 characters
Appendix F Writing a Download Program for TouchProbe
115
Page 124
Command
Description
*
M9 <string> Modem RING string. This string should match whatever the modem sends back as a ring indicator. The TouchProbe Downloader Plus responds to this string when a TouchProbe in Answer mode is inserted. Note that a substring match will work, but the substring must be long enough to uniquely identify the modem’s result code. Default: Range:
RING 1–20 characters
Note: When you want the TouchProbe Downloader Plus to answer after more than one ring, begin the string with #<number of rings> where number of rings may be from 1–9. Example: #4RING (answers after four rings) *
MA <string>
Modem Answer command. The TouchProbe Downloader Plus sends this string when it receives the correct number of rings and if a TouchProbe in Answer mode is inserted. Default: ATA| Range: 1–20 characters
116
Appendix F Writing a Download Program for TouchProbe
Page 125
Command Pxxx
Description Sets the TouchProbe’s Host mode inactivity time-out to xxx seconds. When the TouchProbe first enters Host mode the inactivity time-out is set to one second. The inactivity time-out resets to 60 seconds after a successful unlock (I command). Application software desiring a longer inactivity time-out may use the P command to reset it. It should set this soon after unlocking the TouchProbe before it times-out. Valid values are 0–255 seconds. A value of zero sets 256 seconds. The Host mode inactivity time-out is set only for the current session. The P command can influence battery life because the TouchProbe consumes substantially more power in Host mode than in Sleep mode. (Approximately 26 mA vs. 6 µA)
Qxx
Sets a delay (in tenths of seconds) between button reads. Default value is 5 (½ second). A value of zero disables the delay. The delay may be used to minimize “double hits” when reading from or writing to a button. This setting can influence battery life because the TouchProbe processor is active during the delay and consumes substantially more power. (Approximately 26 mA vs. 6 µA)
Appendix F Writing a Download Program for TouchProbe
117
Page 126
Command
Description
Rn
Sets the baud rate to be used the next time Host mode is entered. The default baud rate is 19200. Values for n may be: 0 = 300 1 = 600 2 = 1200 3 = 2400 4 = 4800 5 = 9600 6 = 19200
Stt
Requests the tune sequence currently configured for event tt.
Sttnndd...
Sets event tt to tune sequence nndd, where nn is the note to play, and dd is the duration in 10ms intervals. Range for both note and duration is 0-99. The nndd parameters may be passed up to 10 times to create the desired “tune” (i.e., S04011003080715 sets event 4 to 3 notes).
118
Appendix F Writing a Download Program for TouchProbe
Page 127
Events defined in TP131 are: Event #
Event
Tone Sequence
00 good read
[1610]
01 bad read (timeout while reading)
[0440]
02 good write
[1610][0003][1610]
03 bad write (timeout while writing)
[0420][0003][0420]
04 memory near full
[1103][0903][0003][1103][0903] [0003][1103][0903][0003]
05 memory full
[1115][0030][0540]
06 nothing to do (empty, no config, etc.)
[0720]
07 unknown or unconfigured button type
[0303][0503][0303][0503][0303] [0503][0303][0503][0303][0503]
08 download complete
[0103][0503][0803][1303][0103] [0503][0803][1303]
09 memory corrupt or coldboot
[2302][2102][1902][1602][1402] [1102][0902][0702][0402][0202]
10 button erase
[1008][0001][1208][0001][1608]
11 download in progress
[1401]
12 transfer in progress ‘click’
[1001]
13
TouchProbe recognized by TouchProbe Downloader Plus
[1010][2010]
14*
* dialing phone
[1005][1505][2005]
* answering phone
[1003][2003][1003]
* connected to remote
[1003][2010][1003][2010]
* failed to connect to remote
[1030]
* remote communication finished (received ‘G’ command)
[0503][1303][0503][1303][0503] [1303]
15 16 17 18 * functions supported only by TouchProbe Downloader Plus
Appendix F Writing a Download Program for TouchProbe
119
Page 128
Command
Description
Stt
Requests the tune sequence currently configured for event tt.
T
Requests a reading from the TouchProbe’s internal clock. The TouchProbe responds with an ASCII string of the form ‘yyyymmddhhmms s’.
Tyyyymmddhhmmss Z
120
Sets the TouchProbe’s internal clock. Clears all data in the TouchProbe. This command must be repeated 3 times within a period of 3 seconds before the TouchProbe will perform the action.
Appendix F Writing a Download Program for TouchProbe
Page 129
TouchProbe Download Packet Protocol Definition Due to hardware constraints in the TouchProbe, all communication has to happen in simplex mode. The host starts the download by sending the Download command as specified in the TouchProbe Configuration Application Program Interface. The TouchProbe responds by sending the first data packet, and waiting for the acknowledgment from the host. If the host does not receive the first data packet within a time-out interval after sending the Download command, it should resend the Download command. Data packets may be up to 1024 bytes in size. A positive acknowledge has to be received before the next data packet is sent. If no positive acknowledge is received within a time-out interval, the packet is resent. If a negative acknowledge is received, the packet is also resent. The number of retries of a data packet is limited, and if the limit is exceeded without receiving a positive acknowledge, the transfer is considered to have failed. End of transfer is indicated by the TouchProbe sending a data packet with the length field set to zero. Packet Structure Each packet starts with a 16-bit header. Each packet contains a 16-bit type field, a 16-bit sequence number starting from zero, and a 16-bit cyclic redundancy checksum. Depending on the type of packet, it may also contain a 16-bit length field, followed by 8-bit data bytes (if applicable). The currently defined packets and their structures are: DATA PACKET <header| type = 1| packet-number| length| data-bytes| crc> POSITIVE ACKNOWLEDGE <header | type = 2 | packet-number | crc > NEGATIVE ACKNOWLEDGE <header | type = 3 | packet-number | crc >
Appendix F Writing a Download Program for TouchProbe
121
Page 130
Data Representation Eight bit data is sent in standard RS-232 format, with a start bit, followed by eight data bits in LSB order, followed by at least one stop bit. Sixteen bit variables are sent in Big Endian format (i.e. high byte first). The Cyclic Redundancy Checksum will be calculated using the polynomial X^16 + X^15 + X^2 + 1. The packet header shall be the 16 bit number 0xFEDC.
Timing Currently, a time-out is considered to have occurred if no positive acknowledge has been received within five seconds upon sending a data packet. If more than six such time-outs occur, the transfer is considered to have failed.
122
Appendix F Writing a Download Program for TouchProbe