LXA USB-T1L ❤️ Beagle Play: Exploring Single Wire Ethernet

It seems everybody is talking about Single Pair Ethernet (SPE) these days. So we want to follow the trend and do the same :-) SPE is a class of Ethernet transmission standards that uses just a single pair of twisted pair cable for data transmission. There are multiple SPE variants spanning maximum data rates from a hand full MBit/s to multiple GBit/s and cable lengths from a hand full of meters to kilometers. The most interesting ones from our embedded-centric point of view are 10Base-T1L (point-to-point, up to 1 km), 10Base-T1S (multidrop, approx. 10 m) and 100Base-T1 (point-to-point, 15 m). The new Beagle Play comes with a 10Base-T1L PHY. This makes it a great peer to experiment with our Linux Automation USB-T1L. In this post we will explore the possibilities of 10Base-T1L on a recent Linux system.

The 10Base-T1L standard defines a point-to-point connection between two stations using a shielded twisted pair cable up to 1000 m in length. The standard defines the PHY-layer, so MAC- and all higher layers are shared with normal Ethernet. 10Base-T1L is designed with the industrial automation market in mind and is intended to replace 4..20 mA analog interfaces as well as low-speed field-busses. Currently PHYs are available from Analog Devices and Texas Instruments.

Linux Support for 10Base-T1L

Oleksij Rempel contributed support for the Linux Automation USB-T1L to Linux back in 6.1. Using this or a newer version allows us to plug and play the device like any other USB-to-Ethernet dongle. Linux has full access to the registers of the PHY, so ethtool -S <t1l-interface> will show some additional 10Base-T1L statistics provided by the PHY.

The Beagle Play comes with Debian Bullseye and an (ancient) Linux 5.10 kernel pre-installed but is batteries included to use the 10Base-T1L PHY on the board.

Further details like master and slave on a 10Base-T1L are of no concern for this setup: The defaults inside the PHYs are chosen in way that they are plug-and-play.

Testing Environment

The basic setup for this blog post consists of the following parts:

  • Beagle Play as 10Base-T1L remote station
  • A serial console connection to control the Beagle Play
  • LXA USB-T1L as 10Base-T1L Ethernet dongle
  • LXA Test Automation Controller (LXA TAC) as host for the USB-T1L and to terminate the serial console to the Beagle Play
  • A tiny cable for the 10Base-T1L link (We will use a longer cable later!)

The cable used for 10Base-T1L in this setup is actually not complying to the specification: Instead of a high-quality shielded twisted pair cable (for example a FieldBus Type A cable) we only use an unshielded not-twisted telephone-style cable. But: the cable is so short that probably even two wet strings would do.

The Linux Automation Test Automation Controller (LXA TAC) is used for two jobs in this setup.

First: Provide remote access to the serial console on the Beagle Play using labgrid.

Second: Provide a Linux system with a recent (6.4) kernel for easy use of the USB-T1L Ethernet dongle. On the LXA TAC network manager brings up all newly connected network interfaces. For the sake of simplicity the 10Base-T1L interface (eth0) is bridged onto the upstream Ethernet connection. This way the Beagle Play can access all the network services the TAC has access to, like the DHCP server serving our lab network.

On the Beagle Play no services takes care of configuring the 10Base-T1L network interface, so we'll need to add a systemd network-file to configure the interface on boot:

root@BeaglePlay:~# cat /etc/systemd/network/eth1.network
[Match]
Name=eth1
Type=ether

[Link]
RequiredForOnline=yes

[Network]
DHCP=ipv4

Plugging it together

After all preparations have been done we can simply plug the 10Base-T1L link together and we are ready to go! The following snippet shows the state of the 10Base-T1L phy-level link: We have a full duplex 10 MBit/s link using 10baseT1L. The signal quality indicator (SQI) is only reported on the USB-T1L with a recent kernel. The SQI reports 7 out of 7 - as expected with such a short cable.

root@lxatac-00013:~ ethtool eth0
Settings for eth0:
    Supported ports: [  ]
    Supported link modes:   10baseT1L/Full
    Supported pause frame use: Symmetric Receive-only
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes:  10baseT1L/Full
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Link partner advertised link modes:  10baseT1L/Full
    Link partner advertised pause frame use: No
    Link partner advertised auto-negotiation: Yes
    Link partner advertised FEC modes: Not reported
    Speed: 10Mb/s
    Duplex: Full
    Auto-negotiation: on
    master-slave cfg: preferred slave
    master-slave status: unknown
    Port: Twisted Pair
    PHYAD: 1
    Transceiver: external
    MDI-X: Unknown
    Supports Wake-on: pg
    Wake-on: p
           Current message level: 0x00000007 (7)
                                  drv probe link
    Link detected: yes
    SQI: 7/7

On the Beagle Play ethtool does not report the SQI. But otherwise all relevant metrics are reported:

root@BeaglePlay:~# ethtool eth1
Settings for eth1:
    Supported ports: [  ]
    Supported link modes:   10baseT1L/Full
    Supported pause frame use: Symmetric
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes:  10baseT1L/Full
    Advertised pause frame use: Symmetric
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Link partner advertised link modes:  10baseT1L/Full
    Link partner advertised pause frame use: Symmetric Receive-only
    Link partner advertised auto-negotiation: Yes
    Link partner advertised FEC modes: Not reported
    Speed: 10Mb/s
    Duplex: Full
    Auto-negotiation: on
    master-slave cfg: preferred slave
    master-slave status: unknown
    Port: Twisted Pair
    PHYAD: 1
    Transceiver: external
    MDI-X: Unknown
    Supports Wake-on: d
    Wake-on: d
       Current message level: 0x000020f7 (8439)
                              drv probe link ifdown ifup rx_err tx_err hw
   Link detected: yes

And does the link work? Let's try to ping our lab network default gateway from the Beagle Play. If this works it would mean Ethernet frames are transferred from the Beagle Play to the LXA TAC via a 10Base-T1L link and from there over a gigabit link to our infrastructure.

Nice! What about bandwidth? We'll test throughput from the Beagle Play to the LXA TAC using iperf3. So in this test only the 10Base-T1L link is tested.

As expected, we achieve around 9.0 to 9.5 MBit/s full-duplex throughput in this setup.

Using a long cable

The next logical step is to increase the cable length and find out how far we can push 10Base-T1L. Since we don't have a compliant cable available in our lab we are going to improvise … Let's use CAT6 / CAT7 S/FTP Ethernet cable instead. A S/FTP cable contains four pairs of individually shielded twisted pair cables. So 1m of S/FTP cable actually gives us 4 m of cable pairs to use in our experiment!

To connect the individual pairs two Linux Automation RJ45-Matrix boards are used as breakouts for the RJ45-connectors. The jumper cables are connected in such way that they actually use the twisted pairs inside the S/FTP cable.

By daisy-chaining all 20 m cables from our lab a total cable length of 400 m is achieved. With this less-than-ideal cable the SQI drops to 5/7:

root@lxatac-00013:~ ethtool eth0
Settings for eth0:
    Supported ports: [  ]
    Supported link modes:   10baseT1L/Full
    Supported pause frame use: Symmetric Receive-only
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes:  10baseT1L/Full
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Link partner advertised link modes:  10baseT1L/Full
    Link partner advertised pause frame use: No
    Link partner advertised auto-negotiation: Yes
    Link partner advertised FEC modes: Not reported
    Speed: 10Mb/s
    Duplex: Full
    Auto-negotiation: on
    master-slave cfg: preferred slave
    master-slave status: unknown
    Port: Twisted Pair
    PHYAD: 1
    Transceiver: external
    MDI-X: Unknown
    Supports Wake-on: pg
    Wake-on: p
           Current message level: 0x00000007 (7)
                                  drv probe link
    Link detected: yes
    SQI: 5/7

We can now repeat the full-duplex throughput measurement using iperf3:

As expected the throughput stays around 9.5 MBit/s.

Conclusion

While the hardware-ecosystem around Single Pair Ethernet with 10Base-T1L is still evolving, the software side (at least for basic features) under Linux is already quite usable.

There is still some unused potential however, as the 10Base-T1L standard defines more complex functions like advanced link diagnostics that require the assistance of the remote station. Such feature could come in handy when debugging issues in, for example, an industrial setting.

Are you interested in using 10Base-T1l in your Linux based product? Then feel free to contact us for commercial support!


Further Readings

The USB-SD-Mux is now FAST

We have been distributing the USB-SD-Mux with our partner company Linux Automation GmbH since 2019. This has enabled us to make work easier for many embedded developers and improve software quality. At the same time, technology is advancing: micro SD cards are becoming faster and USB-C is now established as the standard.


Linux Automation's Optick: A Glass-to-Glass Latency Measurement Tool

New Linux Automation GmbH products are often inspired by needs we observe in our day-to-day development work at Pengutronix. Today's new product, the Optick, was inspired by our graphics team, that works with different kinds of video pipelines and optimizes them based on customer demands. One such demand is minimizing the latency of camera to display video pipelines.


USB-SD-Mux now reads SD Card registers

The USB-SD-Mux is designed to make life easier for embedded software engineers by automating the transfer of an SD card between a host PC (deploying a new software image to the SD card) and an embedded Linux device. Since we have introduced this device into our Embedded Linux development workflow back in 2019 we have probably written thousands of SD card images with it. Now the usbsdmux software controlling the device has gained a new feature: It can now read and decode a few SD card information registers. This makes it possible to gain more insight into the capabilities of the used SD card - especially while developing on low-level software and drivers interfacing with the SD card.


Yes we CAN... add new features

Have you ever experienced an otherwise fine product that is missing just the one feature you need for your application?


Showcase: Embedded off-the-shelf

A firmware upgrade is due. A newly implemented feature needs to be rolled out, a security issue patched or new hardware support added. The software, while capable, is complex. Pengutronix' strategy to handle this complexity is working on a version- controlled Board Support Package (BSP) with continuous updates and tests on the latest mainline Linux kernel.


USB-SD-Mux: Automated SD-Card Juggler

Once the bootloader on your embedded device is up and running the development of kernel and userland in PTXdist-based BSPs is usually based on booting from network. Thus there is no need for the developer to write the boot media with a new image.