Directly jump to the content and enable reader mode
Bambu Labs 3D-Printer with a cloud icon that has a red line over it. Text:

have read aloud


Reading time: about 7 min Print version

Running a Bambu Labs P1S or P1P 100% offline (updated)

All solutions can be found individually, I just collected them into one page here. Links are in the sections.

Goals reached:

  • Setup WLAN/WiFi without the smartphone app or a user account
  • Printing without using the cloud (yes, you upload your gcode from the PC, to the cloud and from there to the printer, directly next to it)
  • Accessing the webcam data (yes, this is also uploaded and downloaded)
  • Basic controls via MQTT
  • Putting the slicer into a Jail where it can't access the internet

Goals open:

  • Firmware updates
  • create an rtsp stream for integration in tools like home automation

Step by step instructions

WiFi setup

Unpack your printer, connect everything, but don't turn it on yet.
It comes with a SD-Card already in the printer. Remove it and put it into a computer.
from 1: In the main directory, create a text file "user_wifi.cfg" with the following content:

ssid: <your ssid>
password: <your password>

save it and securely eject the SD-Card and plug it into the printer again. Don't turn it on yet.
If you turn it on, it will use the WiFi and phones home.
Next step: disconnect from the Internet, but leave this tutorial open :)
Now, you can turn the printer on. Let it do it's things. Then use the controls on the printer and go into the setting menu (the circle),
WLAN,  and enable LAN Only Mode and write down the access code and serial number, you will need that.
Also enable developer mode at the end of the list and ignore the warnings.

Next step varies on your router, but go to the firewall or child restriction and block the newly discovered device from accessing the Internet.

After this is done, you can connect back to the Internet. The printer should not be able to access the internet even if tries to.

Depending on your paranoia level or distrust of Bambu Labs, you can install the Bambu Studio slicer software, it should be able to detect the new printer. It should ask for the access code from above.
After this, printing should work fine. 
Or you use the jailing method described below.

Camera live feed

To access the live feed from the camera (the slide show) use https://github.com/synman/bambu-go2rtc
It fetches the camera data from the printer and provides access to it through many views.
Why do you need the feed? You really don't want to be in the same room as the printer. It is LOUD.

For me this all I currently need. Printing and watching for oopsies. I don't need a notification when it's done, If I no longer hear the printer, it's done.

Jailing in Bambu Studio (or to be exact the closed source encrypted blob for printer access)

Create a new user "bambu" and add it to the video group.

sudo useradd -m -d /home/bambu -G video bambu

Switch to that new user

sudo -u bambu /bin/bash

run BambuStudio once for initialisation

dbus-run-session flatpak run com.bambulab.BambuStudio

Let it download the network plugin. Check if you can see the printer. Do not connect yet.

If that works, this will be the last time BambuStudio will see the internet.

Close the slicer and bash with Ctrl-D.
Now you should be your normal user again.
Create a firewall to block the new user from accessing anything except the printer ip

optional: sudo modprobe iptables_owner
sudo iptables -A OUTPUT -m owner --uid-owner bambu -d <printer_ip> -j ACCEPT
sudo iptables -A OUTPUT -m owner --uid-owner --uid-owner bambu -j DROP

switch to that new user again:

sudo -u bambu /bin/bash

Test network:
this should fail with name resolution error:

ping contentnation.net

this should fail to connect
telnet 46.4.60.46 80

if so, great you are done.

dbus-run-session flatpak run com.bambulab.BambuStudio

Depending on your Linux distribution you need to persist the firewall settings. This is beyond the scope of this article.

Control and monitor the printer via MQTT

Access data for MQTT:

Host: printer-ip, port 8883, username bblp, password: ID from printer menu

Topic: /device/<printer-serial>/report

you should see regular messages about the current state.

Known commands:

Light on/off (verified on P1S)

  {
    "system": {
      "sequence_id": "0",
      "command": "ledctrl",
      "led_node": "chamber_light",
      "led_mode": "on",
      "interval_time": 0
    }
  }


print files on sd-card (unverified):

{
  "print": {
    "command": "project_file",
    "url": "file:///sdcard/your_file_name.gcode.3mf",
    "param": "Metadata/plate_1.gcode",
    "subtask_id": "0",
    "use_ams": false,
    "timelapse": false,
    "flow_cali": false,
    "bed_leveling": true,
    "layer_inspect": true,
    "vibration_cali": false
  }
}

stop print (unverified):

{
  "print": {
    "command": "stop",
    "param": "",
  "sequence_id": "0",
    "reason": "success",
    "result": "success"
  }
}

pause print: (unverified)

{
  "print": {
    "command": "pause",
    "sequence_id": "0"
  }
}

resume print: (unverified)

{
  "print": {
    "command": "resume",
    "sequence_id": "0"
  }
}

Uploading data to SD-Card

The printer has a built in ftp server. Use an ftp client of your linking.
Host: your printer IP, port 990, username bblp, password: your access code

If you want to do it the terminal way:

curl --ftp-pasv --insecure -T <your gcode file> ftps://<printer-ip>:990/ --user bblp:<access code>

After this, you should be able to start the print via MQTT.

Outlook

If there is an important feature where a firmware upgrade is warranted, I will have a look to do this.
On firmware below 1.7.0 there is no offline update and BambuLabs refused to offer a manual flash setup or anything to update.
So you can only do online update or sell the printer and get a proper one. Later one recommended!

Footnotes

1: https://wiki.bambulab.com/en/p1/manual/p1-sd-card-network-configuration-guide

Digital signatures of this article

What are digital signatures and how do I verify them?
Content signature:
MGQCME35QcmCoJEb57wTXgYcjdHUl/EuxGaRDh/o6psLjy6GrAeuyYbwJTN5EVEbEqamFgIwXLvrURGY6QJZ/spbmxUi8ajqD2zWk+XWGpoyyFxyzC+A6F6Z9FyxZ/w4Hi6K8sRE
Content Nation Signature
MGUCMQD/CYtbwcjPoX9nIl8KsC6bpAdc9/DR4dHl17PtuehtL+dp5b8Xv1r4B2tku79Rzn4CMECNXW/BnRJe5a2BPEdNnXUlSQM0gTp2w01Lh9byKJvhI0PKjDN5idfGJtasx8G7Rw==

More signature information
0 comments
Report article

Our algorithm thinks, these articles are relevant: