-
Notifications
You must be signed in to change notification settings - Fork 2
Plugin loads but doesn't find the printer ever. #9
Comments
I have the same issue. My snapmaker is on the newest version. I even hacked the source code to find the correct IP of my printer (I could see in the above log that it wasn't finding my printers IP) and tried to add a socket for it but no luck:
|
This is not fixed. I followed the troubleshooting guide for hours. Firewall is correctly configured. Plugin used to work for me but now does not on snapmaker version 1.14.3. |
Hi, @brohirrim Does LUBAN work correctly? If not, i can do nothing, I fully implemented the snapmakers protocol in this plugin. |
Luban works perfectly. I've been having to export my gcode and import into
Luban to print
…On Sun, Sep 4, 2022, 8:41 PM Dylan ***@***.***> wrote:
Hi, @brohirrim <https://github.com/brohirrim>
Does LUBAN work correctly? If not, i can do nothing, I fully implemented
the snapmakers protocol in this plugin.
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AX3IVPPESIBQTY3HWA5WKWLV4VTWVANCNFSM56QH3WYA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Wow, way to ignore issue request. This is not fixed. Additionally, @macdylan your response is insulting. You may as well be asking if we checked the power cord. Most of us on GitHub are professionals. Please reopen and actually fix this. |
I recently contacted Snapmaker's software engineers and confirmed that there are some bugs in firmware version 1.14.x that cause the touchscreen to fail to respond broadcast messages, the solution is reconnect the network (usually restart the device). They will soon release a firmware update to fix this issue, and i will also follow up. Thanks for your fdbk. |
@jallen2281 Can you try the latest version? |
Still doesn't seem to work for me |
Can you post more information? Such as OS version, network connection type(wireless or wired), router model. Thanks for your help. |
The auto discovery mechanism isn't working for me either in the old version or new. I'm running Windows 11 on a Wifi connection using a Linksys Velop mesh. I pulled up wireshark and when I start cura, I'm able to see the plugin send the UDP I also see my snapmaker respond multiple times. I added some log statements to the code and then tailed the cura log. I noticed that that the
I think its odd that EDIT: Fixed some typos. |
@skyguy94 👍 Can you try the latest version? https://github.com/macdylan/Snapmaker2Plugin/releases/tag/8.0.0 |
I just tried it and it doesn't work. I'll try some investigation in a bit, but a quick static review leaves me with some questions about the bind method:
Would it be worth a trace or debug log if the bind fails?
Should sock be wired to readyRead still? Without a lambda invocation, I don't see how the windows version is able to receive the socket data.
|
Also, feel free to open a branch for team debugging. I've pulled this repo into my plugins folder for cura. |
On Windows, the PyQt6 On my side, I've debugged with Wireshark, it turned out the broadcast reply was sent back by the server (the machine firmware). But PyQt6's socket's So we use the low-level interface of python socket, it doesn't have Here is what we do the python socket:
|
For debugging. I would suggest to add logs to https://github.com/macdylan/Snapmaker2Plugin/blob/main/OutputDevicePlugin.py#L100 As the code below, I added 3 logs in the def __collect(self) -> None:
# the socket has abort and discover is cancelled
if not self._socket:
return
if isinstance(self._socket, QUdpSocket):
return
Logger.debug("collecting data...") # <-- add log here
while True:
try:
msg, _ = self._socket.recvfrom(128)
except (TimeoutError, ConnectionError) as e:
# normal timeout, or ConnectionError (including ConnectionAbortedError, ConnectionRefusedError,
# ConnectionResetError) errors raise by the peer
Logger.debug("error receiving data... %s", e) # <-- add log here
break
try:
message = msg.decode("utf-8")
self.dataReady.emit(message)
except UnicodeDecodeError as e:
Logger.debug("error decoding data... %s", e) # <-- add log here
pass |
Ok, got it. The problem I had is here:
where my machine_name returns Here's the log where you can see what it returns and how the plugin just stops when its wrong.
EDIT: I'm still not getting a printer, but the udp socket is getting data.
With logging coming from custom log statements:
EDIT2: Looks like its
|
I'm sorry for that mistake, It has been corrected, Please use 8.1.0 |
Closer. I had some edits in my comment that added more debugging info. There's a conflict for the value |
Sadly, 8.1 still does not work for me :( |
To add more details, I added this line in _isSM2Container:
and received this output:
So it seems like my stack object does not have the machine name attribute. I am on the latest Snapmaker version (V1.15.12) and Cura 5.2.1. Again, Luban (4.5.1) connects to my printer with no issue. Is this just a config issue on my side? editted: formatting and bad grammar |
Are you using a custom FFF printer? If you added Snapmaker printer in Cura, you can check e.g. In "overrides": {
"machine_name": {
"default_value": "Snapmaker A150"
},
...
} Once you activate a Snapmaker printer, the machine name should be defined name ("Snapmaker A150"). |
The plugin isn't working correctly and cannot find my printer attached to the same wifi, or even hard wired to the same network. Network is wide open, firewall rules in place. Below is the Cura log.
2022-08-14 14:11:11,147 - INFO - [MainThread] UM.PluginRegistry.loadPlugin [493]: Loaded plugin SettingsGuide2 2.9.0 2022-08-14 14:11:11,192 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 172.24.64.1 2022-08-14 14:11:11,194 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 172.22.32.1 2022-08-14 14:11:11,196 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 172.18.16.1 2022-08-14 14:11:11,197 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 192.168.1.181 2022-08-14 14:11:11,198 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 169.254.237.178 2022-08-14 14:11:11,199 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 169.254.114.113 2022-08-14 14:11:11,201 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 169.254.168.112 2022-08-14 14:11:11,202 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 169.254.3.80 2022-08-14 14:11:11,204 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 169.254.104.157 2022-08-14 14:11:11,205 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 169.254.113.228 2022-08-14 14:11:11,206 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 169.254.62.62 2022-08-14 14:11:11,207 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 169.254.159.183 2022-08-14 14:11:11,208 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 169.254.139.228 2022-08-14 14:11:11,210 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 192.168.1.249 2022-08-14 14:11:11,211 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 169.254.47.78 2022-08-14 14:11:11,212 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 172.17.64.1 2022-08-14 14:11:11,213 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 172.28.224.1 2022-08-14 14:11:11,213 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 172.31.176.1 2022-08-14 14:11:11,214 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 172.20.48.1 2022-08-14 14:11:11,216 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 172.29.0.1 2022-08-14 14:11:11,217 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 172.27.160.1 2022-08-14 14:11:11,217 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [75]: Discovering printers on network interface: 172.25.32.1 2022-08-14 14:11:11,219 - DEBUG - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.__init__ [99]: '0' tokens loaded. 2022-08-14 14:11:11,220 - INFO - [MainThread] UM.PluginRegistry.loadPlugin [493]: Loaded plugin Snapmaker2Plugin 7.2.0 2022-08-14 14:11:11,303 - INFO - [MainThread] UM.PluginRegistry.loadPlugin [493]: Loaded plugin ThingiBrowser 3.0.0 2022-08-14 14:11:11,309 - DEBUG - [MainThread] UM.PluginRegistry.loadPlugins [416]: Loading all plugins took 2.534653425216675 seconds 2022-08-14 14:11:11,330 - INFO - [MainThread] UM.VersionUpgradeManager.upgrade [163]: Looking for old configuration files to upgrade. 2022-08-14 14:11:11,619 - INFO - [MainThread] UM.VersionUpgradeManager.upgrade [177]: Checking and performing updates took 0.2895798683166504 2022-08-14 14:11:11,637 - INFO - [MainThread] UM.Qt.QtApplication.startSplashWindowPhase [265]: Completed loading preferences. 2022-08-14 14:11:11,661 - INFO - [MainThread] UM.Qt.QtApplication.startSplashWindowPhase [300]: Created system tray icon. 2022-08-14 14:11:13,078 - DEBUG - [MainThread] UM.Settings.ContainerRegistry.loadAllMetadata [548]: Loading metadata into container registry took 1.4096324443817139 seconds 2022-08-14 14:11:13,094 - DEBUG - [MainThread] cura.Scene.CuraSceneController.setActiveBuildPlate [142]: Select build plate: 0 2022-08-14 14:11:13,094 - INFO - [MainThread] cura.CuraApplication.run [823]: Initializing machine error checker 2022-08-14 14:11:13,299 - WARNING - [MainThread] LocalContainerProvider.LocalContainerProvider._saveCachedDefinition [308]: The definition cache for definition snapmaker2_A350 failed to pickle. 2022-08-14 14:11:13,299 - INFO - [MainThread] cura.UI.MachineActionManager.addDefaultMachineActions [74]: Default machine actions added for machine definition [snapmaker2_A350] 2022-08-14 14:11:13,521 - WARNING - [MainThread] LocalContainerProvider.LocalContainerProvider._saveCachedDefinition [308]: The definition cache for definition snapmaker2 failed to pickle. 2022-08-14 14:11:13,718 - INFO - [MainThread] cura.Settings.GlobalStack.addExtruder [192]: Extruder[snapmaker_extruder_0 #2] added to [Snapmaker 2 A350] at position [0] 2022-08-14 14:11:13,723 - INFO - [MainThread] FirmwareUpdateChecker.FirmwareUpdateChecker.checkFirmwareVersion [79]: No machine with name Snapmaker 2 A350 in list of firmware to check. 2022-08-14 14:11:14,272 - DEBUG - [MainThread] cura.Machines.ContainerTree.__getitem__ [120]: Adding container tree for snapmaker2_A350 took 0.5477147102355957 seconds. 2022-08-14 14:11:14,289 - DEBUG - [MainThread] PostProcessingPlugin.PostProcessingPlugin.loadScripts [206]: Begin loading of script: ChangeAtZ 2022-08-14 14:11:14,289 - DEBUG - [MainThread] PostProcessingPlugin.PostProcessingPlugin.loadScripts [206]: Begin loading of script: ColorMix 2022-08-14 14:11:14,289 - DEBUG - [MainThread] PostProcessingPlugin.PostProcessingPlugin.loadScripts [206]: Begin loading of script: CreateThumbnail 2022-08-14 14:11:14,289 - DEBUG - [MainThread] PostProcessingPlugin.PostProcessingPlugin.loadScripts [206]: Begin loading of script: DisplayFilenameAndLayerOnLCD 2022-08-14 14:11:14,304 - DEBUG - [MainThread] PostProcessingPlugin.PostProcessingPlugin.loadScripts [206]: Begin loading of script: DisplayProgressOnLCD 2022-08-14 14:11:14,304 - DEBUG - [MainThread] PostProcessingPlugin.PostProcessingPlugin.loadScripts [206]: Begin loading of script: FilamentChange 2022-08-14 14:11:14,304 - DEBUG - [MainThread] PostProcessingPlugin.PostProcessingPlugin.loadScripts [206]: Begin loading of script: InsertAtLayerChange 2022-08-14 14:11:14,304 - DEBUG - [MainThread] PostProcessingPlugin.PostProcessingPlugin.loadScripts [206]: Begin loading of script: PauseAtHeight 2022-08-14 14:11:14,304 - DEBUG - [MainThread] PostProcessingPlugin.PostProcessingPlugin.loadScripts [206]: Begin loading of script: RetractContinue 2022-08-14 14:11:14,304 - DEBUG - [MainThread] PostProcessingPlugin.PostProcessingPlugin.loadScripts [206]: Begin loading of script: SearchAndReplace 2022-08-14 14:11:14,320 - DEBUG - [MainThread] PostProcessingPlugin.PostProcessingPlugin.loadScripts [206]: Begin loading of script: Stretch 2022-08-14 14:11:14,320 - DEBUG - [MainThread] PostProcessingPlugin.PostProcessingPlugin.loadScripts [206]: Begin loading of script: TimeLapse 2022-08-14 14:11:14,320 - DEBUG - [MainThread] PostProcessingPlugin.PostProcessingPlugin.loadScripts [206]: Begin loading of script: UsePreviousProbeMeasurements 2022-08-14 14:11:14,508 - WARNING - [MainThread] LocalContainerProvider.LocalContainerProvider._saveCachedDefinition [308]: The definition cache for definition fdmprinter failed to pickle. 2022-08-14 14:11:14,524 - INFO - [MainThread] Snapmaker2Plugin.SM2OutputDeviceManager.start [108]: Snapmaker2Plugin started.
The text was updated successfully, but these errors were encountered: