Difference between revisions of "Using minicom to connect to Elphel393 camera"

From ElphelWiki
Jump to: navigation, search
(Created page with "Elphel393 series cameras have built-in USB to serial converter which allows users to get access to serial console. You need microUSB-USB cable to connect a camera to your PC and ...")
 
Line 43: Line 43:
 
  ~$ sudo minicom -s
 
  ~$ sudo minicom -s
  
Go to 'Serial port setup',  change 'Serial Device' to /dev/ttyUSB0 and save configuration. Now you can start minicom
+
Go to 'Serial port setup',  change 'Serial Device'(A) to /dev/ttyUSB0, turn off 'Hardware Flow Control'(F), leave default 'Bps/Par/Bits' (E) at 115200 8N1  and 'Save setup as dfl' in the higher menu. Now you can start minicom
  
 
  ~$ minicom -c on
 
  ~$ minicom -c on
  
 
and it will connect to a camera.
 
and it will connect to a camera.

Revision as of 22:52, 30 January 2021

Elphel393 series cameras have built-in USB to serial converter which allows users to get access to serial console. You need microUSB-USB cable to connect a camera to your PC and a terminal software installed on the PC. We use minicom on Kubuntu for this purpose so this short note will describe how to connect to a camera using minicom.

First, you need to install minicom on the PC if have not done it before. Open a terminal on your PC and use the following command on Debian based systems like Ubuntu or Kubuntu:

~$sudo apt-get install minicom

or do the same with your preferred package manager. minicom connects to a camera via /dev/ttyUSB0 device which is in dialout group by default:

~$ ls -l /dev/ttyUSB0 
crw-rw---- 1 root dialout 188, 0 May 14 14:26 /dev/ttyUSB0

You should add your user to dialout group to make it easier to connect to camera without root permissions:

~$ sudo adduser elphel dialout
[sudo] password for elphel: 
Adding user `elphel' to group `dialout' ...
Adding user elphel to group dialout
Done.

Now user elphel is in group dialout,

$ cat /etc/group | grep dialout
dialout:x:20:elphel

but new settings have not been applyed yet:

~$ groups
elphel adm sudo lpadmin sambashare libvirtd

You need to logout from the system and login again. Now your user is added to the group and new settings are applied:

~$ groups
elphel adm dialout sudo lpadmin sambashare libvirtd

The last step is minicom configuration. minicom tries to connect to a device which is specified in its configuration file /etc/minicom/minrc.dfl and this device is not what we are trying to connect to. If you start minicom with its default config file you will get an error:

~$ minicom -c on
minicom: cannot open /dev/tty8: Permission denied

It should be started in setup mode with root permissions:

~$ sudo minicom -s

Go to 'Serial port setup', change 'Serial Device'(A) to /dev/ttyUSB0, turn off 'Hardware Flow Control'(F), leave default 'Bps/Par/Bits' (E) at 115200 8N1 and 'Save setup as dfl' in the higher menu. Now you can start minicom

~$ minicom -c on

and it will connect to a camera.