Trying to understand how TinyFPGA BX appears as a serial device


#1

So I see that part of the installation is to run apio drivers --enable-serial, which apparently runs a program (on Windows) called serial_install.exe. Where does that come from? Does the driver it installs have explicit knowledge that the VID/PID presented by the TinyFPGA is to be communicated with via a serial port?

And now the question I really want the answer to: Is it limited to certain VID/PID pairs, or are all PIDs for certain VIDs always serial? Because I’d like to know how to communicate with a TinyFPGA that is loaded with a USB module that reports the same VID as a TinyFPGA (1d50) but a different PID (so it’s not already allocated by openmoko)…


#2

It depends on your OS, and which version of your OS. Windows 7 and older require at least an INF file to tell Windows to use a standard serial driver. Windows 8 and newer will automatically use a standard serial driver for USB devices that advertise themselves to be CDC communications devices (virtual serial ports).

Older versions of MacOS will automatically use the serial driver, newer versions of MacOS require some sort of driver or configuration to use the standard driver.

Most Linux distributions appear to automatically use a standard serial port driver.

In addition to the VID:PID, there is a class code and a few other codes in the descriptor. OSes will use one, the other, or both to figure out what driver to use.


#3

Ah, that’s what I needed to know. Thanks!