GENERIC PROTOCOL
33
After the command string has been executed, the routing switcher returns the string "
OK
" (with
a single space character before and after the word "OK"), followed by the trailer (!!) and a CR
(carriage return, ASCII 0D) character, to the host. This indicates that the command has executed
successfully. If an error occurs within any command of a command string, the remainder of the
command string is ignored and the router returns the string "
ERROR
", followed by
an optional
descriptive string
followed by a string of trailer characters and a CR character, to the host. An
error can be caused by an unknown command name or bad arguments to a command.
The simplest possible command string would be:**!! which consists of the leader and trailer
characters but no commands between them. This command string would generate the response:
** OK !!<CR>
This can be useful for verifying that the serial link to the router is operational. In routers requiring
only one leader/trailer character, the simplest command string would be: *! which would generate
the response:
* OK !<CR>
(To determine whether a particular router uses one or two leader/trailer characters, send it "!!**"
and check the response to see which of the above two responses it is. It won’t hurt to always use
two even if only one is required.)
The simplest error response is one with no optional descriptive string. For example, this
command string:
** XXX !! might generate this response from the router:
** ERROR Syntax: No Number:XX !!
The descriptive string always ends with a colon and up to three characters from the command
string that caused the error. Generally, the error can be assumed to have occurred just before
these characters.
Leader and Trailer
The simplest possible command string would be “**!!” which consists of the leader and trailer
characters but no command between them. This command string would generate the response
“**OK!!” followed by “CR”. This can be useful for verifying that the serial link to the switcher is
operational.
The following is the set of commands available for sending to the router, a subset of which may
be implemented in any given routing switcher.