Identifying an Enzian over USB

As we explained in our post about the Enzian rear panel there are two client USB ports on Enzian: one for the JTAG scain chain and one for the system UARTs. The JTAG chip on the Enzian main board has a pre-configured JTAG cable ID that is unique. The serial-to-USB converter by default does not have a unique ID though. If you just plug one Enzian into your machine that does not matter, however we have 9 of these machines all plugged into our gateway server.

So, how do we tell them apart? The short answer is we cannot. The slightly longer answer is that we can check the Linux kernel logs when we plug them in one by one and identify them by the USB path. This however, means that if we ever change the USB port assignments on the gateway machine we loose track of which set of consoles belongs to which Enzian. Nothing that cannot be fixed with a label maker and careful tagging of cables and ports.

However, there is a better solution: The FTDI FT4232H that we use as a USB UART can be attached to an EEPROM that can then hold custom values for the USB descriptor like the vendor and product IDs, manufacturer name, description and a serial number. The vendor and product IDs are used to find appropriate devcice drivers so we do not want to customize these. The other values are however not interpreted by the Linux kernel but can be matched agains with udev rules. The rules can then be used to create descriptive symlinks to the consoles.

Unfortunately the current version of the Enzian mainboard does not have an EEPROM attached to the FT4232H. However, it does have the signals pinned out to test points. So we designed a small patch PCB that includes the EEPROM and necessary support circuitry. David then used the opportunity to teach a handful of Enzian doctoral and Master’s students how to use the SMT soldering equipment in our electronics lab. So we left our keyboards and monitors for an afternoon, populated the PCBs and soldered one onto a partially populated board that we use for testing firmware. In the following a few impressions:

Ben (l) and Abishek (r) assembling and hot air soldering the PCBs
Ben (l) and Abishek (r) assembling and hot air soldering the PCBs
The finished PCBs
The finished PCBs
The patch PCB soldered onto an Enzian mainboard
The patch PCB soldered onto an Enzian mainboard

After programming the EEPROM with the tool provided by FTDI, the following appears in the Linux kernel logs on a host machine:

usb 1-6.4.1: new high-speed USB device number 43 using xhci_hcd
usb 1-6.4.1: New USB device found, idVendor=0403, idProduct=6011, bcdDevice= 8.00
usb 1-6.4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-6.4.1: Product: Enzian v3
usb 1-6.4.1: Manufacturer: Systems Group, ETH Zurich
usb 1-6.4.1: SerialNumber: E0030001

We can now identify each individual Enzian machine from its USB information, and it proudly announces itself as an Enzian when you plug it into a PC.