I´ve been using serial port with TCP socket profile for sending data through Ethernet connection.
I´ve been testing the socket and the serial port for some applications that i´m working. Question is about some options in configuration the TCP socket, I´ve configured the Gateway as server in TCP socket and I´ve used ports 2001 (Telnet) and 2101 (Raw TCP)and I´ve gotten successfully transmissions, but I have not could figure out what´s the difference in using the tcp port (2001) option or 2101 port(raw tcp). In general, I´d like to know what it´s a Raw tcp socket, and what is the difference between using a serial-tcp socket in ports (2001)telnet, (2101) raw tcp, (2501) ssh, (2601) secure socket.
Also I´d like to know the differences when I configure the Gateway for connection in TCP client mode, because it has same options as in server mode.
I wait for your answers
I know the ports 2001 and 2101 differ in the sense that the 2001 port will try to interpret some ascii data as telnet commands rather than simply relaying the data on as the 2101 port does. To test this out, you may want to send the complete ascii set (0x00 - 0xFF) through both port 2001 and 2101 and use a wire sniffer like WireShark to see the difference.
The ports 2501 and 2601 are similar to the above two, one is a raw medium (port 2601) that will relay the data and the other will make some attempt to interpret the data before relaying it (port 2501). These two ports will additionally encrypt the data over the TCP network according to whatever the encryption options the device has.