1

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?

2 Answers2

3

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

timemage
  • 5,639
  • 1
  • 14
  • 25
0

How to change Arduino Nano MODEL_ID?

The Arduino Nano used a special USB-Serial adapter (FTDI FT232RL). You can change the ID but this requires some special hacking. Please see the provided links.

Cheers!

Mikael Patel
  • 7,989
  • 2
  • 16
  • 21