C
C
Appendix CEthernet Modem Commands
A serial port on the NPort can be set to Ethernet Modem mode, allowing a PC or device to connect
to the NPort as if it was an Ethernet modem. This section provides additional detail about how the
NPort operates in Ethernet Modem mode.
Dial-in Operation
The NPort can listen for a TCP/IP connection request from a remote Ethernet modem or host. The
NPort’s response depends on the ATS0 value, as follows.
ATS0=0: The NPort will temporarily accept the TCP connection and then send the “RING” signal
out through the serial port. The serial controller must reply with “ATA” within 2.5 seconds to
accept the connection request, after which the NPort enters data mode. If no “ATA” command is
received, the NPort will disconnect after sending three “RING” signals.
ATS0≧1: The NPort will accept the TCP connection immediately. It will send the “CONNECT
{baudrate}” command to the serial port and will immediately enter data mode.
Dial-out
The NPort accepts ATD commands such as “ATD 192.168.1.1:4001” from the serial port. It will
then request a TCP connection from the specified remote Ethernet modem or PC. Once the remote
unit accepts this TCP connection, the NPort will send the “CONNECT {baudrate}” command to
the serial port and will immediately enter data mode.
Disconnection Request from Local Site
When the NPort is in data mode, you can initiate disconnection by sending “+++”. Some
applications allow you to directly set the DTR signal to off, which will also initiate disconnection.
The NPort will enter command mode, and you can then enter “ATH” to close the TCP connection
“NO CARRIER” will be returned to the serial port.
ATTENTION
When entering “+++” to disconnect, the three “+” characters must be sent in quick succession,
and the sequence must be prefaced and followed by a guard time to protect the raw data. You can
change the disconnect character using register S2. You can set the guard time using register S12.