Talking to your GRiSP board

Connecting over Serial Port

Updated 3 February 2018
e GRiSP board exposes two serial interfaces over its USB port. The first is for debugging and flashing the bootloader. The second is where you will have bootmessages and finally a functional Erlang shell.

Finding the USB TTY Device#

Linux#

On most distributions the device we want to connect is /dev/ttyUSB1. You can verify where the two FTDI USB Serial USB Device converters ended up by running dmesg after connecting your GRiSP board.

macOS#

On macOS you can list the USB serial devices like this:

$ ls /dev/*usb*
/dev/cu.usbserial-001030  /dev/tty.usbserial-001030
/dev/cu.usbserial-001031  /dev/tty.usbserial-001031

We want the TTY devices, and specifically the second one (the first is the debugging interface). In this example the serial number of the GRiSP board is 0103, and the device we want is /dev/tty.usbserial-001031.

Connecting#

To connect we use screen:

$ screen <device> 115200

Where <device> is the full path to the device discovered above and 115200 is the baud rate we need to use.

While screen is quite handy because it literally runs everywhere a nice commercial alternative on Mac OSX is Serial.app

Linux#

Some distributions require you to run screen with sudo. Some distributions require users to be in the dialaut system group.

Notes#

There is still a bug which prevents typed text from appearing in the Erlang shell until you press enter. At the moment you will have to work "blind" when tying characters or connect over the network. Having a Editor buffer ready from where Erlang command-lines can be cut&pasted is also handy.

Also Serial.app has a Echo typed characters option in its Terminal Settings (Terminal -> Settings... -> Terminal Settings) which helps a lot unless the bug is fixed. We are moving towards the termios driver from FreeBSD instead of the RTEMS built in one which will have no such issue.