Expose socket-based serial port emulation to host

Discussion in 'Parallels Desktop for Mac Feature Suggestions' started by firewing1, Feb 8, 2021.

  1. firewing1

    firewing1 Bit poster

    Messages:
    5
    Hello,

    Presently with Parallels 16 for Mac, I can setup a socket-based serial port emulation which requires two VMs (a server and a client). If the client VM starts before the server, an error message about the socket being disconnected appears.

    When the server starts, a socket is created under /private/var/folders/<random-two-chars>/<random-chars>/T/port-name which I presume is where it sends its serial data to.

    This feature request has two parts to improve the serial emulation UX:
    1) Permit the socket client VM to be started first, and creating the socket under /private/var/folders. A sender should still be able to attach to it later.
    2) Expose the socket location in the UI to enable the MacOS host to write to it - that way I don't require a whole VM just to send to the socket!

    Right now, there's no I found way to create that socket without starting the socket server VM which is a bit redundant. I want to save resources and write to that socket directly from the MacOS host.
     
  2. joevt

    joevt Forum Maven

    Messages:
    1,229
    You can specify an absolute path for the socket name so you can more easily find it, like this:
    /Users/joevt/lionserial

    Then you can use the socket in the host OS however you like, such as using the socat command in Terminal.app which can access the socket directly or you can use socat to create a pseudo terminal.

    Maybe Parallels should have an option to create a serial port on the Mac with an IOSerialBSDClient with IOCalloutDevice and IODialInDevice since some terminal apps don't know how to connect to a unix domain socket or a pseudo terminal.
     

Share This Page