I'm currently writing a tool that automatically detects connected arduinos and provides a one-button solution for flashing new firmware. I've got a couple of arduinos at home (Diecimilla, Uno R3 SMD and some nanos from china) and each type presents with a different serial port name.


  • Can someone explain where these port names come from?
  • Can I assume that /dev/cu.usbserial-A9UPDRZB is, atleast in most cases, an arduino nano?
  • Are there other ways to identify the type of the board?
  • Is the name of the serial port some kind of hash generated from informations retrieved from the device?

1 Answer 1


You cannot assume anything about serial port names. It's a choice of the operating system, and even if you find the algorithm, there's no guarantee it won't change in the future.

As a reference implementation, the Arduino IDE 1.5.x uses VID (Vendor ID) and PID (Product ID) to identify a board.

Because accessing such information depends on the underlying operating system, the IDE uses three strategies: on windows, it runs a program called ListComPorts.exe, on macosx it uses CLI tool /usr/sbin/system_profiler, on linux CLI tool udevadm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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