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

Support for RFC2217 (serial port over network) #113

Open
xdanik opened this issue Jul 8, 2023 · 0 comments
Open

Support for RFC2217 (serial port over network) #113

xdanik opened this issue Jul 8, 2023 · 0 comments

Comments

@xdanik
Copy link

xdanik commented Jul 8, 2023

Hello!
In my specific use case I want to decouple the computer with GSM modem and the computer running python-gsmmodem.
Thus I am using ser2net to share the serial line device over telnet protocol with RFC2217.

But python-gsmmodem uses simple serial.Serial(dsrdtr=True, rtscts=True, port=self.port, ... way to open the serial port and that does not allows usage of RFC2217.
Thus I made a hack and replaced the line with self.serial = serial.Serial( in serial_comms.py with serial.serial_for_url(self.port) and used rfc2217://192.168... as a port.

Everything seems to work still the same as with local serial port.

Would be please possible to add native support for RFC2217?

The serial.serial_for_url( can be used as direct replacement for the serial.Serial( construct as long as it's not necessary to pass any special arguments.
Or at lease move the serial port creation to separate method so it can be easily overridden.

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