Stephan3 / dwc2-for-klipper

A translator between DWC2 and Klipper
GNU General Public License v3.0
160 stars 38 forks source link

DWC2 does not start #77

Closed icstra closed 4 years ago

icstra commented 4 years ago

I’ve already installed Klipper and dwc2 on a virtual machine running Raspbian and all is working perfectly. Now ,I’m trying to install that on a Manjaro distro and I get some troubles. Klipper has been installed from AUR and run perfectly well. I’ve installed also dwc2-for-klipper following instructions as I did for my Raspbian installation. Results : I cannot connect on 127.0.0.1:4750 as precised in printer.cfg. I’ve noticed that in the Raspbian install, reading the logs, I can see that dwc2 connect to 0.0.0.0 ( a line between extruder and serial connection). In the Klippy.log of Manjaro, I cannot see that line, concluding that the server does not start. I do not have any error messages in the logs. Thanks for your help since I know that dwc2 for Klipper runs well on your Arch machine.

Avtonomys commented 4 years ago

https://github.com/KevinOConnor/klipper/commit/787ed452c2abe3bad81ffaf732b0b2609e3534bb

icstra commented 4 years ago

Thanks for reply. After checking, it looks like my files already get these modifications. I’m investigating now on ports opening.

PrzemoPOL commented 4 years ago

If you have AttributeError: Printer instance has no attribute 'try_load_module' in klippy.log and fresh klipper try to change line 49 in file web_dwc2.py from self.stepper_enable = self.printer.try_load_module(config, "stepper_enable") to self.stepper_enable = self.printer.load_object(config, "stepper_enable")

icstra commented 4 years ago

Thanks for reply. I had already change that line. I ´ve noticed that the symlink dwc2 to klippy was broken. I ´ve fixed that. Then I got an error message from dwc2 ( meaning that link was restored) telling me that /temp/printer was missing. So, I checked in my Raspbian and indeed there is a file named printer in tmp. Unfortunately, this file is not there in my Manjaro installation. I commented the line in dwc2 and the web server pop up in my browser. So, I progress. Of course, without serial instance, I cannot connect to my printer. I don’t understand why this file is missing. Finally, I found a walk around . I modified dwc2.py and replaced /tmp/printer with /dev/pts/0 and all seems to run. I can connect to web server and just tried a homing which well achieved. Will try later if all other functions are running well. For information, all is working with 2.1.7 dwc2. Thanks to all for your help.