Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper support of Bambu LAN printers #8256

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Noisyfox
Copy link
Collaborator

@Noisyfox Noisyfox commented Jan 31, 2025

The latest download link can be found from the "Checks" tab above or here. There should be an "artifact" dropdown on top of that page once the build is completed.

This PR solves the following problems:

  • Bind printers in different subnet
  • Binded LAN printers are not automatically connected when switching to Device tab

32217e0ea2ed5434d8916ad5c46e69c4
2fc422ddd3a89ae675de426953e44c1b
image

Few improtant things to know:

The automatic printer info detection (ie, the step in the first image) doesn't work on MacOS, when you click "Connect" you will immediately be prompted to the second image to enter the printer details. (I don't know why but Bambu does not provide this capability on MacOS for their network plugin)

AFAIK, P1 series do not support automatic printer info detection (as tested by @SoftFever and myself), so the first step is gauranteed to fail, which is unfortunate but expected. Simply click the "Manual Setup" button (which will appear after clicking the "Connect" button then wait for a while) and enter the printer detail and you should be good to go.
If anything entered wrong, you could simply unbind the printer and do it all over again.

I know current binding flow is not very user-friendly, but consider how rare this will be used, I think it's OK. Given the current situation this is the best I could do with the closed-source Bambu network plugin.

I only have a P1 so I couldn't throughly test this PR. Please if you have different printers and home network configurations, your feedback are valuable to help validating and improving this PR, thanks in advance!

Fix #6169
Fix #8097

@TinyWorkshopDesign
Copy link

TinyWorkshopDesign commented Jan 31, 2025

after trying around with tailscale and an x1c, seems that what is needed to make it work is the use of a a fake packet on the port 2021.

i'm using this script:
https://gist.githubusercontent.com/Alex-Schaefer/72a9e2491a42da2ef99fb87601955cc3/raw/0bc2423a099ebde636b4067c4cb7316df2c9fa9c/bambu-ssdp-discovery.py

if I don't use this script at the moment of the connection the printer doesn't appear even with the use of the IP

@Noisyfox
Copy link
Collaborator Author

after trying around with tailscale and an x1c, seems that what is needed to make it work is the use of a a fake packet on the port 2021.

i'm using this script: https://gist.githubusercontent.com/Alex-Schaefer/72a9e2491a42da2ef99fb87601955cc3/raw/0bc2423a099ebde636b4067c4cb7316df2c9fa9c/bambu-ssdp-discovery.py

if I don't use this script at the moment of the connection the printer doesn't appear even with the use of the IP

Have you tried the manual setup option?

@TinyWorkshopDesign
Copy link

yes, the printer doesn't appear unless I lunch the script

@Noisyfox
Copy link
Collaborator Author

Noisyfox commented Jan 31, 2025

yes, the printer doesn't appear unless I lunch the script

Could you describe what steps have you done? It'll be even better if you could provide some screenshots of each steps, thanks.

@TinyWorkshopDesign
Copy link

sure:
Open Orcaslicer (latest nightly)
Device->NoPrinter->Bind With access code insert-> ip+access code Connect insert-> serial

the printer doesn't appear

to make it work:
Device->NoPrinter->Bind With access code insert-> ip+access code launch the script Connect insert-> serial

@Noisyfox
Copy link
Collaborator Author

sure: Open Orcaslicer (latest nightly) Device->NoPrinter->Bind With access code insert-> ip+access code Connect insert-> serial

the printer doesn't appear

to make it work: Device->NoPrinter->Bind With access code insert-> ip+access code launch the script Connect insert-> serial

What OS are you using?

@TinyWorkshopDesign
Copy link

sure: Open Orcaslicer (latest nightly) Device->NoPrinter->Bind With access code insert-> ip+access code Connect insert-> serial
the printer doesn't appear
to make it work: Device->NoPrinter->Bind With access code insert-> ip+access code launch the script Connect insert-> serial

What OS are you using?

MacOS Sequoia 15.3 (24D60)

@Noisyfox
Copy link
Collaborator Author

sure: Open Orcaslicer (latest nightly) Device->NoPrinter->Bind With access code insert-> ip+access code Connect insert-> serial
the printer doesn't appear
to make it work: Device->NoPrinter->Bind With access code insert-> ip+access code launch the script Connect insert-> serial

What OS are you using?

MacOS Sequoia 15.3 (24D60)

I see, that might be a macos specific bug, I'll take a look soon.

@Noisyfox
Copy link
Collaborator Author

sure: Open Orcaslicer (latest nightly) Device->NoPrinter->Bind With access code insert-> ip+access code Connect insert-> serial
the printer doesn't appear
to make it work: Device->NoPrinter->Bind With access code insert-> ip+access code launch the script Connect insert-> serial

What OS are you using?

MacOS Sequoia 15.3 (24D60)

Btw, where did you download the nightly build from?

@TinyWorkshopDesign
Copy link

