bambulab / BambuStudio

PC Software for BambuLab and other 3D printers
GNU Affero General Public License v3.0
2.16k stars 289 forks source link

Send to Printer stating "not same LAN" when printer IS in same lan and can be connected to using FTP #1001

Closed Lesani closed 1 year ago

Lesani commented 1 year ago

Describe the bug Left the message from Studio, right my FTP client connected to the printer and showing SD content image image

Expected behavior sending to the printer works from bambu studio

Desktop (please complete the following information):

psiberfunk commented 1 year ago

Bambu has silly hardcoded masks for what they think a LAN is . If it’s not 192.168.X.X they don’t treat it as on a lan . Not sure why they do this , but this is a bug I think that happens on windows and not on Mac.

Merlwynd commented 1 year ago

Have exact same issue as Lesani …everything works right except sending file to printer SD card. All my network addresses are 10.0.0.xx also. First I have heard about the 192.168.x.x requirement…thanks for that. But there are folks that have problem with that as well. See issue #982. I have seen quite a few posts (and added to them) about this “not on same Lan” issue but have seen no reply from Bambu. As I understand it 192.xxxx is older architecture vs 10.xxx?….but must admit I am not that knowledgeable in this area. I have even tried the “Lan Only” mode on the printer…but get the same message.

xcschultzx commented 1 year ago

Same issue here, 10.10.1.x network. It has been driving me crazy. Makes sense this is a problem if they require a 192.168.1.x network. Please fix this issue Bambu.

psiberfunk commented 1 year ago

It has nothing to do with old/new architecture @Merlwynd and everything to do with most commonly used. Most consumer routers default to the 192.168.X.X scheme , but some do not . They’re all valid private LAN subnets . This is probably someone just being really sloppy in the code on windows and refusing to listen for ssdp on the right interfaces .

What it seems to do is that it only even opens a socket (udp 2021, ssdp) to listen for printers existing on interfaces with a 192.168 address. Anyone can check this by looking at what listening ports are open in the windows command line (or your preferred gui )

Merlwynd commented 1 year ago

Thanks so much for reply on this… as I said my knowledge is limited in this area so really grateful for your knowledge…I am never too old to learn…LOL! Googling around it seems the commonly private ipv4 address networks are… iP 192.168.0.0 - 192.168.255.255 (class A network) iP 172.16.0.0 - 172.31.255.255. (class B network) iP 10.0.0.0 - 10.255.255.255 (class C network) So, Bambu should ensure any of these address ranges can constitute on being on same LAN (i.e. allowing for the various correct listening ports?)…do I have it right? Unfamiliar with listening port being used in my case but can I guess I find that out using cmd line ….though I assume I cannot simply change it to the one you mention while still being on iP 10.0.0.xxx? My cable company consumer router must default to that network as I did no changes (wouldn’t know how)..and I have nothing complex setup…just one home wifi network…

Lesani commented 1 year ago

no this should not be limited to ANY range, Bambu should check if the IP address of the printer is reachable and is indeed the respective bambu device, no matter what IP address/range is used. Next week I will put a printer on our company network, and of course it will not be 192.168... but I will need local access because of data security, so I'm back to FTP there as well...

psiberfunk commented 1 year ago

no this should not be limited to ANY range, Bambu should check if the IP address of the printer is reachable and is indeed the respective bambu device, no matter what IP address/range is used. Next week I will put a printer on our company network, and of course it will not be 192.168... but I will need local access because of data security, so I'm back to FTP there as well...

The printer should probably never be on a public IP , therefore they should allow all non public ip subnets . All ips doesn’t make sense to listen on

rkarlsba commented 1 year ago

That a unit is on a public IP address or not, doesn't mean if it's available from the net or not. There are such things sa firewalls, after all. This reminds me of the bug about not being able to add a printer by its IP address. Several home networks have different VLANs for different units these days, after all.

psiberfunk commented 1 year ago

So , I think the problem here is it is the SLICER doing the listening . And if the IP your slicer (PC) is on is on a possibly publicly accessible IP, it would be bad security practice for it to be listening on that IP, as in theory it might provide an attack vector if you are not properly firewalled.

rkarlsba commented 1 year ago

I've only workd with IT since 1994 or so, but for what I know, making the slicer listen to what the printer has to say, is a very bad move. The printer's role is a server, the slicer is a client. Better just setup this in a secure, encrypted way (meaning no FTP, as I wrote about in https://blogg.karlsbakk.net/2022/11/23/bambu-lab-x1-carbon-the-flipside/), but something good. https or sftp should work, but using Matter as a new protocol, will secure it all.

psiberfunk commented 1 year ago

I've only workd with IT since 1994 or so, but for what I know, making the slicer listen to what the printer has to say, is a very bad move. The printer's role is a server, the slicer is a client. Better just setup this in a secure, encrypted way (meaning no FTP, as I wrote about in https://blogg.karlsbakk.net/2022/11/23/bambu-lab-x1-carbon-the-flipside/), but something good. https or sftp should work, but using Matter as a new protocol, will secure it all.

So , it’s not really that insecure if you’re using it on local LAN mode . Self signed HTTPS certs don’t magically get accepted (for good reason) and would likely cause as many issues as they solve . The UDP based service discovery they use is somewhat typical , although is not related to the security of the FTP server, which, yes probably ought to be secured using SFTP or FTPS .

However if you’re really worried about security on your local LAN from others on the same LAN, you’d want to setup a dedicated VLAN, which would inherently give you that level of assurance . In any case I think this is getting a bit off topic here .

Personally I really happen to disagree with your security analysis on several levels as I think it rather misses the point and conflates open internet security issues with local LANs which are by definition firewalled as a result of NAT. This is a long and detailed debate I don’t think is appropriate for this forum .

rkarlsba commented 1 year ago

Good luck adding the printer across a router as you would with a separate VLAN. I posted this https://github.com/bambulab/BambuStudio/issues/702 aboutadding printers by IP address or DNS name and I beleive that's the way to go.

walterwongbbl commented 1 year ago

This error message is not accurate. We will allow users to enter the printer's IP address in the next version.

rkarlsba commented 1 year ago

It is indeed accurate until you release this version ;)

Lesani commented 1 year ago

fixed with latest release, sending works now

intdel commented 1 year ago

This error message is not accurate. We will allow users to enter the printer's IP address in the next version.

Did this ever happen? I am having the same error.

EDIT: In my case it was a firewall problem.

zswickliffe commented 1 year ago

@Lesani I'm still having an issue with this. I've enabled all ports listed here on my PC firewall settings as well as in my router. I'm not sure what else to try - any tips?

tyxdqq commented 1 year ago

i hade the same issue 4 mins ago, so i turned off my windows firewall, private net firewall, now it works...... i just turn on my domain firewall, and it still works, so i guess the private net firewall it is

zswickliffe commented 1 year ago

I resolved the issue by creating an inbound and outbound firewall rule for Bambu Slicer allowing all ports.

I discussed with support and they didn't know about this, I ended up resolving it on my own.

walterwongbbl commented 1 year ago

Hi. zswickliffe Thank you very much for your suggestion. I will verify if your method is feasible.

slurpey commented 1 year ago

thansk to @zswickliffe for the rules in the firewall.

Instructions for simple people like me: On Windows:

  1. Start Menu
  2. Type and open: "Windows defender" (it will auto complete with "Firewall with Advanced Security")
  3. Click on the left "Inbound Rule", then in the "action" window, "new Rule", then select "Program" and Next. image
  4. "This program path" and find your bambu studio exe file. Mine is "C:\Program Files\Bambu Studio\bambu-studio.exe" image
  5. Select Allow the connection and save. image
  6. Repeat EXACTLY steps 3 to 5 but in 3, select "Outbound rules". And be careful, in my case in step 5, the default needed to be changed to "Allow the connection". image
Znubbis commented 1 year ago

By reading this thread it sound like Bambu Labs are not ready to enter the corporate sector and they will continue to be a deluxe home printer. Most corporations do not have 192.168.x.x as a internal LAN address or have only one subnet. They do probably not allow wifi clients with only a password or allow clients to access the internet with several ports other than 80 and 443. And they do absolutely not allow you to enter your own firewall rules on the computers :)

Bambu Labs need to add a option to enter a IP in their software to access the printer as its rare their automatic detection will work everywhere and create a real "LAN Only" mode one that actually work.

I'm disappointed as we just got a printer at work as this is one of the only real fast printers.

xcschultzx commented 1 year ago

"Most corporations do not have 192.168.x.x as a internal LAN address"

This was fixed and closed quite a while ago. I have a 10.10.1.x network and I can print locally no problem. You always have the option to print from SD card if you need to be completely air gapped.

BenDavidson90 commented 1 year ago

As of today, I can start the print without any problem but I can't send file to printer just to print later. It says "The printer is required to be on the same LAN as Bambu Studio". it's incomprehensible since if I send for direct printing it finds the printer... Did the Windows Defender trick but nothing change.

tyxdqq commented 1 year ago

same thing here . it been like this for a month now, tried pretty much everything LOL i gave up~ just print directly from the printer for now

BenDavidson @.***> 于2023年10月2日周一 11:13写道:

As of today, I can start the print without any problem but I can't send file to printer just to print later. It says "The printer is required to be on the same LAN as Bambu Studio". it's incomprehensible since if I send for direct printing it finds the printer... Did the Windows Defender trick but nothing change.

— Reply to this email directly, view it on GitHub https://github.com/bambulab/BambuStudio/issues/1001#issuecomment-1743207035, or unsubscribe https://github.com/notifications/unsubscribe-auth/AULI54BSMTCM6ZIL7S5MU53X5LKZVAVCNFSM6AAAAAATO2OUNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBTGIYDOMBTGU . You are receiving this because you commented.Message ID: @.***>

-- May 631871-6139

walterwongbbl commented 1 year ago

Hi. @BenDavidson90 @tyxdqq @xcschultzx First, this error message is not accurate. When we can't retrieve the device's IP address, we will display a message saying that it's not in the same local network.

In response to this situation, if we can't obtain the printer's IP address, we will display an input window, allowing the user to enter the device's IP and access code.

We will incorporate these changes in the next version.

Lesani commented 1 year ago

You can just determine its IP address by asking your cloud service, and only if ‚lan only‘ is checked fall back to your offline methodSent by my iPhoneOn 07.10.2023, at 03:07, walterwongbbl @.***> wrote: Hi. @BenDavidson90 @tyxdqq @xcschultzx First, this error message is not accurate. When we can't retrieve the device's IP address, we will display a message saying that it's not in the same local network. In response to this situation, if we can't obtain the printer's IP address, we will display an input window, allowing the user to enter the device's IP and access code. We will incorporate these changes in the next version.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

EinzelFall commented 1 year ago

As someone that doesnt know anything about network and this stuff, i dont know what to do now. Have the same issue as BenDavidson90. image

As of today, I can start the print without any problem but I can't send file to printer just to print later. It says "The printer is required to be on the same LAN as Bambu Studio". it's incomprehensible since if I send for direct printing it finds the printer... Did the Windows Defender trick but nothing change.

Also did the firewall thing, didnt change anything. Also have one of those 10.10.1.x networks. What exactly am i supposed to do now, so i can send the files to my sd card?

Thanks in advance

snoopyapocalypse commented 1 year ago

I am having the same issue. I have xfinity so I have ip addresses beginning with 10. I even tried separating out the networks into 2.4 and 5ghz and making sure BS and the x1c were on the 2.4. Then that didn't work I was out of ideas and searched to find that this is probably a bug.

Siggy101 commented 11 months ago

I have just received my X1C combo today, and am really annoyed to also be getting this issue. I'm on the most ordinary home network, I tried the exceptions in Windows Defender, have a 192.168.x.x range, etc etc etc I get this same error in Bambu Studio and Orca Slicer.
I have opened a support ticket with Bambu so let's see what they come back with. (for the record, I also had the annoying blank login window issue too. I fixed that one by reinstalling and forcing the network connector install). I have left Creality as I thought Bambu was turnkey...........

xVolta commented 11 months ago

This error message is not accurate. We will allow users to enter the printer's IP address in the next version.

It's almost a year since you've said this, but Bambu Studio 1.7.7.89 still doesn't allow this. When will this mythical "next version" be released?

My home network, where I'm trialing the X1C this month before expanding my business print farm in Q1 2024, has separate subnets for the wired LAN my design workstation is on and the wireless LAN the X1C is on (shame it doesn't have ethernet), so I'm forced to use cloud printing and can't stage print files for later use, major fail.

In my business network, the printer VLAN isn't permitted internet access in either direction for all of the obvious reasons. Will this be resolved by then or should I just go ahead and place an order for 25 Prusa Mk4s instead of wasting more time trying to make Bambu printers work in a modern IT environment without dodgy hacks?

Siggy101 commented 11 months ago

It's finally here guys! I raised a support ticket for this 'not on the same LAN' bug. Bambu tried all sorts of things that didn't work, but then they told me to install version "1.8.0 Public Beta 2" from this link and it worked!!! https://github.com/bambulab/BambuStudio/releases

OK, it's in beta for now, but when I tried to send a file to the printer, this build prompted me to input the IP address of the printer, as well as to validate the access code, and then it worked perfectly.

Fill your boots guys! Go try this beta and report back if it fixes the issue for you. It certainly has for me.

StephanBieker commented 10 months ago

How often did it work? I'm stuck with 1.8.2 and it doesn't work.

StephanBieker commented 10 months ago

Very annoying bug