user25998: I'm working on a project using a set of different Arduino Nano connected to a Raspberry Pi through USB.
Now my question is: "how can I, from the Pi's point of view, differentiate all of those Arduino and associate them with their respective tty?"
I found some part of my answer in this question. The answering guy proposes to manually change the Arduino MODEL_ID when compiling and to use it afterwork to identify the device. The problem is that I don't know how to achieve that.
I tried to edit the boards.txt file to add a new board configuration with custom vid.x and pid.x (why all those 4 different values?) but after selecting my board and uploading, the MODEL_ID still stays the same:
ID_MODEL_FROM_DATABASE=HL-340 USB-Serial adapter
ID_MODEL_ID=7523

Can't I just specify somehow the USB_PID macro to the compiler command line?

user77507: Finally find the solution =)
You don't have to change the ID vendor or ID product: it is possible to attribute a permanent name with devpath (where the device is plugged)
The only downside of using the devpath is that the devices will always have to stay plugged into the same physical port.
Answer here:PersistentUSBDevices / Alternative filtering via Devpath

25998: <p>I'm working on a project using a set of different Arduino Nano connected to a Raspberry Pi through USB.
Now my question is: <em>"how can I, from the Pi's point of view, differentiate all of those Arduino and associate them with their respective tty?"</em></p>

<p>I found some part of my answer in <a href="https://arduino.stackexchange.com/questions/14600/how-to-differentiate-between-2-micros-on-linux?newreg=c19dc2b8ae03419c8bb5e132fc41bbb3">this question</a>. The answering guy proposes to manually change the Arduino <code>MODEL_ID</code> when compiling and to use it afterwork to identify the device. The problem is that I don't know how to achieve that.</p>

<p>I tried to edit the <code>boards.txt</code> file to add a new board configuration with custom <code>vid.x</code> and <code>pid.x</code> (why all those 4 different values?) but after selecting my board and uploading, the <code>MODEL_ID</code> still stays the same:</p>

<pre><code>ID_MODEL_FROM_DATABASE=HL-340 USB-Serial adapter
ID_MODEL_ID=7523
</code></pre>

<p>Can't I just specify somehow the <code>USB_PID</code> macro to the compiler command line?</p>
 77507: <p>Finally find the solution =)</p>
<p>You don't have to change the ID vendor or ID product: it is possible to attribute a permanent name with devpath (where the device is plugged)
The only downside of using the devpath is that the devices will always have to stay plugged into the same physical port.</p>
<p>Answer here:<a href="https://www.domoticz.com/wiki/PersistentUSBDevices" rel="nofollow noreferrer">PersistentUSBDevices</a> / <a href="https://www.domoticz.com/wiki/PersistentUSBDevices#Alternative_filtering_via_Devpath" rel="nofollow noreferrer">Alternative filtering via Devpath</a></p>
