Echo (X) command
|Top Previous Next|
Description (see command description format info here)
nnn.nnn.nnn.nnn.nnn.nnn- MAC-address of the DS;
ppppp- data port numberof the DS;
m- fixed to 'N' (means that the application firmware, not the NetLoaderis running);
e- error status: '*' (no errors detected), 'E' (running in the error mode); 'N' (Ethernet port failure)
i- IP-address status: '*' (not obtained yet), 'I' (obtained via DHCP), 'M' (fixed, set manually);
c- data connection status: '*' (closed), 'A' (sending ARP OR [V3.54+] establishing PPP link), 'O' (being established), 'C' (TCP connection established or being closed), 'U' (UDP connection established), 'R' (reset by remote host), 'F' (Link Server login failed), 'L' (Link Server login in progress);
[V3.54+] p- only returned when command version parameter of >1 is supplied: '*' (PPPoE disabled), 'D' (PPPoE login denied), 'N' (PPPoE link not opened), 'B' (PPPoE link is being established), 'P' (PPPoE link established);
E- Ethernet-to-serial bufferoverflow: '*' (no overflow), 'E' (overflow detected);
S- serial-to-Ethernet bufferoverflow: '*' (no overflow), 'S' (overflow detected);
oo...o- owner name;
dd...d- device name.
The primary use of the network Echo command is to auto-discover Device Servers on the network: when the network host sends this command in the broadcast mode, it collects the replies from all locally attached Device Servers (hence, the name of the command). Reply from each DS contains all necessary information (MAC-address, etc.) that is needed to continue communicating with each specific DS in a non-broadcast mode.
Information returned by the Echo command contains the following data:
Optional command version parameter has been introduced in firmware V3.54. Command version is a decimal number (up to 255). When command version is omitted it is assumed to be 1. Earlier firmware releases do not support this parameter and will simply ignore it (result will be the same as having command version set to 1). When command version of 2 or higher is supplied Echo command returns an additional p flag in the reply. This flag reflects the state of PPPoE link.
Example #1: supposing X command returns the following reply**:
This means that the MAC-address of this DS is 0.150.30.213.55.74, data connections are accepted on port 1001, the DS is operating normally, has serial programming in progress. The IP-address of this DS was successfully obtained via the DHCP, TCP connection is currently established, serial-to-Ethernet buffer overrun has been detected (within current data connection). The owner name and device name of this DS is "BigCorp" and "Device1" respectively.
Example #2: here is a command with version parameter**:
In this example the DS is operating normally, is not being programmed, has a fixes IP-address (DHCP is off), has UDP "connection" in progress and PPPoE link established.
It is noteworthy that reply to Echo command should not be parsed basing on the optional command version parameter. Remember that older firmware ignores this parameter so there is no guarantee that extended information (p flag) will be returned by the DS. Of course, it is always possible to process the reply basing on the firmware version of the DS but recommended solution is to simply check the presence of additional ASCII character before the forward slash that separates flags mseic[p] from flags E and S.
Some comment should also be made about flag c. Status 'A' of this flag now means that either ARP packets are being sent in order to discover the destination network host OR PPPoE link establishment is currently in progress. The usage of a single status to designate these two different processes is possible because they are never needed at the same time. When PPPoE is enabled (PPPoE Mode (PP) setting is either 1 or 2) and the destination host is on a different network segment the DS doesn't need an ARP but needs to establish a PPPoE link (for more information see PPPoE). In all other cases the DS doesn't need PPPoE but has to send ARP.
When issued through the serial port, the Echo command returns the same information minus the MAC-address, data port number, owner name, and device name fields. This is because these fields are only needed to discover and identify the DS on the network and are not required on the serial side. The primary application of the serial Echo command is for the attached serial device to inquire current data connection and routing status of the DS. This may be used by the serial device, in conjunction with the modem commands (serial-side parameters and instructions) to control and monitor data connection establishment and termination by the DS.
There is also a Status (U) command that returns additional information about the status of the DS.
* This is because each DS, like any other Ethernet device, has a unique MAC-address preset during the production.
** Encapsulation characters such as IEC, STX, CR, and the command ID field are not shown