Skip to content

Avoid using ARDUINO_USB_MODE=1 in pio environments #255

Closed

Description

@DvidPiDev

What happened?

ARDUINO_USB_MODE is set to 1 on the S2, S3 and C3 environments. This causes the device to wait for debug and never actually boot WLED without a USB data connection. Setting this to 0 allows the device to boot without having to be connected over USB.

To Reproduce Bug

Clone the latest WLED-MM, run a build on any C3, S2 or S3 environment, upload the bin file, unplug the device from your computer and connect it to a regular power supply, see bug.

Expected Behavior

ARDUINO_USB_MODE should equal to 0, thus allowing normal boot without the need of a debugger.

Install Method

Self-Compiled or other

What version/release of MM WLED?

WLEDMM 14.5.1-dev (build 2501170)

Which microcontroller/board are you seeing the problem on?

ESP32-S3

Relevant log/trace output

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    bug
    on Jul 21, 2025
  2. netmindz commented on Sep 20, 2025

    @netmindz
    Collaborator

    This is a tricky one, for development you really need ARDUINO_USB_MODE set to 1, but for the bin files created by the CI workflow, we should not have this set as it's not suitable for end users

  3. DvidPiDev commented on Sep 24, 2025

    @DvidPiDev
    Author

    I see. I don't quite understand why the USB mode setting is there, even for dev purposes. The ESP32 (and the S and C versions) all have a console on the UART pins, regardless of the USB mode setting.

  4. netmindz commented on Sep 25, 2025

    @netmindz
    Collaborator

    Because of how annoying this is, this is why many Dev boards come with dual usb ports now, one for upload and one for logs

  5. softhack007 commented on Oct 20, 2025

    @softhack007
    Collaborator

    I see. I don't quite understand why the USB mode setting is there, even for dev purposes.

    Hi @DvidPiDev, the answer is that we need "USB_MODE=1" for boards that don't have a UART-to-USB chip. Without this flag, we can't see any boot (crash dump) messages and debug output often gets garbled.

  6. added this to the 14.5.2 milestone on Nov 15, 2025
  7. added a commit that references this issue on Nov 16, 2025
    2b01798
  8. added
    fxed in mdev
    on Nov 16, 2025
  9. added a commit that references this issue on Nov 16, 2025
    5d143d2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugfxed in mdev

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions