DEV Community

Hedy
Hedy

Posted on

How to change the VID / PID of an Arduino Nano?

Changing the VID / PID of an Arduino Nano depends entirely on which USB interface chip your Nano uses. This is not a software setting you can change from a sketch; it is defined by the USB firmware of the USB-to-serial chip.

Below is a clear decision path → implementation steps → risks and procurement implications.

1. First: Identify which Arduino Nano you have (this decides everything)

There are three common Nano variants in the wild:

Nano type USB chip VID/PID changeable? How
Original Nano FT232RL Yes Reprogram EEPROM
Clone Nano (most common) CH340 / CH341 No (practically) Fixed in silicon
Newer Nano (ATmega328P + ATmega16U2) ATmega16U2 Yes Flash USB firmware

Most cheap Nano boards use CH340 → VID/PID cannot realistically be changed.

2. How to check which USB chip you have (don’t skip this)
On Windows

  1. Plug in Nano
  2. Open Device Manager → Ports (COM & LPT)
  3. Check device name:
  4. USB Serial Converter → FT232
  5. USB-SERIAL CH340 → CH340
  6. Arduino USB Serial → ATmega16U2

On Linux / macOS

lsusb
Enter fullscreen mode Exit fullscreen mode

Example:

0403:6001  → FTDI (FT232)
1a86:7523  → CH340
2341:0043  → Arduino VID (16U2)
Enter fullscreen mode Exit fullscreen mode

3. Case A — Nano with FT232RL (VID/PID CAN be changed)
What you need

  • FTDI drivers installed
  • FT_Prog (FTDI official utility, Windows)

Step-by-step

  1. Install FT_Prog
  2. Plug in Nano
  3. Open FT_Prog → Scan and Parse
  4. Navigate to:
USB Device Descriptor
Enter fullscreen mode Exit fullscreen mode
  1. Change:
  • Vendor ID
  • Product ID
  1. Program device
  2. Unplug and replug

Important warnings

  • Do NOT use a VID you do not own
  • Changing VID/PID may break drivers
  • Windows may require driver reinstallation

Procurement note

If you need custom VID/PID for a product, FT232 is acceptable only for low volume / internal tools. For shipping products, VID licensing matters.

4. Case B — Nano with CH340 / CH341 (VID/PID NOT changeable)
Reality check

  • VID/PID is hard-coded
  • No EEPROM
  • No official flashing tools
  • Internet “guides” claiming success are wrong or misleading

Your options

Option Result
Try to flash Impossible
Mask VID/PID in OS Hacky
Replace USB chip Not realistic
Use different Nano Correct approach

Procurement implication

If you need VID/PID control, do not buy CH340-based Nanos.

5. Case C — Nano with ATmega16U2 (VID/PID fully programmable)

(Some “official-style” Nanos or custom boards)

What you need

  • ISP programmer (USBasp / AVRISP / another Arduino)
  • DFU or ISP flashing tools
  • Custom USB firmware

High-level steps

  1. Put ATmega16U2 into DFU or ISP mode
  2. Modify USB descriptors in firmware:
#define USB_VENDOR_ID  0xXXXX
#define USB_PRODUCT_ID 0xYYYY
Enter fullscreen mode Exit fullscreen mode
  1. Compile
  2. Flash firmware
  3. Replug device

Advantages

  • Full USB control
  • Can implement HID, CDC, composite devices

Risks

  • Easy to brick USB interface
  • Requires firmware + USB knowledge

6. Why Arduino sketches cannot change VID/PID

Your ATmega328P sketch never talks USB.

USB is handled by:

  • FT232 → external IC
  • CH340 → external IC
  • ATmega16U2 → separate MCU

So:

Serial.begin();
Enter fullscreen mode Exit fullscreen mode

cannot affect VID/PID.

7. When do you actually NEED to change VID/PID?

Valid reasons:

  • Custom PC software binding
  • USB driver matching
  • Composite USB device
  • Product branding

Invalid reasons:

  • “Just curiosity”
  • Fixing driver problems
  • Bypassing OS permissions

8. Best practice recommendations (engineering + purchasing)
If you just want Arduino compatibility

Do NOT change VID/PID

If you need custom VID/PID

Use:

  • Arduino with ATmega16U2
  • Native USB MCU (ATmega32U4, RP2040, STM32, ESP32-Sx)

If you’re building a product

  • Do NOT ship with Arduino VID
  • Buy your own VID or use USB-IF PID programs

9. Quick decision summary

Your Nano has… Can you change VID/PID? Recommended action
FT232 Yes Use FT_Prog carefully
CH340 No Replace board
ATmega16U2 Yes Flash custom firmware

Final takeaway

Changing Arduino Nano VID/PID is a hardware decision, not a software trick.

If VID/PID control matters:

  • Choose the right USB interface chip
  • Decide this before procurement
  • Don’t try to “fix it later in firmware”

Top comments (0)