Using the ESPRESSObin Network Switch


Last Update: Oct 31, 2021 @ 10:47

This is an Application Note that investigates how to use the out-of-production Global Scale ESPRESSObin V4 and V7 single board computer, configured as a network switch and an IOT / MQTT Server.

We obtained the ESPRESSObin 4 module in mid-2017 for a since cancelled project, and it’s been sitting unused on a shelf since then. The V4 boards were updated by the similar ESPRESSObin V5 and V7 which included minor schematic and layout changes. The V7 board appears to be still available.

Globalscale’s current consumer product is the ESPRESSObin Ultra, which is intended to be a high end user-programmable router, with no GPIO header options and four LAN ethernet ports. The MOCHAbin has just been released, with a quad-core cpu, four ethernet ports and more connectivity hardware options.

The ESPRESSObin V4 board. Note the SATA power and Data cable connectors.

Since these boards is out-of-production since around 2018, OEM support is now limited to what’s on the espressobin.net pages and the occasionally useful user forum. The forum no longer appears to be moderated.

Put another way, solving all technical issues are up to us.

The final supported version of Ubuntu for ZIP download from ESPRESSObin is 16.04.3 (though the web page says 16.04.4…).

Specifications Summary

SoCMarvell Armada 3700LP (88F3720) dual core ARM Cortex A53 processor up to 1.0GHz
System
Memory
1 GB DDR3 installed (2GB was an option)
Storage1x SATA interface
1x micro SD card slot
Network Connectivity
1x Topaz Networking Switch
2x GbE Ethernet LAN
1x Ethernet WAN
1x MiniPCIe slot for Wireless/BLE peripherals
USB1x USB 3.0
1x USB 2.0
1x micro USB port (for console control)
Expansion
2x 46-pin GPIO headers for accessories and shields with I2C, GPIOs, PWM, UART, SPI, MMC, etc. No shields are known to be commercially available, and it is not economically viable to design one. In addition, the GPIO uses 1.8Vdc, which would require level shifter (1V8 to/from 3V3).
MiscReset button, JTAG interface
Power supply12V DC jack plus several regulators, which also generate 5V DC for the SATA power connector. 5V from USB for virtual console only.
Power usageLess than 1W thermal dissipation at 1 GHz

What is the plan for this board?

Still to be decided in detail. At present, the module is a learning exercise for linux with SATA, networking and kernel updates to support a mPCIe display card. The longer term goal is to make it an MQTT server, with local storage on a SATA SSD card.

The following links are for more detailed instructions, and are based on pages from espressobin.net with corrections and clarifications as needed.

A summary of the above software and hardware updates follows:

Configuring Ubuntu 16.04.3 on to a bootable SD card

A 2010-vintage Asus Aspire laptop with 2.2GHz Pentium dual core, 4GB ram and a 250GB SSD was loaded with Ubuntu 20.04. This laptop was then used to create the SD card needed for the ESPRESSObin project, using the instructions from the ESPRESSObin website. Using a 16GB SD card to build the bootable image, Ubuntu 16.04.3 booted successfully. Some updates were necessary, see below. Updates to Ubuntu 18.04 and 20.04 available, see how below.

Updates needed for ESPRESSObin Ubuntu 16.04.7

$  apt-get update
$  apt-get upgrade
When complete, this results in V16.04.7
$  apt-get install nano      // vi is the only editor present
$  apt-get install pciutils  // lspci and other commands
$  apt-get install usbutils  // lsusb and other commands
Programming tools (gcc and related libraries) are required.
$  apt-get install build-essential
The development environment set up has to be completed.
$   apt-get install linux-libc-dev
Creating a simple "Hello World" console app is now possible.

Updating to Ubuntu 18.04 then to 20.04

Ubuntu 16.04 support ended in April 2021, so it is a good idea to update to a newer version. The process is simple enough, but some additional utilities have to be installed.

Check your current version with lsb_release -a which should report 16.04.

Install the update-manager-core package, get the distribution upgrade info and do the upgrade.

# sudo apt install update-manager-core
# sudo apt-get upgrade
# sudo apt-get dist-upgrade
# sudo do-release-upgrade

# do-release-upgrade -c   // which responds with 
    Checking for a new Ubuntu release
    New release '18.04.6 LTS' available.
    Run 'do-release-upgrade' to upgrade to it.

The upgrade process takes around 30 minutes or so, with several questions to be answered. Here's an important one...

Configuration file '/etc/securetty'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.

When the update is complete, you are asked to do a reboot. First, the file /etc/securetty has to be updated. This file can be replaced by the upgrade process, see above. Use sudo nano /etc/securetty to add a new last line ttyMV0 if needed which allows the root login to work.

If you missed the above, and you cannot log into root, you’ll have to take the SD card over to your build PC, find the SDcard/etc/securetty file and update it.

Note here that while Ubuntu is updated to 18.04, the kernel remains 4.4.52.

Run through the above process again to upgrade to Ubuntu 20.04.

