I am using VEGA ARIES board on Arduino IDE. The VEGA ARIES board is a series of micro-controllers that includes the ARIES v2, ARIES IoT, and others. When I connect ARIES v2, in Tools >> Ports it shows COM* (ARIES v2) and same happens when I connect ARIES IoT. This is because both boards have the same PID (Product ID) and VID (Vendor ID). Is there any way to solve this problem? Is there any property which needs to define in board.txt file?
Hi @teamvega. Recent versions of Arduino IDE support creating an association in the boards definition (in the boards.txt configuration file) with any arbitrary properties provided by a port; not limited to VID/PID:
So if the port produced by each board model has some unique property, then you can associate the board definition with that property.
If the port produced by a given board model does not have properties that are completely unique to that board model, then you should simply omit the vid and pid properties from the board definition entirely. These properties only provide the convenience feature of causing the port to be labeled with the board name in the Arduino IDE interface. An association that might result in incorrect identifications of a port due to the properties not being unique will do more harm by to causing confusion for the users.
If you are setting a custom VID/PID on the boards, then you should have no difficulty provisioning a separate dedicated product ID for each of the board models and configuring each model to use the appropriate PID. If the boards are instead using a default VID/PID from a chip manufacturer, then it would not be appropriate for your to associate that VID/PID with a board definition because there might be many other devices that use the same VID/PID, which would then be incorrectly identified by Arduino IDE as your board.
The board can still be used without any problem even if the board definition doesn't associate port properties. This is the case with many popular boards (including Arduino's own classic Nano board).
Thank you @ptillisch for your reply. I think all the boards are using a default VID/PID from a chip manufacturer. So there is no way it can identify the board correctly.
There is a property boardname.build.usb_product, can we use it to make things work somehow?
No. This is a property that is used to set a macro via a -D flag in the compilation command, which is then used in the USB stack that is part of the sketch program when compiled for boards with a native USB capability.
You can find the available port identification properties using a tool named Arduino CLI. The arduino-cli board list --format json command will show the properties of all the ports discovered on your system.
If you see something like this, you might think the serialNumber property looks promising. It would be possible to associate this property in a board definition, however, a serial number will typically have the opposite problem of being too unique!
Generally each individual hardware unit has a unique serial number, which makes it not a useful property for identification at model granularity. For example (if we pretend that there wasn't already an association with this port) if I associated the 75438313633351111011 serial number with a board definition, the IDE would identify the port of my specific Arduino Mega board as that board definition. However, that would only work with that single hardware unit since the value of the serialNumber property from the port of any other Mega board will be different.
Is it possible to assign not the entire number, but only part of it, as a identification feature?
Certainly, each board has a unique number, but most likely similar boards will have similar numbers, for example, the first 6 or 10 digits will be the same. It would be great if you could use a template for similar numbers to determine the type of board
The Arduino boards platform framework doesn't have the required string manipulation capabilities. However, the port properties come from a tool called a "pluggable discovery". Platform developers can create their own custom pluggable discovery tools, which can be used to discover boards that communicate with the computer via any arbitrary communication channel and protocol, and to provide any arbitrary port properties.
Arduino CLI and Arduino IDE gets the list of available ports from these "pluggable discovery" tools.
You can get an overview of how it works from the Arduino Pluggable Discovery Specification:
In the future, we plan to assign a custom Vendor ID (VID) and Product ID (PID) for each of the board models. For the time being, I have included a placeholder board in the Board.txt file with the generic name "ARIES Boards." I have assigned common PID/VID values to this placeholder, so if any board is connected, it will be recognized as "ARIES Boards." This approach aims to prevent confusion during the current phase.