Problems with reverse telnet. Telnet is working, raw isn't


I have a very simple setup with a PortServer TS 16 with a GSM modem, used to send SMS messages using AT commands, connected to port 1 via RS232.
My problem is that I can reverse telnet to port 2001 and everything works but when connecting to the raw port 2101 it do not work.

Telnet trace (Red is me , blue is modem ):
$ telnet ser2eth1 2001
Connected to ser2eth1.
Escape character is ‘^]’.
Connection closed by foreign host.

Now I try with netcat for a raw connection (Red is me , blue is modem ):
$ nc ser2eth1 2101

This is strange because I was expecting an ‘OK’ but it only seems to echo what I type. Even ‘unknowncommand’ which is’nt understood by the modem.

Anybody know why this is happening?

A dump from the TCP/IP connections gives:
00000000 61 74 0a at.
00000000 61 74 0a at.
00000003 75 6e 6b 6e 6f 77 6e 63 6f 6d 6d 61 6e 64 0a unknowncommand.
00000003 75 6e 6b 6e 6f 77 6e 63 6f 6d 6d 61 6e 64 0a unknowncommand.

This tells me that the echoed line is really received from the PortServer and not the netcat that somehow should have echoed the data.

This is how the PortServer is configured:

#> show version

PortServer TS 16 Rack(55000888-01):

Component Part-Number Release-Tag

Boot/Post 82000685 release_82000685_C
Running EOS 82000684 release_82000684_G

#> set line range=1

tty baud csize parity stopb break error inpck istrip onlcr otab

1 19200 8 N 1 ignore null off off off off

#> set port range=1

tty termtype dev sess uid edelay auto bin group dport dest

1 vt100 prn 1 none 1 off off none none none

Any ideas? This is VERY strange?

Best regards,

  • Morten Green Hermansen, Fanitas

Why is the raw socket needed?

It seems the modem is not able to interpret the data over the raw socket and the standard socket is needed.

Here is an article explaining the differences:

Raw is needed because it is controlled by an application and not a human. I do not want to implemented the telnet protocol just to issue AT commands.
I also considder telnet a human protocol and raw an application ‘protocol’.
I am not sure about “the modem is not able to interpret the data over the raw socket”. As is statet in the link you send “… we will open the socket connection and pass all data sent to the port through. When set to raw the PortServer TS will not parse through any of the data.”
So the modem gets exactly the bytes I send to it, meaning that if it do not understand it is because I send it incorrectly. But as you can see in the trace I do not.
Could it be a problem with flow control? Can it be an incorrect cable (incorrect support for flow control)?
This seems very basic! :-S

I doubt flow control will be a factor when sending only 2 bytes. Plus, it works with the standard socket.

Same with cabling, if the cable was wrong, it would not work on the standard socket.

At this point, you should check with your modem manufacturer as the PortServer is simply passing through the data you send (which can be easily confirmed by plugging in the loopback plug in place of the modem).