Embedded Linux Projects | Ethernet to Serial Bridge

Home Embedded Systems Embedded Linux On Arm Elarm Projects Embedded Linux Projects | Ethernet To Serial Bridge

Ethernet to Serial Bridge

Project Brief

Ethernet to serial bridge is useful to couple different machines having different port connectivity to get the data transferred.

Share via :

About this project

TYPE Individual project
DIFFICULTY Intermediate
ESTIMATED TIME 40 hours
CONTACT training@emertxe.com

Introduction

Ethernet to serial bridge is useful to couple the different machines having different port connectivity to get the data transferred. For example you may have a embroidery machine which supports UART interface. The job to be done have to be transferred to the machine from the central server. So we will have to use a bridge between these to machines.

 

So implement a ethernet to serial bridge which check for the job incoming from the server and pass it to the endpoint. Upon completion of the job the status has to be sent back to the central server.

Requirement Details

The system would be in possibly 2 mode.

  • Configuration Mode
  • Operation Mode

In configuration mode, the user should be able to login to the system using telnet and run a configuration menu which should allow

  • Restoration the device to factory default state
  • Configuration of TCP/IP parameters
    • IP Address, Subnet, Gateway, data transfer port #, bulk transfer port #, device configuration port #, TTL, Inactivity timeout etc.
    • Inter character delay (delay between 2 characters from Ethernet side to serial; higher delay is selected if the device receiving serial data is unable to accept fast transmissions โ€“ 0ms to 99 ms)
  • Configuration of available serial parameters
    • Supports N-8-1, N-8-2, E-8-1, E-7-1, E-7-2, O-8-1, O-7-1 and other such combinations; User should be able to select the constituent parameters independent of each other (Baud, Data bit, Parity and Stop Bit)
    • Character wait time-out (how long the device should wait before sending accumulated serial data to Ethernet side; smaller the value quicker the transmission โ€“ default = 0ms; max = 9999 ms)

In operation mode, the system should support the following features

  • If link on Ethernet side is interrupted while transmitting to Ethernet, re-transmission should start from the byte which was not transmitted successfully
  • Data on non-volatile buffer should be purged after successful transmission, irrespective of destination
  • Should accept data from serial side irrespective of connection status of Ethernet
  • If the available buffer (approximately 4 MB) gets full, stop accepting data from serial or Ethernet side โ€“ do not overwrite existing data
  • Data transfer modes described:
    • Bulk mode
    • Bulk Port is open, Data port is closed, serial data is not buffered; data is discarded if it cannot be sent out via the bulk port.
  • Non-Bulk mode
    • Bulk Port is closed, Data port is open, serial data is buffered
    • Bulk port is closed, Data port is closed, serial data is buffered
    • Bulk port is open, Data port is open, Data port takes precedence, serial data is buffered

Skeleton Code

The skeleton code is a very interesting concept used in Emertxe. By looking into the skeleton code, you will get a clear picture of converting the given requirement into a working solution. This will also take care of important aspects like modularity, clean coding practices, reusability, etc.  

 

similar projects