Port Number (PN) setting

Description

(see setting description format info here)

Function:Defines the data port number of the DS
Set (S) command format:SPNppppp, where ppppp is the port number in the 0-65534 range. Also, port 32767 cannot be used when current Transport Protocol (TP)[setting/parameter] is 0(UDP). Additionally, for firmware 3.5x and above, port 23 cannot be used when current Transport Protocol is 1(TCP)
Get (G) command format:GPN
Init (I) command effect:Initialized unconditionally, through network command, serial command, or quick initialization
Post-initialization value:1001
Change takes effect:After reboot
Overriding parameter:---
Relevance conditions:---
First introduced:Earlier than "baseline" V3.14/V3.51
See also:Ethernet port and network communications, Network programming

Details

This setting defines the Data Port on which the DS is accepting incoming data connections.

For UDP communications, outgoing UDP datagrams are also sent from this port. For TCP communications the DS accepts incoming data connections on the data port but establishes outgoing connections from a pool of ephemeral ports in the 10000-10255 range (port number is incremented with each new connection).

Port 65535 is excluded from the allowable range because port 65535 is a programming port of the DS- command UDP datagrams are sent to this port. Technically, this only affects UDP communications, TCP connections should still be able to use this port but the port 65535 was not allowed to be selected as the data port from the early versions of DS firmware so this restriction is now preserved for "historical" reasons.

Since programming UDP datagrams can now also be sent to port 32767, this port cannot be used for UDP data communications when current Transport Protocol (TP)[setting /parameter ] is 0 (UDP). The DS will allow the Port Number to be programmed to 32767 but all data sent to this port in the UDP mode will be interpreted as programming commands. Using port 32767 for TCP communications won't cause any problems.

New telnet programming method introduced in firmware V3.5x uses telnet port 23 for DS programming as well. Any connection established to port 23 of the DS is interpreted by the DS as a programming connection. Therefore, this port cannot be used for data connections when the current Transport Protocol (TP) is 1(TCP). Older firmware does not use port 23 for programming so this restriction does not apply.