Personal tools

How to connect to Debian 9.2 console of VisionSOM-6ULL on Windows (UART/USB and SSH)

From SomLabs Wiki

Jump to: navigation, search

How to connect to Debian 9.2 console of VisionSOM-6ULL on Windows (UART/USB and SSH)



Sl wiki new version 600x180.jpg


Prerequisites

  • PC with Windows operating system and USB port (for USB-UART converter connection) or local network connection (for SSH connection)
  • VisionCB-STD board with VisionSOM-6ULL and micro-SD card with Debian 9.2 image installed (Debian 9.2 SD card installation manual for Windows and Linux are available)
  • Micro-USB cable
  • PuTTY terminal

Connecting to Debian console through UART-USB converter

VisionCB-STD has built-in UART-USB converter, it lets you connect to Debian console via virtual COM port. First of all you need to determine what is the VisionCB-STD virtual COM number on your Windows system, to do that open Control Panel, connect VisionCB-STD to your computer, find Ports (COM & LPT) and expand it. You should see USB Serial Port (COM<port_number>), if there is only one item with this name then it is your port, if there are more ports then disconnect and reconnect VisionCB-STD to check which port shows up. Now we can connect with PuTTY to your VisionSOM-6ULL, connect VisionCB-STD to your PC, run PuTTY and:

  • Select Serial in Connection type section
  • Enter VisionCB-STD port number in Serial line field
  • Enter 115200 in Speed field
  • Click Open
How to connect to VisionSOM-6ULL serial console

If you do it quickly enough then you should see Debian startup messages and login prompt:

[  OK  ] Started Raise network interfaces.
[  OK  ] Reached target Network.
         Starting OpenBSD Secure Shell server...
         Starting Permit User Sessions...
[  OK  ] Started Permit User Sessions.
[  OK  ] Started Serial Getty on ttymxc0.
[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started OpenBSD Secure Shell server.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.

Debian GNU/Linux 9 somlabs ttymxc0

somlabs login:

Default login is root, password is blank (do NOT enter blank, just press Enter). Now you are logged in. It is strongly recommended to change root password, to do that enter passwd command, you will be prompted to enter password twice:

root@somlabs:~# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@somlabs:~#

Connecting to Debian console via SSH client

Connecting as root - not recommended

By default Debian root user has blank password, you have to change it before connecting via SSH. Please refer Connecting to Debian console through UART-USB converter section on how to change root password. Once you have changed root password (still via UART-USB connection) you need to modify /etc/ssh/sshd_config file:

nano /etc/ssh/sshd_config

Add line:

PermitRootLogin yes

Restart SSH service:

service sshd restart

Now you can log in as root via SSH, you only need ip address of VisionSOM-6ULL Ethernet (eth0) interface, to get it enter ip a:

root@somlabs:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether a6:e3:1c:a0:3d:b0 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.25/24 brd 192.168.0.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 2a02:a310:813c:d700:a4e3:1cff:fea0:3db0/64 scope global mngtmpaddr dynamic
       valid_lft 974055sec preferred_lft 369255sec
    inet6 fe80::a4e3:1cff:fea0:3db0/64 scope link
       valid_lft forever preferred_lft forever
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default
    link/sit 0.0.0.0 brd 0.0.0.0

In this case Ethernet the interface IP is 192.168.0.25, now you can connect to VisionSOM-6ULL with SSH client:

  • Start PuTTY
  • Enter VisionSOM-6ULL IP address in Host Name field
  • Click Open button
PuTTY connection window

Connecting as regular user

To connect as a regular user you need to create new account. Login as root through USB-UART converter or SSH, then add new account and set password:

root@somlabs:~# useradd tom
root@somlabs:~# passwd tom
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@somlabs:~#

By default new user has no home directory and his shell is /bin/sh. To create home directory enter:

root@somlabs:~# mkdir /home/tom

To change shell to bash enter:

root@somlabs:~# chsh -s /bin/bash tom


Now you can log in as tom with SSH client.

NXP Partner ST Partner