This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/OMAP-L138: Use serial port as second network port for NDK

Part Number: OMAP-L138

Tool/software: TI-RTOS

Hello,

we want to use a serial port on the OMAP-L138 as a second network (Layer 2) interface to expand the Ethernet network over a low-bandwidth serial link. Due to low cable bandwidth we cannot use plain Ethernet over this specific link, and we dont want to use PPP because that would be Layer 3 and then we would have a different IP subnet and the OMAP would have to act as a router and we dont want that.

So reading into the NDK documentation I saw that there is a Serial mini-driver and it looks like it could be used to create a virtual ethernet-like interface over a serial port (possible with HDLC), which we would like to be bridged (at Layer 2 - act as a switch) with the physical Ethernet interface. So, I have the following questions:

  • Is it really possible to create a Layer-2 network interface over a serial port using the serial mini-driver?
  • Can the NDK create a bridge between two network interface, acting as an ethernet switch? Even acting as an old-style ethernet hub could be a viable option.
  • Does the NDK on the OMAP-L138 apply flow control (Pause frames) on the Ethernet when acting as a switch? This will definitely be needed because the serial link will be much slower than the Ethernet and any burst coming in from the Ethernet side will need to be regulated to avoid packet loss.

Our plan B is to use a separate microcontroller (eg. TM4C129) connected to another switch port that will be dedicated to transferring Ethernet frames between the physical EMAC interface and a serial port (with some form of framing, eg. HDLC). This seems easier to do, either with TIRTOS+NDK, or with bare metal code, and have Pause frames being sent when the UART TX queue is full, but we would like to avoid the extra hardware.

Any help appreciated,

Giannis

  • Hi Giannis,

    The team is notified. They will post their feedback directly here.

    BR
    Tsvetolin Shulev
  • Hi Tsvetolin ,
    thank you for working on this. It would be really helpful for us to have a quick response IF what we want to do is possible at all. If the answer is yes, we can discuss the details later.

    Thank you in advance,
    Giannis
  • Hello,
    is someone from TI looking into this?
    I have found other users also asking about bridging using NDK:
    e2e.ti.com/.../2581287
    e2e.ti.com/.../557061

    Giannis

  • Hello Giannis,

    I'm sorry it has taken so long for you to get a reply.

    From our NDK expert:

    Yes, you can create a dual interface set up with one IF running on the serial port (PPP connection) and another over standard Ethernet. I have done this for Tiva (TM4C1294N) but have not done this for OMAP-L138.

    You could use the Tiva tcpEchoPPP example (available in the TI-RTOS SDK) to see how the serial mini-driver can be set up (make sure to check out the README file included in the example). It will vary somewhat on OMAP-L138, most notably in the peripheral drivers, but the big picture should be the same. Note that this example requires a Linux PC to use. I would recommend getting that example up and running with the Tiva board first, stepping through the code or setting break points, first, in order to understand it well before moving to OMAP-L138.

    Looks like pause frames are supported on the OMAP-L138 hardware (see attached document):

    2.9.1.3 Receive Flow Control

    When enabled and triggered, receive flow control is initiated to limit the EMAC from further frame

    reception. Two forms of receive buffer flow control are available:

    • Collision-based flow control for half-duplex mode

    IEEE 802.3x pause frames flow control for full-duplex mode

    8424.sprufl5b.pdf

    I hope this helps.

  • Hi Sahin,
    thank you for the response. Just to clarify, I understand that the PPP example uses the serial mini-driver to transport IP/Layer 3 packets, while I need to transfer Ethernet/Layer 2 frames. is what the NDK expert suggests to modify the PPP example for Layer 2 communication?

    Would you be able to support us more on this later on?

    Best regards,
    Giannis