This page will walk you through installing necessary serial connection software for Linux. FTDI drivers needed for Windows come preinstalled with your Linux system.
Prerequisites
Obtaining C-Kermit can be done via package manager and how to install it varies across Linux distribution so make sure to check out your distribution documentation. For example, on some distributions (e.g. Ubuntu), the program is called Kermit while on others (e.g. Arch Linux) it is called C-Kermit.
or
Minicom
Obtaining Minicom also differs across Linux distributions so check your distribution documentation. You will likely be able to obtain it using your distribution's package manager.
Connecting with C-Kermit
C-Kermit allows us serial communication with the ESPRESSObin board. Once your board is connected to your laptop via micro USB cable, you can run C-Kermit along with a number of parameters which need to be set correctly. In such cases it is convenient to make a script which contains the set of afore-mentioned commands. The following configuration works for the ESPRESSObin:
set line /dev/ttyUSB0 set speed 115200 set carrier-watch off set flow-control none set handshake none set prefixing all set streaming off set parity none connect
so we can go ahead and save this configuration in a file we will here name kermit-usb0.
Since USB might be enumerated differently on each plug-in, you can use dmesg command after you have plugged in the USB cable to find out to which USB the serial converter has connected to. Example output:
~$dmesg ... [93917.671274] usb 2-2: new full-speed USB device number 21 using xhci_hcd [93917.799740] usb 2-2: New USB device found, idVendor=067b, idProduct=2303 [93917.799744] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [93917.799746] usb 2-2: Product: USB-Serial Controller D [93917.799748] usb 2-2: Manufacturer: Prolific Technology Inc. [93917.800564] pl2303 2-2:1.0: pl2303 converter detected [93917.801259] usb 2-2: pl2303 converter now attached to ttyUSB0
Here we can see that the serial converter connected to USB0 (ttyUSB0). Make sure that the USB you have in your C-Kermit script we have mentioned above:
set line /dev/ttyUSB0
matches the USB number you receive from dmesg output on a given plug-in. Alternatively, you can create multiple C-Kermit configuration scripts with different set line values and then you can, depending on the USB number, run the configuration with the corresponding number using C-Kermit.
Now we can run C-Kermit using our configuration script:
~$ sudo kermit kermit-usb0 [Enter your sudo password] Connecting to /dev/ttyUSB0, speed 115200 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ----------------------------------------------------
and your ESPRESSObin board should begin booting. You can now return to following the Quick User Guide tutorial.
Connecting with Minicom
Minicom allows us, similarly to C-Kermit, to achieve serial communication with the ESPRESSObin board. Once your board is connected to your laptop via micro USB cable, we can run the minicom setup (e.g. on Ubuntu):
$ sudo minicom -s
we will now be presented with the following menu:
+-----------------------------------------------------------------------+ +-----[configuration]------+ | Filenames and paths | | File transfer protocols | | Serial port setup | | Modem and dialing | | Save setup as dfl | | Save setup as.. | | Exit | | Exit from Minicom | +--------------------------+
through which you can navigate using up/down keys. For our case, we will only need to setup Serial port setup so select that submenu. You will get the following menu:
+-----------------------------------------------------------------------+ | A - Serial Device : /dev/tty8 | | B - Lockfile Location : /var/lock | | C - Callin Program : | | D - Callout Program : | | E - Bps/Par/Bits : 115200 8N1 | | F - Hardware Flow Control : Yes | | G - Software Flow Control : No | | | | Change which setting? | +-----------------------------------------------------------------------+
For option A - Serial Device we must first find out the correct USB to which our serial has connected to after we have plugged in the micro USB cable. As for C-Kermit, we can do this using dmesg:
~$dmesg ... [93917.671274] usb 2-2: new full-speed USB device number 21 using xhci_hcd [93917.799740] usb 2-2: New USB device found, idVendor=067b, idProduct=2303 [93917.799744] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [93917.799746] usb 2-2: Product: USB-Serial Controller D [93917.799748] usb 2-2: Manufacturer: Prolific Technology Inc. [93917.800564] pl2303 2-2:1.0: pl2303 converter detected [93917.801259] usb 2-2: pl2303 converter now attached to ttyUSB0
Here we can see that the serial converter connected to USB0 (ttyUSB0) USB number, so we change the A - Serial Device setting to /dev/ttyUSB0. Assuming your Bps/Par/Bits are set as 115200 8N1, the only thing left to change is set F - Hardware Flow Control to "No". As with C-Kermit, be wary of the fact that the USB number might change on each plug-in, so make sure to set it up accordingly.
Now we can begin connecting by selecting Exit and pressing Enter. Optionally, you can save these settings as default for future use by selecting Save setup as dfl. Similarly to multiple C-Kermit configuration files, you can create several dfl configurations with different USB numbers to speed up the process.
When we exited the menu, the minicom terminal will open with our settings. Now when we power on the board we should see it booting:
Welcome to minicom 2.7.1 OPTIONS: I18n Compiled on Apr 20 2017, 07:07:53. Port /dev/ttyUSB0, 12:56:48 Press CTRL-A Z for help on special keys root@localhost:~$