I am trying to make run my arduino as a simple telnet to serial converter, using the Ethernet Shield. I get the messages from telnet to serial without problems, but the way back doesn't work as expected. It doesn't transmit the CR/LF in the end.
My target is to transmit a line (ending with CRLF) from telnet to serial, and the way back. Any Ideas how to do?
Does the data from the serial line have a CR/LF at the end? You really shouldn't need anything else to handle the non-printing characters. Note that "telnet" is not involved here; Telnet is a protocol that has its own idiosyncrasies, including some funniness with line termination (CR/LF, etc.) You have a simple serial to "tcp raw" device, which should be fine as long as the program at the other end isn't too picky...
Mmmh, I should try if it works...
I like to connect an ELM322-Chip, what is a kind of Modem (unterstanding AT-Commands) for OBD2. Talking to this Converter worked fine, then I found an iPhone-App ("REV"), what sends commands via Port 10000 to an Ethernet Device.
I checked this output with netcat, and I saw a "ATZ" appearing
So now I try to listen with my Arduino to this Port (23 is just for testing), and send via serial to the ELM.
If it's purely RAW, it should work, yes! Why the written line just appears when I press "ENTER"? I expected, it comes in the moment I press the key. But this might be the behaviour of telnet or the terminal software...
Thanks for this hint, I will write the result tonight!
Why the written line just appears when I press "ENTER"?
Are you using the "Serial Monitor" window of the Arduino IDE as your terminal program? It does NOT send CR/LF at the end of the string when you hit enter!