Add support for multiple SCCAnalogMonitor/FT232H devices
What
This MR updates the labRemote
submodule in order to incorporate the changes that allow for having multiple FT232H devices connected to the same host PC. The way that this works is by specifying, in addition to the USB vendor and product IDs for the device under question (in our case, the FT232H chip on the SCCAnalogMonitor card with USB ids 0x0403:0x6014
) to specify
the device's description and serial number strings. See this labRemote MR for more information.
In order to determine the full description of the FTDI devices connected to your PC, you can run the labRemote
executable ftdi_list
(which compiles to your build directory's ./bin/
folder just as usual):
└─ $ ./bin/ftdi_list
[INFO] : Found 2 FTDI devices matching 0000:0000
[INFO] : Device #0 (0403:6001)
[INFO] : MANUFRACTURER ID :
[INFO] : PRODUCT ID :
[INFO] : SERIAL NUMBER :
[INFO] : Device #1 (0403:6014)
[INFO] : MANUFRACTURER ID : username
[INFO] : PRODUCT ID : SCCAnalogMonitor
[INFO] : SERIAL NUMBER : 1234
See this labRemote MR for more information about ftdi_list
.
Implications for the User
For users of rd53b_anamon
, there are a few changes that need to be made in order to connect to a specific SCCAnalogMonitor card when there are multiple FT232H devices or SCCAnalogMonitor cards connected.
There is now a connection
field that is in the scc config file:
{
"rd53b_scc_analog_monitor":
{
"connection":
{
"serial_number": "c0cac01a"
}
"ntc": {...},
"adc": {...}
}
}
This serial_number
field corresponds to the SERIAL NUMBER
description string associated with the SCCAnalogMonitor card's FT232H chip. When the connection
field is present in the scc config file, when rd53b_anamon
attempts to connect to the SCCAnalogMonitor card it will use the provided value for the device's SERIAL NUMBER
field. The PRODUCT ID
field is not configurable by the user and is assumed to be SCCAnalogMonitor
. The MANUFACTURER
field of the device is not used for connecting to the SCCAnalogMonitor card.
If the connection : serial_number
field is provided, rd53b_anamon
will use this as the device's SERIAL NUMBER
for connecting to the SCCAnalogMonitor card. However, by not providing the connection
block or by leaving the serial_number
field blank/empty string (""
), then rd53b_anamon
will not attempt to connect to the SCCAnalogMonitor card by specifying the device's SERIAL NUMBER
field. Instead, rd53b_anamon
will attempt to connect to the first device with vendor and product IDs matching the FT232H device: 0x0403:0x6014
. That is, if you do not specify the connection : serial_number
field you will not be able to host multiple FT232H devices on your PC while using rd53b_anamon
.
SERIAL NUMBER
attribute
How to Change your SCCAnalogMonitor card's This MR adds the utility set_scc_id
which gets placed under your build directory's bin/
directory alongside all other executables. The set_scc_id
utility is a wrapper around labRemote
's ftdi_setidentity
utility. It requires that the user provide a value for the SCCAnalogMonitor serial number that they wish it to have. The device's SERIAL NUMBER
attribute can be any arbitrary string, but it is good practice to leave it to a 32-bit number provided as a hexadecimal string.
For example, running the following:
$ ./bin/set_scc_id -s abab1234
and then
$ ./bin/ftdi_list
[INFO] : Found 1 FTDI devices matching 0000:0000
[INFO] : Device #0 (0403:6014)
[INFO] : MANUFRACTURER ID : dantrim
[INFO] : PRODUCT ID : SCCAnalogMonitor
[INFO] : SERIAL NUMBER : abab1234
The set_scc_id
utility has a name
option (which can be seen by providing the -h|--help
command line option), which fills in the value for the SCCAnalogMonitor card's FT232H's MANUFACTURER ID
field. By default, set_scc_id
sets this name
field to ${USER}
. Since rd53b_anamon
assumes that the device to connect to is an SCCAnalogMonitor card, the set_scc_id
utility always sets the device's PRODUCT ID
to be equal to SCCAnalogMonitor
.
Once a user has defined their SCCAnalogMonitor card's SERIAL NUMBER
field withh the set_scc_id
utility, they can then provide this value in the the connection : serial_number
field of their scc config file.
IMPORTANT NOTICE
Note that only a single FT232H device can be connected to the host PC when running the set_scc_id
utility.