Skip to content

[FR] ESP32 bluetooth serial port #22090

Open

Description

@lols

Is your feature request related to a problem? Please describe.

Needs a way to connect to the esp32 via bluetooth serial port. i can make marlin to start the bluetooth and able to connect to it but not sure how to get the usb serial port and the bluetooth serial port link together

Are you looking for hardware support?

Using FYSETC E4 board

Describe the feature you want

It should work like connecting a bluetooth module to a normal 32bit board so that i can send gcode via bluetooth serial

Additional context

No response

Activity

  1. thinkyhead commented on Jul 30, 2021

    @thinkyhead
    Member

    I have no idea. You can use the Marlin Discord to talk to developers and get help.

  2. ellensp commented on Oct 24, 2026

    @ellensp
    Contributor

    #28747 adds this. The ESP32's built-in Bluetooth (Classic SPP) becomes a Marlin serial port, and you set it like any other serial port, with the value -2.

    For the FYSETC E4, keep USB as the first port and add Bluetooth as the second:

    #define SERIAL_PORT 0      // USB
    #define SERIAL_PORT_2 -2   // Bluetooth

    Marlin then takes G-code from both at the same time, and answers each command on the port it came from. The board shows up under your machine name, and no pairing PIN is needed. SERIAL_PORT and SERIAL_PORT_3 also accept -2.

    Be aware that Bluetooth is a resource hog. It adds about 650 KB of flash and takes about 160 KB of RAM. That leaves enough for Marlin on its own, but not for WiFi as well, so it can't be combined with WIFISUPPORT or ESP3D_WIFISUPPORT.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions