Skip to content

Bambu Lab Printers

PrintStudio supports Bambu Lab printers (X1C, P1P, P1S, A1, A1 Mini) via their LAN MQTT API. The adapter handles the proprietary protocol automatically.

Bambu Lab printers must have LAN-only mode enabled:

  1. On the printer’s touchscreen: Settings → Network → LAN Only Mode → Enable
  2. Note the Access Code shown on the screen (8 digits)
  3. Find the Device Serial Number on the label on the printer’s rear panel or in Bambu Studio (Devices → your printer → Serial Number)
Terminal window
# Single Bambu printer
BAMBU_PRINTER_IP=192.168.1.50
BAMBU_PRINTER_SN=01P00A123456789
BAMBU_ACCESS_CODE=12345678
# Multiple printers — use indexed variables
BAMBU_PRINTER_1_IP=192.168.1.50
BAMBU_PRINTER_1_SN=01P00A123456789
BAMBU_PRINTER_1_ACCESS_CODE=12345678
BAMBU_PRINTER_1_NAME=Bambu X1C #1
BAMBU_PRINTER_2_IP=192.168.1.51
BAMBU_PRINTER_2_SN=01P00A987654321
BAMBU_PRINTER_2_ACCESS_CODE=87654321
BAMBU_PRINTER_2_NAME=Bambu X1C #2
Terminal window
curl -X POST http://localhost:8787/api/printers \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"name": "Bambu X1C #1",
"type": "bambu",
"machineType": "fdm_large",
"config": {
"ip": "192.168.1.50",
"serialNumber": "01P00A123456789",
"accessCode": "12345678"
},
"buildVolume": { "x": 256, "y": 256, "z": 256 }
}'
FeatureX1CP1P/P1SA1/Mini
Print control
Temperature monitoring
Print progress
AMS multi-material
Camera stream
Pause/resume
Emergency stop

For X1C and P1 printers with AMS, PrintStudio tracks which AMS slot maps to which material. When routing a job, the router checks that the required material is loaded in at least one AMS slot.

Configure AMS slot mappings in the printer settings:

Terminal window
curl -X PATCH http://localhost:8787/api/printers/{id}/ams \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"slots": [
{ "slot": 0, "material": "pla", "color": "#1a1a1a", "brand": "Bambu" },
{ "slot": 1, "material": "pla", "color": "#ffffff", "brand": "Bambu" },
{ "slot": 2, "material": "petg", "color": "#ff0000", "brand": "Generic" },
{ "slot": 3, "material": "tpu", "color": "#0000ff", "brand": "Bambu" }
]
}'

Printer not responding — Verify LAN-only mode is enabled. The Bambu cloud API is blocked in LAN-only mode, but the local API becomes available.

Access code rejected — The access code on the touchscreen changes when you toggle LAN mode. Re-read it after enabling LAN-only mode.

MQTT connection drops — Bambu printers expect the MQTT client to reconnect within 30 seconds. The adapter reconnects automatically, but log [bambu] reconnecting... messages indicate network instability.

Wrong serial number — The serial number must exactly match the format shown on the printer (e.g., 01P00A123456789 — no spaces, case-sensitive).