How to connect Matlab to a virtual serial port on the Mac?
7 views (last 30 days)
Show older comments
I've set up a pair of virtual serial ports with which I am able to communicate via the Mac terminal, using 'screen /dev/master 9600' and 'screen /dev/slave 9600'. Unfortunately, I am completely unable to communicate with them using Matlab.
..I tried this:
serialport = serial('master');
set(serialport,'BaudRate',9600);
fopen(serialport);
fprintf(serialport,[1]);
.. and I get this:
Error using serial/fopen (line 72)
Open failed: Port: master is not available. Available ports:
/dev/tty.Bluetooth-Incoming-Port, /dev/cu.Bluetooth-Incoming-Port,
/dev/tty.Bluetooth-Modem, /dev/cu.Bluetooth-Modem.
Use INSTRFIND to determine if other instrument objects are connected to the
requested device.
.. please help..
0 Comments
Answers (1)
Walter Roberson
on 11 Feb 2014
It appears that on OS-X, /dev/tty.* is expected and in particular for USB, possibly only /dev/tty.usbserial-* . The newsreader thread might be useful in configuring.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!