Closed cinealfa closed 4 months ago
Hi!! Could you share a bit more about your setup ? Which printer and OS ? Can you access the moonraker page over your network ?
Sure! It is a creality k1 Max running rooted Running klipper I can connect to the moonraker page with no issues and I can connect to palette through script as well. But the palette doesn't seem to detect the serial port.
Thanks. Then what would be helpful is to run the bridge code in a console without logging enabled.
Can you do the following:
If you added the service part that starts the bridge automatically run the following command (this will disable it to avoid conflicts)
sudo systemctl stop serial_moonraker_bridge.service
Then proceed with running the bridge in console mode via SSH:
cd ~/Klipperotchy/tools/serial_moonraker_bridge
python3 serial_moonraker_bridge.py --baudrate=115200 --moonraker=[moonraker_IP]:7125 --serial=/dev/ttyGS0 --log=INFO
Keep an eye on the logs, it should start with something like:
Listenning Palette
Listenning Moonraker
Once this is done, try to connect on the P3 (with 115200 baudrate and /dev/ttyAMA0 port). You should see some activity on the console like follow:
<P3>.....</P3>
<Moonraker>.....</Moonraker>
Let me know if you have anything different than that.
There doesn't appear to be any traffic on the serial port... root@DietPi:~# cd ~/Klipperotchy/tools/serial_moonraker_bridge root@DietPi:~/Klipperotchy/tools/serial_moonraker_bridge# python3 serial_moonraker_bridge.py --baudrate=115200 --moonraker=192.168.1.215:7125 --serial=/dev/ttyGS0 --log=INFO Listening palette Listening moonraker
I changed cables and tried again same thing.
The bridge seems to be running fine in both cases. It detects the serial port and moonraker. Then the only possibility is the cable which might not be a data cable (many micro usb cable are not data). You are plugging the micro usb cable on the correct port of the pi zero, the one on the left side for peripherals ?
Yes and I have tried several cables. next step is to try another printer and see if the mosaic is the issue.
No need for another printer. The problem at least for now is between the P3 and the Pi Zero. If you are sure about the cable, then it is a config problem. I noticed the parameter that I gave to connect was wrong for the port (my bad).
The correct setting should be 115200 Baud Rate and /dev/ttyACM0 COM port.
Can you retry with that again with the bridge in console mode, with the same setup as previous command ?
Make sure sure that the Web bridge is not running as it will capture the port.
cd ~/Klipperotchy/tools/serial_moonraker_bridge
python3 serial_moonraker_bridge.py --baudrate=115200 --moonraker=[moonraker_IP]:7125 --serial=/dev/ttyGS0 --log=INFO
Also, are you running diet pi OS or raspberry pi OS on the bridge ? And last are those 2 changes done ?
In the file config.txt at the end of the file append the line:
dtoverlay=dwc2
In the file cmdline.txt at the end of the first line append:
modules-load=dwc2,g_serial
I am running Dietpi os and The 2 changes are in place.
I did check with another printer and it connected imediately so the mosaic is working. I have ordered a new cable that purports to be a data cable so will try that as well. There was no change in the behavior of the Palette. One question: The provided command "cd ~/Klipperotchy/tools/serial_moonraker_bridge python3 serial_moonraker_bridge.py --baudrate=115200 --moonraker=[moonraker_IP]:7125 --serial=/dev/ttyGS0 --log=INFO" shows the port as GS0 should it be ACM0 as well?
On the bridge (running on the pi zero 2) the port must be ttyGS0 On the palette the port is ttyACM0
Good to know! The new data cable arrived and unfortunately there was no change, however after fooling around I can get it to connect..sort of. I followed you instructions to cancel the service then triy to connect to the palette -no luck. Then repeat the process and the connection happens with the following info:
Listening palette
Listening moonraker
INFO:root:
2nd Update Now it connects automatically I do not have any clue why it has started to work. I rebooted the pi and it seems to connect. but it doesnt actually do anything. For example I try to heat the hotend and it doesnt seem to send the command to the printer.
The logs show activity from both sides. I can see the queries from the Palette3 and the response from Moonraker. So we know that the connection is working as intended, no faulty cable and the parameters are known. Now the inconsistency. The logs show concurrent access to the serial port, which makes me believe that the service isn't stopped. I will try today to add code to the service so we can see the logs somewhere, so you don't have to stop, run the serial command etc.
ok I will standby
SerialException( serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?) To be clear it only connects the second time around and only if bridge service is disabled. Is any of this helpful to you?
Just to be sure, all options are set to off in dietpi-config?
That seems to be the problem! Some of the serial consoles where on. Now it seems to connect correctly! I have clogged hotend which I need to fix before I can test it. Update: Printer connects! and starts to print. However it doesnt complete the print. But the not connecting issue is closed.
Have serial bridge setup per instructions on pizero 2w. Everything on that ends seems ok. But the mosaic doesnt connect. I have tried putting in the actually address (/dev/ttyGS0) but nothing seems to happen. When I to connect through canvas I get a device error. Any ideas?