Skip to content

[Feature] BLE Serial Communication #2281

@jpcraft-jp

Description

@jpcraft-jp

Is your feature request related to a problem? Please describe.
Yes. Currently, Pybricks lacks native support for BLE Serial communication or a similarly flexible interface to communicate with external microcontrollers (e.g., ESP32) for more complex, multi-device setups like autonomous LEGO train systems. This limits the ability to integrate LEGO hubs into larger IoT or automation ecosystems efficiently. I often get frustrated because I have to build unreliable or complex workarounds to coordinate multiple hubs and peripherals.

Describe the solution you'd like
I want Pybricks firmware to support a standardized BLE Serial interface (or similar protocol) that exposes communication channels to send and receive commands/data in real-time. This would allow ESP32 or other microcontrollers to control motors, lights, and sensors on LEGO hubs via BLE, enabling advanced use cases like autonomous train control, remote monitoring, and integration into home automation platforms (e.g., Home Assistant). The solution should be robust, easy to use, and documented to facilitate both simple and complex projects.

Describe alternatives you've considered

Using IR communication with LEGO remotes, which is limited in bandwidth and functionality.

Using UART wired connections with custom hardware, but this is cumbersome and lacks official support.

Hacking or modifying firmware locally, which is possible but risky and not scalable.

Using BLE from scratch on ESP32, but no straightforward bridge exists with Pybricks hubs.

Additional context

I'm working on autonomous train setups requiring coordination of multiple hubs and sensors.

My goal is to build a system where hubs communicate seamlessly with ESP32 controllers over BLE.

Pybricks is great for basic control but falls short on networked multi-device communication.

A BLE Serial feature would massively improve Pybricks usability in DIY, robotics, and IoT contexts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    software: pybricks-micropythonIssues with Pybricks MicroPython firmware (or EV3 runtime)topic: bluetoothIssues involving bluetoothtopic: communicationIssues related to hub-to-hub/phone/computer communcation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions