# Bambu Lab printers [Back to PhoneBox](../README.md) · [User guide](GUIDE.md) · [MQTT](MQTT.md) The **Bambu Lab printer** widget shows your printers on the phone: whether each one is printing, the progress, the time left and the clock time it will be done, the layer, the file name and the nozzle, bed and chamber temperatures. The agent on the computer connects to each printer over your local network, the same way Bambu Studio does in LAN mode: to the printer's own MQTT server on port 8883, over TLS, as the user `bblp` with the printer's LAN access code. It only reads the printer's reports. It never starts, stops or changes a print, and nothing goes to Bambu's cloud. The phone never gets a printer's address, serial number or access code. ## Set it up 1. On the printer, find its **IP address** and its **LAN access code** (see [Finding the access code](#finding-the-access-code)). The **serial number** is on the printer's label, in its settings, or in Bambu Studio's **Device** tab. 2. In **Settings › General › Bambu Lab printers**, press **Add a printer** and enter a name (what the phone shows), the IP address, the serial number and the access code. 3. Press **Test**. The first press only reads the printer's certificate and fills in its fingerprint; nothing else is sent. Press **Test** again: it logs in once with the access code, to that certificate only. The line under the button says whether it worked. 4. Turn on **Connect to Bambu Lab printers** and **Save**. 5. Add a **Bambu Lab printer** widget to a page (under Web & data). Leave its **Printer name** empty to show every printer, one under the other, or enter one name to show only that printer. Give the printer a fixed address in your router (a DHCP reservation). If its address changes, enter the new one **and the access code again** (a saved code stays with the address it was saved for, so it never goes to another one), press **Test** and **Save**. The address must be on your local network: an internet address is not accepted, and a name that resolves to one is refused before anything is sent. ## Finding the access code The LAN access code is an eight-character code that the printer shows on its own screen. It is not your Bambu account password. - **X1, P1, H2 series (and X2D)**: on the printer's screen, open **Settings** and then the **Network** or **WLAN** page: the IP address and the **Access Code** are listed there. - **A1 and A1 mini**: open **Settings**, then **LAN Only Mode** (or **Network**): the IP address and the access code are shown next to it. You do not have to turn LAN Only on to read them. - In **Bambu Studio**, the **Device** tab of a printer connected in LAN mode shows the same code. The printer makes a new code when you turn LAN Only mode on or off, or press its refresh button: enter the new one in Settings and press **Test** again. ## The certificate Every Bambu printer has its own certificate, made for its serial number rather than its address, so the usual check (the certificate must match the address you typed) cannot pass. Instead the agent pins the certificate: the first **Test** reads the one the printer presents, without sending the access code, and its SHA-256 fingerprint is saved with the printer. The code goes only on the next **Test**, already pinned to that fingerprint. The agent never connects without a pinned fingerprint, and accepts no other certificate. If a firmware update gives the printer a new certificate, the widget says the certificate is not the pinned one, and the agent does not connect (any other failure of the secure connection is shown as such, not as a changed certificate). Pressing **Test** checks the printer against the pinned certificate too: it refuses the new one before sending the access code and shows **Pin the new certificate**. Press it only if this is your printer (the address is right and you updated its firmware): it pins the new certificate; **Save**, then press **Test** again. Nothing replaces a pin without that press. ## Which printers The X1, P1, A1 and H2 series report the same way. An A1 or a P1 sends only what changed, so the agent asks once for a full report each time it connects, and keeps every field until a newer one arrives. The H2 series reports its temperatures in its own format, which the agent reads too (with two nozzles, the one in use). The A1 and P1 series have no chamber sensor, so the widget shows no chamber temperature for them. ### Newer firmware Since 2025 Bambu firmware can limit what other programs may do on the local network. Reading the reports is what the widget needs, and it is allowed in the usual setup. If **Test** fails with a connection error on a printer that Bambu Studio reaches, turn on **LAN Only** mode and **Developer Mode** on the printer, and try again. The agent connects to a printer only while a **Bambu Lab printer** widget on an enabled page shows it (a widget with no printer name shows every printer). With no such widget it holds no connection, and removing the widget, turning its page off or turning the setting off closes it. A printer accepts only a few connections at a time: the agent uses one per printer; Bambu Studio, Bambu Handy and other tools use their own. ## What the widget shows | State | Shown | |---|---| | Printing, preparing or paused | The progress bar and percentage, the time left (counted down on the phone between reports), the clock time it will be done (not while paused), the layer and the file name | | Finished or failed | A full or empty bar, the file name and, after a failure, the printer's error code | | Idle | The temperatures only | | Not connected | What went wrong: the address cannot be reached, the access code was refused, the certificate changed, or something is missing in the settings | The widget's **Show the file name** and **Show the temperatures** options turn those lines off. ## The status `GET /api/bambu` (on the computer, and over Wi-Fi with the phone's key) answers with `enabled` and, for each printer in the settings, its `name`, the connection's `state` (`off`, `connecting`, `connected` or `error`), a kind of error (`dns`, `refused`, `timeout`, `pinChanged` for a certificate other than the pinned one, `tls` for another failure of the secure connection, `auth`, `config`, `notLocal` or `other`), the time of the last report in milliseconds since 1970, and the `job`: `status` (the printer's own `gcode_state`, such as `RUNNING`, `PAUSE`, `FINISH`, `FAILED` or `IDLE`), `percent`, `remainingMin` (minutes; with a fraction once a pause took off the time printed) with `remainingAt` (when that value arrived), `layer`, `layers`, `file`, `nozzle`, `nozzleTarget`, `bed`, `bedTarget`, `chamber` and `errorCode`. Never the address, the serial number or the access code. `POST /api/bambu/test` is the settings page's **Test** and answers on the computer only. See [PRIVACY.md](../PRIVACY.md) for what the agent sends to a printer.