octo4a
octo4a copied to clipboard
Unable to connect to serial with killper, showing "serialhdl.error: mcu 'mcu': Serial connection closed"
Hi, thanks for your efforts, this is a fantastic project!
but I having issue to connect the printer via USB serial port, running tail /tmp/klippy.log
in ssh it shown:
localhost:~# tail /tmp/klippy.log
params = self.send_with_response(msg, 'identify_response')
File "/klipper/klippy/serialhdl.py", line 258, in send_with_response
return src.get_response([cmd], self.default_cmd_queue)
File "/klipper/klippy/serialhdl.py", line 315, in get_response
self.serial.raw_send_wait_ack(cmds[-1], minclock, reqclock,
File "/klipper/klippy/serialhdl.py", line 250, in raw_send_wait_ack
self._error("Serial connection closed")
File "/klipper/klippy/serialhdl.py", line 62, in _error
raise error(self.warn_prefix + (msg % params))
serialhdl.error: mcu 'mcu': Serial connection closed
then I kill the klipper service using "kill.sh" script, and manually run command:
python3 /klipper/klippy/klippy.py /root/printer.cfg -a /tmp/klippy_uds # without log path specified
then the klipper will show error in terminal:
INFO:root:mcu 'mcu': Starting serial connect
WARNING:root:mcu 'mcu': Unable to open serial port: [Errno 13] Could not exclusively lock port /dev/ttyOcto4a: [Errno 13] Permission denied
after that I try install minicom (apk add minicom), connect the /dev/ttyOcto4a with
minicom -D /dev/ttyOcto4a -H -b 25000
I can see the minicom terminal printout the hex data which reported by Klipper firmware in mega2560 (I'd already flash the firmware via PC and test in PC environemt, which original octoprint can works).
Did I do something wrong? How can I solve this issue?
FYI:
- device:
Lenovo Zuk z2
- os: aospextended v8.6 (
Android 11
) - octo4a:
v1.0.4
Hi @GeeMing,
Can you tell me how to install/configure klipper with this octo4a mobile app.
Hi Mugesh,
what I did to install/configure Klipper:
- copy
scripts/setup-klipper.sh
into the smart phone via ssh - execute it inside the shell
bash setup-klipper.sh
- clone the
printer.cfg
into/root/
, a worked Klipper configuration from my Klipper host control PC - change
printer.cfg
[mcu] section asserial: /dev/ttyOcto4a
- restart the APP
tail /tmp/klippy.log
Were you able to solve this? I am also facing the same issue.
I had somewhat similar problems but prefixing klipper invocations with LD_PRELOAD=/home/octoprint/ioctlHook.so python3 klipper.py ...
, e.g. updatestart.sh
to:
LD_PRELOAD=/home/octoprint/ioctlHook.so python3 /klipper/klippy/klippy.py /root/printer.cfg -l /tmp/klippy.log -a /tmp/klippy_uds