Skip to content

Doesn't reconnect when specified serial port is a symlink (Linux) #5

Description

@aerickt

With newer versions of Plover, the default serial ports available are of the form /dev/serial/by-id/... which are symlinked to /dev/ttyACMX.

When the selected port is one of these symlinks (for me I have /dev/serial/by-id/usb-Noll_Electronics_LLC_Nolltronics_Multisteno-if03), the plugin does not detect when the file exists again. plover -l debug continues to output the following message even after the device has been plugged back in:

plover-auto-reconnect-machine: machine can not be reconnected, retrying later

Changing the following line:

if isinstance(self._engine._machine, SerialStenotypeBase) and not self._port_exists(self._engine._machine.serial_params['port']):

to:

if isinstance(self._engine._machine, SerialStenotypeBase) and not exists(self._engine._machine.serial_params['port']):

seems to fix this problem I am having. exists is from os.path.

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