New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: allow multiple VID/PID pairs when detecting serial ports #632

nopdotcom opened this Issue Apr 23, 2016 · 1 comment


None yet
3 participants

nopdotcom commented Apr 23, 2016

PlatformIO Version (platformio --version): PlatformIO, version 2.9.0.dev0

Description of problem

Some boards’ serial ports don’t get auto-discovered when they’re using a variant PID.

VID/PID pairs can vary for a board depending on the mode they’re in. I’m on a MediaTek LinkIt 7688 DUO. In pure bootloader mode, it shows up as 0E8D:AB00; when running a sketch, it uses 0E80:AB0**1**.

Detection parameters are defined in the boards.txt:


I don’t think there is any need need to support multiple -DUSB_PID settings. In the 7688 DUO case, we always want to use AB0**1** when building; when looking for the serial port to upload, just detect the AB00 as well.

This is used quite a bit in core Arduino; the Leonardo definition is an example:


In this case, the PID 0036 is the pure bootloader, and the 8036 is the CDC ACM device.

VID 2341 belongs to “Arduino SA”, and 2A03 belongs to “dog hunter AG”. This is fallout from the breakup.

(For more fun, see the Arduino Micro definition at which tries to deal with the Arduino vs Genuino mess. I recommend totally ignoring this.)

@ivankravets ivankravets added this to the 2.9.0 milestone Apr 23, 2016


This comment has been minimized.


ivankravets commented Apr 23, 2016

@valeros I propose to replace vid and pid by hwid. Hardware ID should be a list of pairs [vid, pid]. For example,

    "leonardo": {
        "build": {
            "core": "arduino",
            "extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_LEONARDO",
            "f_cpu": "16000000L",
            "mcu": "atmega32u4",
            "usb_product": "Arduino Leonardo",
            "variant": "leonardo",
            "hwid": [
              ["0x2341", "0x8036"],
              ["0x0036", "0x2A03"]
        "frameworks": ["arduino"],
        "name": "Arduino Leonardo",
        "platform": "atmelavr",
        "upload": {
            "disable_flushing": true,
            "maximum_ram_size": 2560,
            "maximum_size": 28672,
            "protocol": "avr109",
            "require_upload_port" : true,
            "speed": 57600,
            "use_1200bps_touch": true,
            "wait_for_upload_port": true
        "url": "",
        "vendor": "Arduino"

The first item of array should be used for

Please update all boards with . Also need to add VID/PID from @arduino-org

valeros added a commit that referenced this issue Apr 25, 2016

ivankravets added a commit that referenced this issue Apr 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment