Set up a Serial port for the Terminal program to talk to. NOTE: I had to setup two serial ports. I set up Mac called “SerialPort”. This serial port took a long time to connect and then disconnected as soon as it connected. So I setup another Serial port, which Mac called “SerialPort-3”. Open terminal and type: ls /dev/tty. Note the port number listed for /dev/ttyUSB. or /dev/ttyACM. The port number is represented with. here. Use the listed port as the serial port in MATLAB ®.
Geek Inc.
If you develop on an Apple and find yourself doing any sort of device or embedded development, you will quickly find the need for a serial terminal on Mac. There are a few software apps out there, but I find it much simpler to simply use the terminal application “screen”. This works well particularly if you have an RS-232 serial to USB converter. The first thing to do is determine which device you want to connect to.
Once you’ve determined which device you would like to use, you can execute the SCREEN command to start the serial terminal session on your Mac. Remember to specify the speed (baud rate) after the device name.
Once you’ve connected, you can use the terminal as you normally would. To exit (and close the screen gracefully) press:
Screen will then prompt you to quit and kill all of your windows. Press “y” and you’ll be back to your shell terminal. This method works equally well if you want to connect to a serial bluetooth device. You must simply make sure that the bluetooth device is paired and active. Then you will be able to see the device in the list of devices. Once you’ve connected to the serial bluetooth device with screen, the connection will be held active for the length of your session. I’ve used this method to connect to the sparkfun Bluetooth Mate Gold. It simply appears as a serial stream that you can communicate with exactly as you would with any other serial device.
Information about these and other types of Mac ports is in the specifications for your Mac: Choose Apple menu > About This Mac, click Support, then click Specifications. Or check your Mac user guide.
Thunderbolt 3
Use Thunderbolt 3 with displays and other devices that connect using either a Thunderbolt 3 cable or USB-C cable. You can also connect a USB-C power adaptor and cable to charge your notebook computer. If you have a device that doesn't connect to this port, you might be able to use an adaptor to connect it.
These Mac models have Thunderbolt 3 ports:
MacBook Pro introduced in 2016 or later
MacBook Air introduced in 2018or later
iMac introduced in 2017 or later
iMac Pro (all models)
Mac mini introduced in 2018
Mac Pro introduced in 2019
If your Mac notebook or desktop computer has more than one port like this, each port supports ThunderBolt 3 and USB-C.
USB-C
Use USB-C with displays and other devices that connect using a USB-C cable. You can also connect a USB-C power adaptor and cable to charge your notebook computer. If you have a device that doesn't connect to this port, you might be able to use an adaptor to connect it.
MacBook models introduced in 2015 or later have a single USB-C port. This port doesn't support Thunderbolt devices.
If your Mac has only one port like this, it's a MacBook that supports USB-C but not Thunderbolt.
Thunderbolt
Use Thunderbolt or Thunderbolt 2 with displays and other devices that connect using a Thunderbolt cable.
These Mac models have Thunderbolt or Thunderbolt 2 ports:
MacBook Pro introduced in 2011 until 2015
MacBook Air introduced in 2011 until 2017
Mac mini introduced in 2011 until 2014
iMac introduced in 2011 until 2015
Mac Pro introduced in 2013
Thunderbolt and Thunderbolt 2 are not the same as Mini DisplayPort . They have the same shape, but use different symbols on the cable and port. However, this port does support Mini DisplayPort for video output, so you can use a Mini DisplayPort cable to connect a Mini DisplayPort display.
Mini DisplayPort
Use Mini DisplayPort with displays that connect using a Mini DisplayPort cable.
These Mac models have Mini DisplayPort:
MacBook Pro introduced in late 2008 until 2010
MacBook Air introduced in late 2008 until 2010
Mac mini introduced in 2009 and 2010
iMac introduced in 2009 and 2010
Mac Pro introduced in 2009 until 2012
Mini DisplayPort is not the same as Thunderbolt or Thunderbolt 2 . They have the same shape, but use different symbols on the cable and port.
USB-A
Windows Serial Terminal
Use USB-A with devices that connect using a USB cable. USB ports are sometimes known by the USB specification of the port, such as USB 2 or USB 3.
Left to right: power, two Thunderbolt, USB-A, and Audio-Out.
HDMI
Mac Os Serial Terminal
Use HDMI with displays and TVs that connect using an HDMI cable.
Ethernet
Use Ethernet with networks and devices that connect using an Ethernet (RJ45) cable.
FireWire
Use FireWire with devices that connect using a FireWire 400 or FireWire 800 cable.
SD card
Use the SD card slot with SD, SDHC, SDXC, MMC and UHS-II media cards, such as those used by digital cameras.
Serial Port Terminal With Macros
Audio
Use Audio-Out — or — with headphones, speakers and other audio-output devices that connect using an audio cable that has a 3.5 mm (1/8 inch) audio jack.
Use Audio-In with a microphone or other audio-input device that connects using an audio cable that has a 3.5 mm (1/8 inch) audio jack.
Power
Use the power port , if available, to connect your computer to AC power using a MagSafe cable or adaptor. This port isn't available on newer Mac notebook computers, which use Thunderbolt 3 or USB-C for power and charging. Learn more about power adaptors and cables for Mac notebook computers.