Skip to content

Support for RFC2217 (serial port over network) #113

@xdanik

Description

@xdanik

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions