xblax / flashforge_ad5m_klipper_mod

Unoffical mod for Flashforge Adventurer 5M (Pro) 3D printers to run Moonraker, custom Klipper, Mainsail & Fluidd
GNU General Public License v3.0
92 stars 5 forks source link

Wifi support in klipperscreen #29

Closed consp closed 3 months ago

consp commented 3 months ago

Since wifi support for klipperscreen requires dbus, and dbus is currently not compiled since it has ... issues ... with crosscompilation, it might not work as-is.

This issue is to get dbus operational in the klipperscreen venv and to get wifi support properly baked in so users can do a "non-configuration" installation and input everything from the touchscreen.

dbus-python pulls in a few of packages and includes patchelf which cross compilation problems. The quickest solution would probably be to add the difficult packages manually and compile them separately with "special attention" for patchelf.

xblax commented 3 months ago

There might be other issues with Wifi and Klipper-Screen, it seems to be reliant on wpa_supplicant and I have integrated iwd: https://github.com/KlipperScreen/KlipperScreen/blob/master/ks_includes/wifi.py

Due to the limited ram we have to deal with, would rather keep iwd. It has no additional userspace-dependencies and is more modern in genral. We do currently have the standard wireless-tools, like iwlist, iwconfig, iwgetid etc. and iwct for manual control of iwd. iwd can also be configured via simple config files.

I also have another configuration mechanism in mind via user provided config files, I have created a ticket for it: https://github.com/xblax/flashforge_adm5_klipper_mod/issues/30

consp commented 3 months ago

I'll have a look, wasn't that far along yet. Otherwise a rewrite might be needed but a not-config-file configuration might be needed for greater adoption (eventually if that's the goal). It's python and if userspace tools are available a lot is possible.

I'll make it a long(er) term goal for now.

consp commented 3 months ago

Created a iwd implementation for klipperscreen, for now it's a hack but it works. Issue can be closed until it crashes somewhere with someone. It's SLOW but that was to be expected since every command is synchronous.

xblax commented 3 months ago

Wow, you really don't do half-baked things! Will test it out next week, when I have the time to continue work on the mod.

consp commented 3 months ago

There is motivation if the printer is not close to the network port and there is a network cable across the room and you sometimes nearly fall over it 😉