True Telnet?

503 views
Skip to first unread message

Chris Morrow

unread,
Jan 17, 2017, 2:46:20 PM1/17/17
to Node-RED

Hello;

I am trying to emulate a true telnet hyper terminal within a flow. The connection is made on port 23 but there is no response from the server. Communication between the telnet server works properly in Teraterm or a hyper terminal, but within my flow I get no response from the server. In Wireshark I can see the server protocol listed as TENET, whereas node-red is listed as TCP. I have added a <CR> as suggested with this forum with no luck.

When the connection is first made with the server, it returns unprompted text strings indicating the server system health.  I do not see these appear or any response in the node-red debug. I am overlooking some glaring error. Any suggestions?

BTW I am microwave communications engineer not a programmer, so just trying to learn some new tools.

I have attached the flow.

Chris


Telnet_Flow.png
WS.png
telnet_not_working.txt

Mark Setrem

unread,
Jan 18, 2017, 7:13:39 AM1/18/17
to Node-RED
If you look at the wikipedia page for telnet it has a section on telnet data format and the differences between it and raw TCP https://en.wikipedia.org/wiki/Telnet.

Have you tried the alternate options in the TCP-In node setup?   I can connect to a "telnet" session on my router by using the option "Output"  "stream of" "Buffer" payload(s)

Chris Morrow

unread,
Jan 18, 2017, 1:31:05 PM1/18/17
to Node-RED
So are you inferring to set up a raw tcp connection with the correct message terminations?
Does anyone have an example they could post?
C

Walter Kraembring

unread,
Jan 18, 2017, 2:37:40 PM1/18/17
to Node-RED
Dave C helped me with this one some time ago,,,it is working fine, maybe could help. It is a bit tailored to a specific host but I think you get the ideas.

Kind regards, Walter




[{"id":"6f7de61.346b118","type":"debug","z":"6b5ceb9e.2f8654","name":"","active":true,"console":false,"complete":false,"x":690,"y":520,"wires":[]},{"id":"f98c45f7.6bd728","type":"tcp request","z":"6b5ceb9e.2f8654","server":"192.168.10.253","port":"8005","out":"sit","splitc":"0","name":"","x":730,"y":360,"wires":[["d214d069.7875a"]]},{"id":"6186a1c.e35ed6","type":"inject","z":"6b5ceb9e.2f8654","name":"connect & subscribe","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"x":250,"y":80,"wires":[["2c21e3bd.be55ec"]]},{"id":"d214d069.7875a","type":"function","z":"6b5ceb9e.2f8654","name":"msg.payload = msg.payload.toString(); return msg;","func":"msg.payload = msg.payload.toString();\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":440,"wires":[["6f7de61.346b118"]]},{"id":"2c21e3bd.be55ec","type":"function","z":"6b5ceb9e.2f8654","name":"msg.payload = '\\n'; node.send(msg); msg.payload = 'subscribe\\n'; node.send(msg);","func":"msg.payload = '\\n';\nnode.send(msg);\nmsg.payload = 'subscribe\\n';\nnode.send(msg);","outputs":1,"noerr":0,"x":460,"y":160,"wires":[["f98c45f7.6bd728"]]},{"id":"c55f7af2.169fc8","type":"inject","z":"6b5ceb9e.2f8654","name":"quit & disconnect","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"x":240,"y":220,"wires":[["4111f34e.a8534c"]]},{"id":"4111f34e.a8534c","type":"function","z":"6b5ceb9e.2f8654","name":"msg.payload = 'quit\\n'; node.send(msg);","func":"msg.payload = 'quit\\n';\nnode.send(msg);\n","outputs":1,"noerr":0,"x":320,"y":300,"wires":[["f98c45f7.6bd728"]]}]

 

Chris Morrow

unread,
Jan 23, 2017, 3:44:58 PM1/23/17
to Node-RED
Walter;
I tried you suggestion with not much luck. I seem to be getting some type of header query, which node-red needs to provide a response, but does not.
 
I am expecting this response:

(/dev/ttypf)
Enhanced, Release 3.0.2 (3189)
Copyright 2002-2015 
All rights reserved.

Username :
Password :


Instead I get this:
see attached
NR output.jpg

Walter Kraembring

unread,
Jan 24, 2017, 12:29:50 AM1/24/17
to Node-RED
Yes, but my example was for a specific server expecting a certain init. You have to modify the content in the first function node so it fits the requirements of the host you are connecting to

Chris Morrow

unread,
Jan 26, 2017, 11:32:09 AM1/26/17
to Node-RED
Yes, I saw that and made those modifications. After some research I see the telnet session begins by negotiating transmission parameters at which node-red did not respond. I believe this is my error.
Reply all
Reply to author
Forward
0 new messages