Modem control characters

If you need to include non-printable control characters in the hmod_data parameter, you can use any of the following methods:

  • Include one or more of the escape sequences listed in Table 1, preceded and followed by / (forward slash) characters. For example, to include the CR (carriage-return) character, include /CR/.
  • Include the decimal value of the control character, preceded and followed by / (forward slash) characters. For example, to include the control character with value 135, include /135/.
  • Specify the parameter as a hexadecimal array instead of a character string, so that each character in the string is specified by a pair of hexadecimal digits instead of a printable character or escape sequence.

Table 1. Escape Sequences for Modem Control Characters
Escape Sequence Decimal Value Hexadecimal Value
NUL 0 0x00
SOH 1 0x01
STX 2 0x02
ETX 3 0x03
EOT 4 0x04
ENQ 5 0x05
ACK 6 0x06
BEL 7 0x07
BS 8 0x08
HT 9 0x09
LF 10 0x0A
VT 11 0x0B
FF 12 0x0C
CR 13 0x0D
SO 14 0x0E
SI 15 0x0F
DLE 16 0x10
DC1 17 0x11
DC2 18 0x12
DC3 19 0x13
DC4 20 0x14
NAK 21 0x15
SYN 22 0x16
ETB 23 0x17
CAN 24 0x18
EM 25 0x19
SUB 26 0x1A
ESC 27 0x1B
FS 28 0x1C
GS 29 0x1D
RS 30 0x1E
US 31 0x1F
SP 32 0x20
DEL 127 0x7F