Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC2217 & raw TCP connections don't work with MeatPack #27

Open
jbubik opened this issue Apr 8, 2023 · 0 comments
Open

RFC2217 & raw TCP connections don't work with MeatPack #27

jbubik opened this issue Apr 8, 2023 · 0 comments

Comments

@jbubik
Copy link

jbubik commented Apr 8, 2023

Octoprint 1.8.7 with MeatPack connecting to raw TCP socket://192.168.1.200:5000 - fails with:

2023-04-07 19:44:14,663 - octoprint.util.comm - ERROR - Unexpected error while connecting to serial port socket://192.168.1.200:5000, baudrate 115200 from hook meatpack: SerialException: '[Errno 2] could not open port socket://192.168.1.200:5000: [Errno 2] No such file or directory: 'socket://192.168.1.200:5000'' @ comm.py:_open_serial:3832
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/serial/serialposix.py", line 322, in open
    self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: 'socket://192.168.1.200:5000'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/octoprint/util/comm.py", line 3832, in _open_serial
    serial_obj = factory(
  File "/usr/lib/python3.10/site-packages/octoprint/util/__init__.py", line 1688, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/OctoPrint_MeatPack/__init__.py", line 64, in serial_factory_hook
    self._serial_obj.open()
  File "/usr/lib/python3.10/site-packages/serial/serialposix.py", line 325, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))

Same issue in vanilla Octoprint was solved in plugin OctoPrint-Network-Printing
The fix could be to open ports named like :// with serial.serial_for_url() instead of serial.open() in serial_factory_hook.

Anyone would benefit from this improvement?
Low prio for me now - BufferBuddy helped me enough with latency issues.

Jan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant