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:


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

  • That question is about Arduino Micro, which has a ATmega32u4 with USB support. Yours has a ATmega328 with separate USB to serial chip.
    – gre_gor
    Aug 23 '16 at 17:47

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.


  • OK I see the problem then. Thanks! Unfortunately, the Arduino Nano that I have are chinese clones and so they use the ch341 USB serial driver, rather than the FTDI one. I keep investigating... Aug 23 '16 at 21:36
  • BW: Could your sketch on the Arduino Nano identify itself by sending an ID on startup? This would have to be unique for each connected board. Aug 23 '16 at 21:44
  • I think this is what I'm going to end with. Because even if I could change the vendor and product ID in the EEPROM, this would make a mess in the drivers that will not be able to recognize my devices anymore. I found an interesting link which propose a simple API to make this as easy as possible :) Aug 23 '16 at 22:20

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.