Telnet-to-Serial protocol converter with FNET Stack?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Telnet-to-Serial protocol converter with FNET Stack?

Jump to solution
1,913 Views
silentlab54
Contributor III

Hi, I'm trying to use FNET Stack on a TWR-K60D100M-KIT system to build a telnet-to-serial protocol converter.


I'm studying the structure of this stack: it works very good but actually I'm not able to implement this feature with FNET and I need some help, if possible!

I need a direct telnet to serial and serial translation, without any type of shells or user interfaces. Can I do this with FNET's API or is it not possible?


If it's possible, can I have a hint how to do that?


Thanks in advance :smileyhappy:

Labels (1)
1 Solution
1,021 Views
butok
NXP Employee
NXP Employee

Hi,

Just want to confirm, the FNET does not have out of the box solution for the Serial-Ethernet Bridge.

You should take existing services and modify them to follow your needs.

Best regards,

Andrey

View solution in original post

0 Kudos
5 Replies
1,021 Views
martinpi
Contributor III

Hi, I just stumbled upon your qustion which is already answered.

If it is still relevant, there is an out-of-the-box serial-to-telnet example in MQX 3-8-1.

I do not need exactly this, but it is a good basis for my project and it workes out of the box.

Maybe it still helps,

Martin

0 Kudos
1,021 Views
butok
NXP Employee
NXP Employee

Hi,

It is not clear what exactly you want to do.

TCP to Serial-port bridge?

Run Telnet on serial port? => it is already done as the Shell service.

You want Telnet, but you do not want command interface?


Would you describe your system/project in more details?

Thanks,

Andrey

0 Kudos
1,021 Views
silentlab54
Contributor III

Hi Andrey,

TCP (or, specifically, Telnet) to serial port bridge is what I need.

I have to implement a Virtual COM via TCP or Telnet (PC Side) that interchanges data with a Real COM (TWR-SER RS-232) application.

(obviously, TWR kit makes only the Ethernet-to-Serial Bridge, VCOM software on PC is already up&running).

I've tried to do that with FNET shell demo but it don't fits my design idea because I need to implement a "raw" conversion (absolutely no shells on serial port, which is dedicated a specific use).

Thanks in advance for your help :smileyhappy:.

0 Kudos
1,021 Views
mjbcswitzerland
Specialist V

Hi

There are various products using TELNET/UART converters based on the uTasker project (it allows Telnet/raw mode IPv4/v6 client/server connections as well as IPv4/v6 FTP client/UART) - eg:  http://www.xmodus.ch/Downloads/AL6000S/AL6000S-D00-112.pdf (this example doesn't support IPv6 but has a complete user's manual that helps understand the possibilites).

It is however quite easy to do UART/TCP on any TCP socket by simply sending received data from the socket to the UART and sending received UART data to the socket. Sockets are usually classed as TELNET or raw mode depending on whether they do any Telnet IAC negotiation or require IAC scanning of the data stream (not needed if pure binary).

The other tricks that need to be used in a complete product is to solve end-to-end flow control; the Ethernet connection is much faster than UART so the remaining UART buffer size needs to be advertised as TCP reception buffer size so that TCP flow control and UART flow control are synchronised; and there is usually a TCP transmit strategy based on either a certain number of characters from the UART being ready or else a smaller number waiting with a time out occurring. This is used to avoid sending each UART reception byte as a single TCP frame in an attempt to packetise them in larger frames, but with a maximum delay before sending.

Regards

Mark

P.S. This has also been used on Kinetis and Coldfire

1,022 Views
butok
NXP Employee
NXP Employee

Hi,

Just want to confirm, the FNET does not have out of the box solution for the Serial-Ethernet Bridge.

You should take existing services and modify them to follow your needs.

Best regards,

Andrey

0 Kudos