Categories
Knowledge Base

Connecting to Serial console ports with Macs

Many devices and servers still require connection to them with console cables. Sangoma IPPBX and SBCs for example.
I will cover here how to connect to then with a Mac as they do not have a serial port.

First you will need a USB serial console cable. These can be purchased cheaply from Amazon or ebay.
For example the “KUMEED FTDI RS232 USB to RJ45 Serial for Cisco Console Rollover Cable for Cisco Routers” costs £10.99 inc delivery and works with Windows and Macs

To connect to a console port you need a few bits of information, The port speed, in the case of Sangoma SBCs the is 115200. also you need the device address.

To get teh device address open a terminal window and type:

ls /dev/*usb*

you will be returned something like:

/dev/cu.usbserial-DN01YED6 /dev/tty.usbserial-DN01YED6

so now to connect to the console port you need to enter:

screen /dev/tty.usbserial-DN01YED6  115200

you should now be connected, and can interact as if on a ssh session.

to disconnect is not as simple as just closing the terminal window, as a screen session will still be running. to exit a screen session enter the following key combination.

ctrl a \ 

If you do close a terminal you can see if any sessions are active by opening a new terminal and entering:

screen -list

Something like below will be returned if a session is active.

There is a screen on:

5177.ttys000.Ians-MacBook-2 (Detached)

1 Socket in /var/folders/bl/7k0f_2695njbsqwx762kr_380000gn/T/.screen.

to reconnect type

screen -r

and you should reconnect.

then exit as normal with ctrl a \