Moxa Technologies NE-4100 Network Card User Manual


 
NE-4100 Series User’s Manual Serial Command Mode
9-2
Overview
Serial command mode allows the module’s parameters to be retrieved or configured through the
serial port, rather than through the console port or over the network. This is done through the use
of specially parsed commands sent to the module through the serial port. Device manufacturers
can take advantage of serial command mode to add local configuration capability to their products.
For example, card reader manufacturers can use the card reader’s number pad to configure serial
and network settings such as IP address, netmask, and baud rate. Serial command mode thus
allows on-site configuration of devices without requiring a laptop or other additional equipment.
Serial command mode is built into firmware version 3.0 and above.
Serial Command Format and Command Set
Each command and reply is a sequence of case-sensitive ASCII characters transmitted in the
following order: Head, Command Code, OP Code, Parameter, and Tail.
ATTENTION
The carriage return character is used as the last byte or Tail for each data frame; an additional
line feed character is not required. For most systems, the Enter key typically sends a carriage
return character and a line feed character. CR is used to refer to the carriage return character in
most terminal emulators and in this manual, LF is used to refer to the line feed character. In hex,
CR is 0x0D and LF is 0x0A. In C language, “\r” refers to CR, whereas “\n” refers to CR + LF.
Command Structure
Descriptor Bytes Character Description
C-Head 1 “>” fixed value (0x3E)
Command Code 1 “R”, “W”
R: get module parameter
W: set module parameter
OP Code 2 (varies)
Parameter varies (varies)
Tail 1 CR carriage return character, no line feed
For example, the following sequence of characters will instruct the module to change the TCP
server port number to 4001:
>WTL4001 + CR
Available OP Codes and Parameters are described in detail later in this chapter.