1
votes

I need to transfer data from the serial port to the Ethernet port . How can it be done? Using software + hardware or only hardware will do? If so what is the way I can go about it and if it can be done using software is it possible using C?

3
definitely not SF, this IS embedded programming.KevinDTimm

3 Answers

2
votes

If your goal is to attach a serial device to an Ethernet network, you can purchase a serial-to-ethernet "adapter," such as this or this.

I suppose you can also write a background service (in your language of choice) that listens for data on the serial port, and retransmits it onto the network, but I would think a pre-packaged adapter would be less of a hassle.

1
votes

Are you using a PC or is this for an embedded device?

If you're running Windows, take a look at this MSDN article: Serial Communications in Windows

Once you have retrieved your buffer, you can write over TCP/IP or UDP (Lots of tutorials for this available, depending on how you want to do this).

If you need to do this on an embedded device, there are adapters available for purchase, though you can probably roll your own with something like a Netburner system (It'll be more expensive, but you have control over the functionality).

0
votes

VSPE from Eterlogic includes an API and/or and application for creating tcpServer and tcpClient specifically for interfacing with serial ports. Its free for win32, small fee for 64bit. ( http://www.eterlogic.com/Products.VSPE.html )