Basically, from macOS Terminal, I can connect via the serial port like this:
ls -l /dev/tty.*
get the name of the device and then:
screen /dev/tty.usbmodem11104 115200
and I need to enter username/password, and once I am connected and can type commands like ls, ps, etc
to quit: Ctrl+A + Ctrl+\
I want to achieve this from Mathematica, so I have tried:
Wolfram Language 13.0.1 Engine for Mac OS X ARM (64-bit)
Copyright 1988-2022 Wolfram Research, Inc.
In[1]:= port = "/dev/tty.usbmodem11104"
Out[1]= /dev/tty.usbmodem11104
In[2]:= dev = DeviceOpen["Serial", {port, "BaudRate" -> 256000}]
Out[2]= DeviceObject[{Serial, 1}]
In[3]:= DeviceWrite[dev, "ps"]
Out[3]= ps
In[4]:= DeviceReadBuffer[dev]
Out[4]= {112, 115}
In[5]:= DeviceClose[dev]
But it doesn't work, also I am a newbie, so I must have written the above wrong. Also, I need to somehow enter username/password.