sure: Open Orcaslicer (latest nightly) Device->NoPrinter->Bind With access code insert-> ip+access code Connect insert-> serial
the printer doesn't appear
to make it work: Device->NoPrinter->Bind With access code insert-> ip+access code launch the script Connect insert-> serial

What OS are you using?

MacOS Sequoia 15.3 (24D60)

Btw, where did you download the nightly build from?

https://github.com/SoftFever/OrcaSlicer/releases/tag/nightly-builds

@Noisyfox
Copy link
Collaborator Author

sure: Open Orcaslicer (latest nightly) Device->NoPrinter->Bind With access code insert-> ip+access code Connect insert-> serial
the printer doesn't appear
to make it work: Device->NoPrinter->Bind With access code insert-> ip+access code launch the script Connect insert-> serial

What OS are you using?

MacOS Sequoia 15.3 (24D60)

Btw, where did you download the nightly build from?

https://github.com/SoftFever/OrcaSlicer/releases/tag/nightly-builds

Try this one instead https://github.com/SoftFever/OrcaSlicer/pull/8256/checks

@TinyWorkshopDesign
Copy link

sure: Open Orcaslicer (latest nightly) Device->NoPrinter->Bind With access code insert-> ip+access code Connect insert-> serial
the printer doesn't appear
to make it work: Device->NoPrinter->Bind With access code insert-> ip+access code launch the script Connect insert-> serial

What OS are you using?

MacOS Sequoia 15.3 (24D60)

Btw, where did you download the nightly build from?

https://github.com/SoftFever/OrcaSlicer/releases/tag/nightly-builds

Try this one instead https://github.com/SoftFever/OrcaSlicer/pull/8256/checks

doesn't work after installing from the dmg and trying to launch it it gives me:

image

@Noisyfox
Copy link
Collaborator Author

Noisyfox commented Jan 31, 2025

sure: Open Orcaslicer (latest nightly) Device->NoPrinter->Bind With access code insert-> ip+access code Connect insert-> serial
the printer doesn't appear
to make it work: Device->NoPrinter->Bind With access code insert-> ip+access code launch the script Connect insert-> serial

What OS are you using?

MacOS Sequoia 15.3 (24D60)

Btw, where did you download the nightly build from?

https://github.com/SoftFever/OrcaSlicer/releases/tag/nightly-builds

Try this one instead https://github.com/SoftFever/OrcaSlicer/pull/8256/checks

doesn't work after installing from the dmg and trying to launch it it gives me:

image

https://github.com/SoftFever/OrcaSlicer?tab=readme-ov-file#how-to-install
See point 3 under mac.

@TinyWorkshopDesign
Copy link

TinyWorkshopDesign commented Jan 31, 2025

sure: Open Orcaslicer (latest nightly) Device->NoPrinter->Bind With access code insert-> ip+access code Connect insert-> serial
the printer doesn't appear
to make it work: Device->NoPrinter->Bind With access code insert-> ip+access code launch the script Connect insert-> serial

What OS are you using?

MacOS Sequoia 15.3 (24D60)

Btw, where did you download the nightly build from?

https://github.com/SoftFever/OrcaSlicer/releases/tag/nightly-builds

Try this one instead https://github.com/SoftFever/OrcaSlicer/pull/8256/checks

doesn't work after installing from the dmg and trying to launch it it gives me:
image

https://github.com/SoftFever/OrcaSlicer?tab=readme-ov-file#how-to-install See point 3 under mac.

no, seem that the program is corrupterd ij some way, doesn't even appear in security
image

ARM version btw

@Noisyfox
Copy link
Collaborator Author

sure: Open Orcaslicer (latest nightly) Device->NoPrinter->Bind With access code insert-> ip+access code Connect insert-> serial
the printer doesn't appear
to make it work: Device->NoPrinter->Bind With access code insert-> ip+access code launch the script Connect insert-> serial

What OS are you using?

MacOS Sequoia 15.3 (24D60)

Btw, where did you download the nightly build from?

https://github.com/SoftFever/OrcaSlicer/releases/tag/nightly-builds

Try this one instead https://github.com/SoftFever/OrcaSlicer/pull/8256/checks

doesn't work after installing from the dmg and trying to launch it it gives me:
image

https://github.com/SoftFever/OrcaSlicer?tab=readme-ov-file#how-to-install See point 3 under mac.

no, seem that the program is corrupterd ij some way, doesn't even appear in security image

ARM version btw

Then try the command line option.

@TinyWorkshopDesign
Copy link

sure: Open Orcaslicer (latest nightly) Device->NoPrinter->Bind With access code insert-> ip+access code Connect insert-> serial
the printer doesn't appear
to make it work: Device->NoPrinter->Bind With access code insert-> ip+access code launch the script Connect insert-> serial

What OS are you using?

MacOS Sequoia 15.3 (24D60)

Btw, where did you download the nightly build from?

https://github.com/SoftFever/OrcaSlicer/releases/tag/nightly-builds

Try this one instead https://github.com/SoftFever/OrcaSlicer/pull/8256/checks

doesn't work after installing from the dmg and trying to launch it it gives me:
image

https://github.com/SoftFever/OrcaSlicer?tab=readme-ov-file#how-to-install See point 3 under mac.

no, seem that the program is corrupterd ij some way, doesn't even appear in security image
ARM version btw

Then try the command line option.

it will take some time, I need to DL xcode .... 😭

@Noisyfox
Copy link
Collaborator Author

Noisyfox commented Jan 31, 2025

sure: Open Orcaslicer (latest nightly) Device->NoPrinter->Bind With access code insert-> ip+access code Connect insert-> serial
the printer doesn't appear
to make it work: Device->NoPrinter->Bind With access code insert-> ip+access code launch the script Connect insert-> serial

What OS are you using?

MacOS Sequoia 15.3 (24D60)

Btw, where did you download the nightly build from?

https://github.com/SoftFever/OrcaSlicer/releases/tag/nightly-builds

Try this one instead https://github.com/SoftFever/OrcaSlicer/pull/8256/checks

doesn't work after installing from the dmg and trying to launch it it gives me:
image

https://github.com/SoftFever/OrcaSlicer?tab=readme-ov-file#how-to-install See point 3 under mac.

no, seem that the program is corrupterd ij some way, doesn't even appear in security image
ARM version btw

Then try the command line option.

it will take some time, I need to DL xcode .... 😭

Wait, what? I don't think so. It should be macos' built-in command. Just run

xattr -dr com.apple.quarantine <path_to_OrcaSlicer.app>

in terminal.

@TinyWorkshopDesign
Copy link

xattr -dr com.apple.quarantine <path_to_OrcaSlicer.app>

zsh: parse error near `\n'

@recursiveGecko
Copy link

Quick test on A1 using OrcaSlicer_Linux_AppImage_PR-8256, printer added & connected fine, the camera feed loads. Added printer persists across slicer restarts as expected.

image

image

@Noisyfox
Copy link
Collaborator Author

xattr -dr com.apple.quarantine <path_to_OrcaSlicer.app>

zsh: parse error near `\n'

Then try this

  1. Hold command key and right click OrcaSlicer.app, from the context menu choose Open.
  2. A warning window will pop up, click Open

@Noisyfox
Copy link
Collaborator Author

Noisyfox commented Jan 31, 2025

Quick test on A1 using OrcaSlicer_Linux_AppImage_PR-8256, printer added & connected fine, the camera feed loads. Added printer persists across slicer restarts as expected.

image

image

Is the printer in a different subnet? Also did you have to go thought the manual setup process (enter printer name, serial number etc.) or not?

@recursiveGecko
Copy link

Is the printer in a different subnet? Also did you have to go thought the manual setup process (enter printer name, serial number etc.) or not?

Yes, my PC is on 10.0.0.0/24 and my printer is on 10.0.1.0/24.

When I first entered the IP & access code and clicked connect, it immediately reported "Failed to publish login request" (like it does in Bambu Studio), then I clicked "Manual setup", entered the other details, and it worked.

@Noisyfox
Copy link
Collaborator Author

Noisyfox commented Jan 31, 2025

Is the printer in a different subnet? Also did you have to go thought the manual setup process (enter printer name, serial number etc.) or not?

Yes, my PC is on 10.0.0.0/24 and my printer is on 10.0.1.0/24.

When I first entered the IP & access code and clicked connect, it immediately reported "Failed to publish login request" (like it does in Bambu Studio), then I clicked "Manual setup", entered the other details, and it worked.

Cool thanks for the test! So the automatic setup doesn't work properly so far... But good to know at least manual setup works.

I don't even get the same "Failed to publish login request" error with P1... God knows what Bambu did with their network plugin & firmware...

@Cartrigger
Copy link

Here with a A1, it automatically connected while switching to devices :D
All features are working as expected too.

(Windows)

@recursiveGecko
Copy link

recursiveGecko commented Feb 1, 2025

I don't even get the same "Failed to publish login request" error with P1... God knows what Bambu did with their network plugin & firmware...

Does the P1 firmware listen on different ports, or does the network plugin try to connect to a different port when it's connecting to a P1?

On my A1, I previously observed the following:

When connecting to the printer through auto-discovery, Bambu Studio successfully connects to the printer on port 8883
When connecting to the printer by IP, Bambu Studio attempts to connect to the printer on port 3000 and receives a TCP reset, indicating that it's not connecting to the right port. This is reported as "Failed to publish login request" in BS.

@Noisyfox
Copy link
Collaborator Author

Noisyfox commented Feb 1, 2025

Does the P1 firmware listen on different ports, or does the network plugin try to connect to a different port when it's connecting to a P1?

It could be the case, though we can't really fix that since it fully closed source.

@Splarkszter
Copy link

Awesome! Thank you so much! This fixes it!!!

@joshajohnson
Copy link

Thanks for this PR, it fixes the forgetting of the pairing PIN on my Win 10 machine after sleep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants