Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

enable discovery on all network interfaces #5

Merged
merged 1 commit into from
May 31, 2022

Conversation

PeSme
Copy link
Contributor

@PeSme PeSme commented May 30, 2022

I have WiFi, LAN and several VPNs and the plugin does not work = doesn't find the printer. Luban works well so it had to be something different than what you mention in Troubleshooting Snapmaker Discovery.

It appears that QHostAddress.SpecialAddress.AnyIPv4 (or simply not binding the socket to particular interface) picks any (=the first reported by OS) but not all of them! So if someone has multiple network interfaces the program must loop through all of them. And that's what Luban actually does as you can see at https://github.com/Snapmaker/Luban/blob/master/src/server/services/socket/WifiServerManager.js#L79

So I have modified your code to do it as well. I had it fixed for several month (for Cura 4), today I adapted the change for QNetwork so it's ready for Cura 5.

@macdylan macdylan merged commit 73191d3 into macdylan:main May 31, 2022
@macdylan
Copy link
Owner

Nice work!

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

Successfully merging this pull request may close these issues.

2 participants