Using a command like
socat -d -d pty,raw,echo=0 pty,raw,echo=0 creates a pair of virtual, linked, serial ports. However, these ports don’t seem to be compatible with Xojo’s Serial API. SerialDevice.Count doesn’t include the virtual ports in the number it returns. And trying to access these ports using SerialDevice.WithName returns an ‘Error 25’, which translates to 'Inappropriate ioctl for device’.
screen from the command line connects to these ports just fine.
Does anyone know why that is. Is it a shortcoming in Xojo?
Deleted previous reply since I initially didn’t see you were on MacOS.
For what it’s worth, it looks like Necat (man nc) is installed with base MacOS install.
If it’s got the features you need, it might behave better/have fewer issues than with socat?
I didn’t think netcat can create virtual serial ports, can it? Do you know of an example you can point me towards? My search came up empty.
Roger - Did you find any solution? I’m in the same boat trying with virtual serial ports but SerialDevice only seems to show the /dev/cu.* devices and the ones I create with socat are obviously ttyS…
No, I haven’t found a solution yet, unfortunately.