Issues with adding an SSD board

An SSD board can provide substantial additional memory storage, and also act as the boot device, instead of the SD card.

There are available “mini” SSDs that look like mPCIe, but are in fact mSATA boards which use the same connector but with difference electrical properties and signals. mSATA boards have been superceded around 2018 by the new faster M.2 standard which uses a new connector format

mSATA SSD boards with the mPCIe connector are not supportable. There are SATA <– mSATA adapter cards available. On the V4 boards, the best option is to use a small SATA SSD package. On the V7 board, a SATA SSD board (not packaged, e.g. a product intended for laptop internal installation) will plug in directly and vertically.

Adding a SATA disk

The necessary SATA power and data cables were sourced, and an old 2.5″ 80GB disk connected as a test device. Some needed missing utilities were installed.

$    apt-get install parted     // partition editor
$    apt-get install lshw       // hardware reporter

Formatting the disk, creating a single partition and ext4 filesystem, and mounting the disk was successful.

The old 80GB disk was removed, and a new 2.5″ 120GB SSD installed. Formatting the SSD, creating a single partition with the ext4 filesystem, and mounting the disk was successful.

Adding an enclosure and small fan

Measuring the CPU operating temperature showed that it runs at around 40C. While Globalscale state this temperature is not an issue (up to 70C is mentioned), keeping it cooler would be a good idea. The simplest solution was to use a Hammond 1590BB aluminium enclosure with a small 12Vdc fan.

Configuring and using LAN0 and LAN1

The WAN port (when enabled) connects to internet. If the ESPRESSObin is configured / programmed as a network switch (or router) network nodes connected to the LAN0 and LAN1 ports should also be able to connect to the internet.

The WAN port is enabled as follows:

$    ifconfig eth0 up
$    dhclient wan

Similarly, the LAN ports have to be enabled, as follows:

$    ifconfig lan0 up
$    ifconfig lan1 up

Connecting a neXXtech USB-Ethernet device

The neXXtech is an AX88777 device and is somewhat supported in Ubuntu 16.04.7. Most or all linux variants contain the USBnet driver in the kernel, and have (apparently) for years. This driver creates a Linux network interface, which can be assigned an IP address and otherwise treated the same as a true Ethernet interface. Any applications that work over real Ethernet interfaces will work over a USB-eth interface without modification.

Initial tests:

$    lshw       // reports
*-network:4 DISABLED
        description: Ethernet interface
        physical id: 8
        logical name: enx0050b607970d
        serial: 00:50:b6:07:97:0d
        size: 10Mbit/s
        capacity: 100Mbit/s
        capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
        configuration: autonegotiation=on broadcast=yes driver=asix driverversion=22-Dec-2011 duplex=half firmware=ASIX AX88772 USB 2.0 Ethernet link=no multicast=yes port=MII speed=10Mbit/s
// Can this device be controlled? Yes!
$    ifconfig enx0050b607970d up      //  result: works.
// What is reported?
$    ifconfig enx0050b607970d
    enx0050b607970d Link encap:Ethernet  HWaddr 00:50:b6:07:97:0d
           UP BROADCAST MULTICAST  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

What happens if we try to obtain a DHCP address?

$    dhclient  enx0050b607970d
$    ifconfig enx0050b607970d
 enx0050b607970d Link encap:Ethernet  HWaddr 00:50:b6:07:97:0d
           inet addr:192.168.0.151  Bcast:192.168.0.255  Mask:255.255.255.0
           inet6 addr: fe80::250:b6ff:fe07:970d/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:213 errors:0 dropped:0 overruns:0 frame:0
           TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:21518 (21.5 KB)  TX bytes:2064 (2.0 KB) 

The network router has assigned a DHCP address of 192.168.0.151

Can the USB Ethernet logical name be changed? Yes!

$    ifconfig enx0050b607970d down  
$    ip link set enx0050b607970d name usb2eth0  
$    ifconfig usb2eth0 up
// Checking with lshw ...
-network:4
        description: Ethernet interface
        physical id: 8
        logical name: usb2eth0  // now changed this session
        serial: 00:50:b6:07:97:0d
        size: 100Mbit/s
        capacity: 100Mbit/s
        capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
        configuration: autonegotiation=on broadcast=yes driver=asix driverversion=22-Dec-2011 duplex=full firmware=ASIX AX88772 USB 2.0 Ethernet ip=192.168.0.151 link=yes multicast=yes port=MII speed=100Mbit/s

It is interesting that the (now named) usb2eth0 device is operational to some degree. In theory, a USB hub could be connected to the ESPRESSObinUSB3 port, and multiple AX88777 (and similar devices) could be connected, and perhaps used in a similar way to lan0 and lan1.

At present, if the wan cable is connect to lan0, lan1 or usb2eth0, it is not possible to ping external sites. This is to be investigated further.

Tests using the bridge command

If device is connected to usb2eth0 is bridged to wan can the IP address be pinged?

More to be added.