bambu
tested on simulator
| Tier | Tier 3 |
|---|---|
| Protocol | Bambu Lab LAN MQTT over TLS, Developer Mode |
| Covers | Bambu Lab X1 series, Bambu Lab P1 series, Bambu Lab A1 and A1 mini |
| Hazard default | medium |
| Conformance | full |
| Tested with | real paho-mqtt client over TLS against a simulated printer on an in-process broker |
Estimated reach. About ten printer models. Bambu Lab sells the X1, P1, A1 and newer H2 and P2 families, which share one report format on the local MQTT broker. Bambu Lab documents Developer Mode for X1, P1, A1 and A1 mini, and only printers in that mode accept the commands this driver sends. Reads work in normal LAN mode too. Bambu Lab doesn't publish the message format, so the field list follows community documentation and may miss model-specific fields.
The bambu driver reads a Bambu Lab printer's status and pauses, resumes and stops prints over the printer's own MQTT broker on the local network. The driver needs the printer in LAN-only mode with Developer Mode on. The driver uses paho-mqtt, the same client as the mqtt driver.
Local access status
This section was checked on 2026-10-24, and you should read this section before you connect a printer.
- In January 2025 Bambu Lab added Authorization Control to its firmware. Starting a print and controlling motion, temperature, fans, the AMS and calibration now need authorization in cloud mode and in normal LAN mode. Status reports over MQTT stay readable. X1 printers got Authorization Control first, from firmware 01.08.03.00, and the P and A series followed.
- Bambu Lab's follow-up post describes Developer Mode, an opt-in setting for X1, P1, A1 and A1 mini printers. Developer Mode must be turned on at the printer, leaves MQTT, the live stream and FTP open on the local network, and makes the owner responsible for securing that network. Bambu Lab says the company won't give customer support for this mode. Later guides report Developer Mode on newer models too, but this wasn't checked on an H2D or P2S.
- Bambu Lab's Terms of Use restrict using its technology to develop software associated with its products without consent (section 3.1, quoted secondhand because the terms page didn't load here). In April 2026 Bambu Lab sent a cease-and-desist letter to the maintainer of an OrcaSlicer fork that reached Bambu Cloud by presenting itself as Bambu Studio. The owner reviewed this on 2026-10-25 and approved shipping the driver.
Given that status, the driver works within these rules.
- The driver talks only to the printer on the local network, only through the MQTT interface Developer Mode leaves open, and only with the LAN access code shown on the printer's screen.
- The driver never contacts Bambu Cloud, never uses Bambu Connect or its keys, never presents itself as Bambu Studio and never bypasses authorization.
- The driver sends only status requests and the pause, resume, stop, speed level and chamber light commands, and doesn't start prints, upload files, send G-code, change temperatures or move axes.
- Without Developer Mode the printer refuses the commands and the driver reports the refusal with a hint to turn the mode on, but reads keep working.
What it supports
- Reads of the print state, nozzle, bed and chamber temperatures and targets, progress, time left, the current and total count from
layer_numandtotal_layer_num, the job name, the error code and the Wi-Fi signal, plus any other report field through a map. - The speed level (silent, standard, sport, ludicrous) and the chamber light as control channels.
- Pause, resume and stop as actions.
- A native safe state, where a hub stop sends
stop, orpausewithsafe_stop: pause. discover()listens for the printers' own SSDP announcements on UDP port 2021 and sends nothing.describe()proposes channels from the printer's report.
Setup
uv tool install --compile-bytecode "openhal-hub[bambu] @ git+https://github.com/sohan-bhat/OpenHAL"- On the printer's screen, open the network settings, turn on LAN-only mode, then turn on Developer Mode. Note the access code and the serial number shown there.
- Put the access code in an environment variable,
export BAMBU_ACCESS_CODE=12345678. - Read the printer certificate's fingerprint and put it in
cert_sha256, as in step 2 of docs/hardware-tests/bambu.md.
Parameters
| Parameter | Default | Meaning |
|---|---|---|
host | required | The printer's address. The shorthand bambu: 192.168.1.50 sets it |
serial | required | The printer's serial number, which names its MQTT topics |
port | 8883 | MQTT over TLS |
token_env | BAMBU_ACCESS_CODE | The environment variable that holds the LAN access code |
cert_sha256 | none | The SHA-256 fingerprint of the printer's certificate, quoted, with or without colons |
ca_env | none | Instead of cert_sha256, an environment variable that holds the path of Bambu Lab's authority certificate. The driver then checks the certificate names the serial |
timeout | 5 s | Login, status and acknowledgement deadline |
reply_wait | 2 s | How long to wait for the printer's reply to a command |
safe_stop | stop | What a hub stop sends, stop or pause |
The printer's certificate names its serial number rather than its address and is signed by Bambu Lab's own authority, so ordinary TLS checks fail and the driver instead checks the fingerprint, or the authority and the serial, before the access code leaves the hub.
Channels
Channels are named after what they read. A map can read any other field of the report, map: { field: cooling_fan_speed, scale: 6.6667 } for example, with an optional unit the field is in.
| Channel | Report field | Type and unit |
|---|---|---|
state | gcode_state | enum of idle, prepare, slicing, running, pause, finish, failed |
nozzle_temp, nozzle_target | nozzle_temper, nozzle_target_temper | degC |
bed_temp, bed_target | bed_temper, bed_target_temper | degC |
chamber_temp | chamber_temper | degC |
progress | mc_percent | percent |
remaining | mc_remaining_time | min |
layer, total_layers | layer_num, total_layer_num | dimensionless |
job | subtask_name | string |
print_error | print_error | dimensionless |
wifi_signal | wifi_signal | string |
speed_level | spd_lvl | enum, control channel |
chamber_light | lights_report | bool, control channel |
Actions are named pause, resume and stop, or map to one with map: { command: pause }, and the actions take no arguments.
How reads and commands behave
- After connecting, the driver requests a full report once. X1 printers then send full reports and P1 and A1 printers send only what changed, so the driver merges every report into one state. A field the printer hasn't sent reads as no value.
- Commands go out at QoS 1 and wait for the broker's acknowledgement. When the printer responds with a result, a failure becomes a
DriverErrorwith the printer's reason. Some firmware doesn't respond to every command, so a missing response is not an error, and readingstateshows what happened. - Commands are never queued, and without an acknowledgement the driver drops the connection, so a command can't arrive late.
- Because Bambu Lab printers push their state and P1 printers are known to struggle with frequent full status requests, the driver doesn't poll.
Example
openhal/drivers/bambu/examples/p1s-lan.hal.yaml reads a P1S and lets pause, resume and stop through, with stop needing a confirmation.
Errors
- A missing access code variable, a certificate that doesn't match the pin, a refused login and a printer that sends no report for the serial number raise
DriverErrorthat says what to check. - A command the printer refuses raises
DriverErrorwith the printer's reason, and a refusal about verification adds the hint to turn on Developer Mode. - A report value that isn't the channel's type raises
DriverErroron read.
Limitations
- The driver deliberately leaves out print start, file upload, camera, AMS control, G-code, temperature targets and motion.
- The driver speaks MQTT 3.1.1 only and supports one printer per device file.
- The driver is untested on real printers so far, and the simulator follows the community documentation of the report format, which Bambu Lab doesn't publish.
Hazard default and safe state
The default hazard is medium, because a printer has heaters and moving parts. safe_state_support is native, so a hub stop sends stop, and the firmware ends the print, turns the heaters off and parks the head. The printer handles a lost connection on its own and keeps printing.
Sources
- Bambu Lab, Firmware Update Introducing New Authorization Control System, 2025-01-16, https://blog.bambulab.com/firmware-update-introducing-new-authorization-control-system-2/
- Bambu Lab, Updates and Third-Party Integration with Bambu Connect, 2025-01-20, https://blog.bambulab.com/updates-and-third-party-integration-with-bambu-connect/
- Bambu Lab wiki, Third-party integration, https://wiki.bambulab.com/en/software/third-party-integration (not loaded here, check it directly)
- Bambu Lab Terms of Use, https://bambulab.com/en-us/policies/terms (not loaded here, section 3.1 quoted secondhand)
- Consumer Rights Wiki, Bambu Lab Authorization Control System, https://consumerrights.wiki/w/Bambu_Lab_Authorization_Control_System
- Tom's Hardware on the April 2026 cease-and-desist, https://www.tomshardware.com/3d-printing/developer-re-enables-3d-printer-features-that-bambu-lab-disabled-firm-promptly-threatens-legal-action-orcaslicer-bambulab-project-now-shuttered
- OpenBambuAPI, community documentation of the MQTT messages, https://github.com/Doridian/OpenBambuAPI/blob/main/mqtt.md
- MQTT Version 3.1.1, OASIS Standard, https://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html