Difference between revisions of "How to get Terminal"

[quality revision] [quality revision]
m
 
m
 

Template:ArticleMainWriter Template:ArticleApprovedVersion


2 ways can be used to connect your PC to the board and then to control your board:

  • through serial link (UART / USB)
  • through network connection

1 Remote terminal via serial link (UART/USB)[edit]

First of all, you need to connect your host PC to the board via UART.

Depending on the board, some additional materials may be needed to physically interconnect the board to the console serial port (extension board or adapter to interconnect the UART from the board to the USB PC input).

Pictures describing board connections can be found in Category:ST boards

1.1 On Linux® Template:Sup PC[edit]

On Linux, we recommend to use Minicom.

You need first to check that Minicom is installed on your PC.

  • From a Terminal window on your PC:
PC $> minicom
  • If a message indicating Minicom does not exist, then install it:
PC $> sudo apt-get install minicom
  • To configure Minicom:

The UART configuration that is set with the below command has to match the one from your board: to be checked within board user manual.

PC $> sudo minicom -s

Hardware flow control is generally set to off (default value is on) and a baud rate of 115200 is usual.

  • To launch Minicom:
PC $> minicom -D /dev/tty...

See How to use TTY with User Terminal article to find the appropriate tty instance to be used.

See below example for a standard UART (ttyS0) or STLink interface (ttyACM0):

PC $> minicom -D /dev/ttyS0
PC $> minicom -D /dev/ttyACM0

On the terminal, the prompt is changed to:

root@stm32mp1:~#

More information on Minicom can be found at the following link: https://help.ubuntu.com/community/Minicom.

1.2 On Windows® Template:Sup PC[edit]

Any of the Windows terminal emulator applications can be used. "Tera Term" is one of them: http://tera-term.en.lo4d.com/. Then, the configuration is quite simple:

  • Plug the cable and start the board
  • Open a terminal emulator application on your PC and configure with the serial setup menu the USB port to be used and the baud rate of the serial link (in general 115200 baud)
  • More information on the board serial port can generally be found in the hardware user manual of the board

The setup is correct when you can send Linux commands through the terminal emulator and get feedback. You can for example reboot the board and see the boot sequence.

2 Remote terminal over network[edit]

The board can also be accessed via the network through Ethernet connection, using ssh.

To do so, first get the IP address of the board:

If the network connection is through Ethernet then "InterfaceNetwork" = "Eth0", else if the network connection is using Wifi then "InterfaceNetwork" = "WLAN0"

Board $> ifconfig InterfaceNetwork 
eth0     Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:FB  
         inet addr:xxx.xxx.xxx.xxx <ip address>  Bcast:xxx.xxx.xxx.xxx Mask:xxx.xxx.xxx.xxx
         inet6 addr: fe80::280:e1ff:fe01:14fb/64 Scope:Link

Then, from another terminal on a remote PC connected to the same network, use the command described in How to perform ssh connection.


<noinclude>

{{ArticleMainWriter | NathalieS}}
{{ArticleApprovedVersion | BernardP | NathalieS, Jean-ChristopheT | No previous approved version | BrunoB - 06Nov'18 - 9465 | 06Nov'18}}

[[Category:How to trace and debug]]</noinclude>

2 ways can be used to connect your PC to the board and then to control your board: 
* through serial link (UART / USB)
* through network connection

==Remote terminal via serial link (UART/USB)==
First of all, you need to connect your host PC to the board via UART.

Depending on the board, some additional materials may be needed to physically interconnect the board to the console serial port (extension board or adapter to interconnect the UART from the board to the USB PC input).

Pictures describing board connections can be found in [[:Category:ST boards]]

===On Linux{{sup|&reg;</sup>}} PC===
On Linux, we recommend to use ''Minicom''. 

You need first to check that Minicom is installed on your PC.
*From a Terminal window on your PC:
 {{PC$}} minicom

*If a message indicating Minicom does not exist, then '''install''' it:
 {{PC$}} sudo apt-get install minicom

*To '''configure''' Minicom:
The UART configuration that is set with the below command has to match the one from your board: to be checked within board user manual.
 {{PC$}} sudo minicom -s
Hardware flow control is generally set to off (default value is on) and a baud rate of 115200 is usual.

*To '''launch''' Minicom:
 {{PC$}} minicom -D /dev/tty...

See [[How to use TTY with User Terminal]] article to find the appropriate tty instance to be used.

See below example for a standard UART (ttyS0) or STLink interface (ttyACM0):<span id="Remote Terminal"></span>

 {{PC$}} minicom -D /dev/ttyS0
 {{PC$}} minicom -D /dev/ttyACM0

On the terminal, the prompt is changed to:
 root@stm32mp1:~#

More information on Minicom can be found at the following link: https://help.ubuntu.com/community/Minicom.

===On Windows{{sup|&reg;</sup>}} PC ===
Any of the Windows terminal emulator applications can be used. "Tera Term" is one of them: http://tera-term.en.lo4d.com/.
Then, the configuration is quite simple:
* Plug the cable and start the board
* Open a terminal emulator application on your PC and configure with the serial setup menu the USB port to be used and the baud rate of the serial link (in general 115200 baud)
* More information on the board serial port can generally be found in the hardware user manual '''of the board'''

The setup is correct when you can send Linux commands through the terminal emulator and get feedback. You can for example reboot the board and see the boot sequence.

==Remote terminal over network==
The board can also be accessed via the network through Ethernet connection, using ssh.

To do so, first '''get the IP address''' of the board:
* if it exists, using the board user interface (Terminal window or specific application)
* using a console (see chapter [[#Remote terminal via serial link (UART/USB)|Remote terminal via Serial link (UART/USB]])

If the network connection is through Ethernet then "InterfaceNetwork" = "Eth0", else if the network connection is using Wifi then "InterfaceNetwork" = "WLAN0"
 {{Board$}} ifconfig InterfaceNetwork 
 eth0     Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:FB  
          inet addr:{{highlight|xxx.xxx.xxx.xxx <ip address>}}  Bcast:xxx.xxx.xxx.xxx Mask:xxx.xxx.xxx.xxx
          inet6 addr: fe80::280:e1ff:fe01:14fb/64 Scope:Link

Then, from another terminal on a remote PC connected to the same network, use the command described in [[How to perform ssh connection]].

<noinclude>

{{PublicationRequestId | 9465 | 2018-11-06 | BrunoB}}
[[Category:How to trace and debug]]</noinclude>
Line 1: Line 1:
<noinclude>
 
{{ArticleMainWriter | NathalieS}}
 
{{ArticleApprovedVersion | BernardP | NathalieS, Jean-ChristopheT | No previous approved version | BrunoB - 06Nov'18 - 9465 | 06Nov'18}}
 
 
[[Category:How to trace and debug]]
 
</noinclude>
 
   
 
2 ways can be used to connect your PC to the board and then to control your board:  
 
2 ways can be used to connect your PC to the board and then to control your board:  
Line 17: Line 11:
 
Pictures describing board connections can be found in [[:Category:ST boards]]
 
Pictures describing board connections can be found in [[:Category:ST boards]]
   
===On Linux{{sup|&reg;}} PC===
+
===On Linux<sup>&reg;</sup> PC===
 
On Linux, we recommend to use ''Minicom''.  
 
On Linux, we recommend to use ''Minicom''.  
   
Line 47: Line 41:
 
More information on Minicom can be found at the following link: https://help.ubuntu.com/community/Minicom.
 
More information on Minicom can be found at the following link: https://help.ubuntu.com/community/Minicom.
   
===On Windows{{sup|&reg;}} PC ===
+
===On Windows<sup>&reg;</sup> PC ===
 
Any of the Windows terminal emulator applications can be used. "Tera Term" is one of them: http://tera-term.en.lo4d.com/.
 
Any of the Windows terminal emulator applications can be used. "Tera Term" is one of them: http://tera-term.en.lo4d.com/.
 
Then, the configuration is quite simple:
 
Then, the configuration is quite simple:
Line 70: Line 64:
   
 
Then, from another terminal on a remote PC connected to the same network, use the command described in [[How to perform ssh connection]].
 
Then, from another terminal on a remote PC connected to the same network, use the command described in [[How to perform ssh connection]].
  +
  +
<noinclude>
  +
{{PublicationRequestId | 9465 | 2018-11-06 | BrunoB}}
  +
[[Category:How to trace and debug]]
  +
</noinclude>