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

Add printer in LAN mode by IP address #702

Open
rkarlsba opened this issue Nov 23, 2022 · 101 comments
Open

Add printer in LAN mode by IP address #702

rkarlsba opened this issue Nov 23, 2022 · 101 comments

Comments

@rkarlsba
Copy link

Since the WAN mode is utterly insecure, adding a printer by its IP address would be nice in LAN mode when mDNS isn't available. Either because the printer is on a different subnet and the router doesn't route multicast, which is quite normal or if you have an enterprise wifi system (for instance from Cisco), which also may drop mDNS.

@c2h5oh
Copy link
Contributor

c2h5oh commented Nov 27, 2022

Multicast being blocked between wired and wireless connections is fairly common even on consumer/SOHO devices, so this would be nice even just for better connectivity.

@merasil
Copy link

merasil commented Dec 1, 2022

+1
i have multiple vlans and adding the printer via ip would be awsome. mDNS is pain in the ass for subnets...

@gashton
Copy link

gashton commented Dec 10, 2022

+1
Not sure why this wasn't done in the first place... definitely a must-have!
Bambu appear to have implemented Multicast SSDP instead of mDNS, Which is a shame as Avahi does not support this.

@rkarlsba
Copy link
Author

From Wikipedia [SSDP] was formally described in an IETF Internet Draft by Microsoft and Hewlett-Packard in 1999. Although the IETF proposal has since expired (April, 2000),[1] SSDP was incorporated into the UPnP protocol stack, and a description of the final implementation is included in UPnP standards documents

Doesn't seem very sane to use with anything, tbh.

@c2h5oh
Copy link
Contributor

c2h5oh commented Dec 11, 2022

Even fallback to regular DNS would be an improvement - I can always setup a local DNS entry for the printer..

@rkarlsba
Copy link
Author

Which reminds me that IPv6 support would be nice. Seems the printer is running Linux after all, so it really can't be that hard.

@merasil
Copy link

merasil commented Dec 11, 2022

+1
Not sure why this wasn't done in the first place... definitely a must-have!
Bambu appear to have implemented Multicast SSDP instead of mDNS, Which is a shame as Avahi does not support this.

That explains why i cant get the Printer working in lan mode in my vlan network… i should have used wireshark in the first Place…

pls bambu: add „printer by ip“ support

@rkarlsba
Copy link
Author

That explains why i cant get the Printer working in lan mode in my vlan network… i should have used wireshark in the first Place…

You can remedy that by enabling multicast routing or forwarding between VLANs if the router understands that sort of stuff. Still, adding by IP or DNS name shouldn't be very hard to fix and is the good solution to this.

@gashton
Copy link

gashton commented Dec 13, 2022

As a temporary solution. I've written a script to generate an unsolicited response to the upnp/ssdp discover, to tell BambuStudio the IP of the printer. It's meant to be run on Linux, but may work on Windows too if run in a VM/Container/Cygwin.

It has to be run each time BambuStudio is restarted, as Bambu will forget until it receives the response to its M-SEARCH ssdp:discover.

@rkarlsba
Copy link
Author

Better fix this in source. Such workarounds just make Bambu relax since "there's a workaround". The Bambu printers aren't cheap and this should be easy to fix.

@R1N4x
Copy link

R1N4x commented Dec 15, 2022

Lots of fixes and improvements with v1.4 but this one is still missing.

@rkarlsba
Copy link
Author

Can it really be that hard?

@rehashedsalt
Copy link

With today's outage, this is now especially pertinent. There is already an existing dialogue for this feature as of 1.4.2 -- there should be very few blockers for this now.

@julie777
Copy link

My thoughts on this.
It should not require an app using bluetooth to set up the printer for LAN mode. The selection for lan mode should always be available.
After selecting LAN mode only there needs to be a way to connect the printer to the network. A simple way would be to allow putting a file "network credentials.txt" on the SD card and the printer can use network name and password from that file to connect to the network.

When the printer connects to the network it should display its ip address and passcode for bambu studio to connect to it. I am not a network expert so I am not sure about broadcasting its availability on the network. I think this should be okay on a LAN, which makes it discoverable without having to type in the IP address in bambu studio.

@kriordan37
Copy link

+1 i should be able to use static ip addresses and point bambu studio to that. this issue is preventing me from using the printer in lan mode with a vpn

@tinuva
Copy link

tinuva commented Aug 16, 2023

With the latest issue happening now: https://www.reddit.com/r/BambuLab/comments/15rznpy/printer_started_printing_by_itself_damaged_itself/

This issue should really receive priority asap!

@ellenhp
Copy link

ellenhp commented Sep 13, 2023

I posted this in another issue but it looks like this is the primary issue for adding printers by IP address so I'm going to post it here too, sorry about the spam. I can delete the comment in the other issue if it's a problem :)

I got a little bit frustrated with this issue because having command and control in the slicer is a key feature IMO. So I reimplemented the networking plugin to add this feature (and others).

https://github.com/ellenhp/bambu-farm

@timothyzalusky
Copy link

Another +1 for this feature.

@fritzw
Copy link

fritzw commented Nov 7, 2023

As a temporary solution. I've written a script to generate an unsolicited response to the upnp/ssdp discover, to tell BambuStudio the IP of the printer. It's meant to be run on Linux, but may work on Windows too if run in a VM/Container/Cygwin.

It has to be run each time BambuStudio is restarted, as Bambu will forget until it receives the response to its M-SEARCH ssdp:discover.

I've converted the SSDP script to PowerShell, so that it can be used on Windows as well.

@TonyAlberto
Copy link

As a temporary solution. I've written a script to generate an unsolicited response to the upnp/ssdp discover, to tell BambuStudio the IP of the printer. It's meant to be run on Linux, but may work on Windows too if run in a VM/Container/Cygwin.
It has to be run each time BambuStudio is restarted, as Bambu will forget until it receives the response to its M-SEARCH ssdp:discover.

I've converted the SSDP script to PowerShell, so that it can be used on Windows as well.

I just tested it and it's ok, it works, thanks! I will only add that it may be necessary to change the port, in my case it is listening on port 1990 instead of 2021 (here is information about these ports: https://wiki.bambulab.com/en/general/printer-network-ports). The $TARGET_IP line itself is not needed in the powershell script because it is not used at all in this case.

@hoegge
Copy link

hoegge commented Feb 9, 2024

It is quite crazy you cannot add a printer by IP - it means a lot of user simply cannot connect to it and means you can return the printer and get a refund, since it does not work.

@ellenhp
Copy link

ellenhp commented Feb 9, 2024

I imagine it's hard to find time to figure out the user experience, but if anyone from Bambu is reading this, I think I'd like to suggest that you add a way to configure printers by static IP in the config file, and worry about the slicer UI code for that configuration later when you have more time available. A lot of users would be okay editing a config file if it means not having to return the printer (or in my case, re-implement the entire networking plugin in Rust).

To anyone here who runs linux and likes fiddling around with semi-broken software, the bambu-farm repo I linked earlier will get you up and running. It's not perfect. Immediately after a print it drops into an infinite loop on a worker thread so you have to close the slicer and restart the server-side program too, but it gets the job done for me and might be useful for someone else at their wit's end.

@RagingRoosevelt
Copy link

Yeah, without this, the X1E that my employer bought doesn't work on our corporate network. I can ping the printer and it's on the same subnet as my computer, but because it's trying to auto-discover, I can't add it to Bambu Studio.

@rehashedsalt
Copy link

Yeah, without this, the X1E that my employer bought doesn't work on our corporate network.

Corporate environments are an especially pertinent example -- mDNS is oftentimes disabled as a basic security measure.

@RagingRoosevelt
Copy link

mDNS is oftentimes disabled as a basic security measure

That's exactly what's causing the issues I'm running into. And for Bambu to sell the printer specifically on the merits of compatibility with a corporate environment, but not support this direct IP / hostname specification seems disingenuous at best.

@walterwongbbl
Copy link
Collaborator

We are considering this feature, and recently it's the Chinese New Year holiday, so our responses might be slower. We apologize for any inconvenience caused.

@rkarlsba
Copy link
Author

Happy new Chinese year! But I wonder - it's been more than 14 months since I posted this. Does it really take that long to fix such a minor thing?

@superbreadi
Copy link

I also require LAN mode because the printer is located in a separate VLAN to enhance data security. Currently, I am unable to access the printer via Bambu Studio, as it cannot be discovered through mDNS accross VLANs.

@rkarlsba
Copy link
Author

It's not even mDNS, it's SSDP, which started out as a crude draft and then later became part of uPnP. But - since SSDP is based on UDP, you can spoof it
Python: https://gist.github.com/Alex-Schaefer/72a9e2491a42da2ef99fb87601955cc3
PowerShell: https://gist.github.com/fritzw/7d981046b509a27e204d01c9bd73f37b

@superbreadi
Copy link

However, does this mean I have to spoof it every time I start Studio? Additionally, I would like to use Bambu Handy via VPN in LAN mode. Is there a workaround for this as well?

@rkarlsba
Copy link
Author

The slicer (Bambu Studio or OrcaSlicer) will cache the address, so don't worry. As for BambuHandy, ask Bambu about it - I guess they'll just say that you'll need internet access.

@rkarlsba
Copy link
Author

Btw, Bambu knowingly breaks AGPL with the bambu drivers https://blogg.karlsbakk.net/2024/05/24/more-on-bambus-license-issues/

@sprior
Copy link

sprior commented Jul 24, 2024

If it helps I'm running my X1C in a different VLAN than my desktop machine, I use pfSense as my router/firewall and I installed the Avahi plugin on pfSense with the option to repeat packets across subnets. With the appropriate ports opened between the subnets Bambu Studio works just fine.

@rkarlsba
Copy link
Author

It's better to spoof it, so that you don't need to open up unnecessary ports. Also, Bambu really should fix this, along with allowing offline firmware updates.

@timothyzalusky
Copy link

We also need offline firmware upgrades. I've talked to Bambu about it and all they can say is "not supported". Well, this method has been used for 30 years so it's no reason at all not to support it - they just want all machines into their domain.
Look what was just announced, coming soon!

@RagingRoosevelt
Copy link

Yeah, offline firmware is available as of recently:

https://wiki.bambulab.com/en/x1/manual/X1E-firmware-update-from-SD-card
https://www.youtube.com/watch?v=Gj7c5ANN-X0

You need to be on v01.01.02.00 which mean an online firmware upgrade first, but at least it's possible now.

@rkarlsba
Copy link
Author

That doesn't help all of us that don't have an X1E. I have an X1C, which is basically the same machine as the X1E and this functionaliry has been, and still is, used for all sorts of devices

@ColColonCleaner
Copy link

A collaborator mentioned in #2232 that this will be added in the next update. I hope that actually happens, and am looking forward to it if it does.

@kluppy
Copy link

kluppy commented Sep 19, 2024

That doesn't help all of us that don't have an X1E. I have an X1C, which is basically the same machine as the X1E and this functionaliry has been, and still is, used for all sorts of devices

Have you tried it? The title of the video embedded in the how to page is "Offline Firmware Update using SD Card - X1/X1C/X1E"
I assume they all run the same firmware really.

@mwdle
Copy link

mwdle commented Sep 30, 2024

As a temporary solution. I've written a script to generate an unsolicited response to the upnp/ssdp discover, to tell BambuStudio the IP of the printer. It's meant to be run on Linux, but may work on Windows too if run in a VM/Container/Cygwin.
It has to be run each time BambuStudio is restarted, as Bambu will forget until it receives the response to its M-SEARCH ssdp:discover.

I've converted the SSDP script to PowerShell, so that it can be used on Windows as well.

Can confirm this works perfectly for remotely accessing my (LAN only) BambuLab A1 (with a few minor modifications like SN/Model) over my Wireguard VPN (Tailscale).

Thank you for sharing!!!

@tdgunes
Copy link

tdgunes commented Sep 30, 2024

Sorry for multiple messages however, are there any updates regarding this? @walterwongbbl @MackBambu

@kluppy
Copy link

kluppy commented Sep 30, 2024

@tdgunes It has been flagged for the 1.10 release.
#2232 (comment)
#4512 (comment)

@tdgunes
Copy link

tdgunes commented Oct 1, 2024

@tdgunes It has been flagged for the 1.10 release. #2232 (comment) #4512 (comment)

Thanks, however it is not clear to me if this feature will be for X1E only, or for all BambuLab printers. Do you have any further information @kluppy?

@ColColonCleaner
Copy link

@tdgunes the people who posted these issues are using X1C/P1S printers so it should apply to at least those and also the X1E.

@tdgunes
Copy link

tdgunes commented Oct 1, 2024

@tdgunes the people who posted these issues are using X1C/P1S printers so it should apply to at least those and also the X1E.

I see, however I would like this feature to be implemented for A1 series, as the LAN mode does not work effectively with those as well.

@psychedelicu
Copy link

Ia this available on P1S? Because I want to buy it only if it has this implemented already.

@kluppy
Copy link

kluppy commented Oct 8, 2024

@psychedelicu 1.10 has not been released yet, so no.

@psychedelicu
Copy link

@psychedelicu 1.10 has not been released yet, so no.

But they announce that this will pe included?

@MrSuicideParrot
Copy link

The public beta of 1.10 is available and includes binding by IP address!

@mwdle
Copy link

mwdle commented Oct 20, 2024

I'm just getting around to testing out the beta and I can't seem to get my printer to connect via IP address. I have a Bambulab A1.

image

I've confirmed my access code and IP address are correct and I'm able to connect on LAN as one normally would.

Not sure if this is a bug or what is going on here, but it would be interesting to know if anyone else is facing this issue.

Correct me if I'm wrong but the printer shouldn't need a firmware update for this to work right? I am under the impression that this feature is all implemented within Bambu Studio.

@MrSuicideParrot
Copy link

I also tried and found the same error than you.
I used wireshark to understand what the application was doing, and it attempts to do a tcp connection with the port 3000 and receives a tcp reset from the printer. Normally, the slicer talks with port 8883. So, this new features could depend on a firmware update or they forgot to put the correct port. Either way, a firmware update shouldn't be needed for this to work.

@ColColonCleaner
Copy link

ColColonCleaner commented Oct 20, 2024

the printer shouldn't need a firmware update for this to work right? I am under the impression that this feature is all implemented within Bambu Studio.

This should not require a firmware update on the printer. We can already get the slicer to talk with the printer by spoofing the SSDP requests so it definitely should not need any update on the printer side.

If they make it require a firmware update I'd wonder what else they changed.

@Rainie-Read-wdc
Copy link

It appears this feature in 1.10.0 is also broken or doesn't support my X1E. I am still able to use my wireshark spoofed response on the new version though.
image

@chrellrich
Copy link

We have bought two X1E at work and I get the same error when testing the feature in the beta release. Using a spoofed message it works.

@AndreasSchwalb
Copy link

AndreasSchwalb commented Oct 22, 2024

Actually BabuStudio crashes when I try to connect to the printer. I have a P1S...

@therealmrfox
Copy link

I was very happy to see this feature added, but no dice for me either. Though I get a slightly different error, "Failed to publish login request". (Occasionally Bambu Studio also decides to crash instead.) 2 steps forward, 1 step back...

Oddly this is described as a failure to connect to Bambu cloud, which is of course nonsense when connecting in LAN mode.

P1S, works fine once the printer is discovered via (spoofed or real) SSDP, so definitely no networking issues here.

Screenshot from 2024-10-23 20-49-14

Filed issue 5070.

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

No branches or pull requests