Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Rockpi4/dev/serial-console/es es"

(Created page with "{{rockpi4_header_es}} {{Languages|rockpi4/dev/serial-console}} ROCK Pi 4 > Desarrollando > rockpi4/dev/serial-console/es_es |...")
 
Line 7: Line 7:
 
== Requisitos ==
 
== Requisitos ==
  
* ROCK Pi 4
+
* Placa ROCK Pi 4
* USB Type-C power adapter and USB Type-C charging data cable
+
* Transformador ROCK Pi 4 y cable de carga USB Tipo C
* Host PC with Windows or Linux
+
* Ordenador con Windows o Linux
* USB to TTL serial cable
+
* Cable serie USB a TTL
** The definition of each pin of USB to TTL cable is showing like this:
+
** El significado de cada pin del cable USB a TTL se muestra a continuación:
  
 
[[File:usb2ttl-cable-definition.jpeg | 500px ]]
 
[[File:usb2ttl-cable-definition.jpeg | 500px ]]
  
=== Note ===
+
=== Nota ===
  
 
* The default baudrate of ROCK Pi 4 is 1500000(1.5Mbps), please check if your USB to TTL cable support 1.5Mbps baudrate. Some model of [https://www.silabs.com/products/interface/usb-bridges CP210X] and [http://www.prolific.com.tw/US/ShowProduct.aspx?pcid=41 PL2303x]  have baudrate limitation, please check the specified model. We also tested that some cheap PL2303x based cable does not work well. Make sure choose a high quality one. The instructions below use a [http://www.ftdichip.com/Products/ICs/FT232R.htm FT232RL] based cable.
 
* The default baudrate of ROCK Pi 4 is 1500000(1.5Mbps), please check if your USB to TTL cable support 1.5Mbps baudrate. Some model of [https://www.silabs.com/products/interface/usb-bridges CP210X] and [http://www.prolific.com.tw/US/ShowProduct.aspx?pcid=41 PL2303x]  have baudrate limitation, please check the specified model. We also tested that some cheap PL2303x based cable does not work well. Make sure choose a high quality one. The instructions below use a [http://www.ftdichip.com/Products/ICs/FT232R.htm FT232RL] based cable.
Line 21: Line 21:
 
* It seems that the serial tool on macOS platform can not support custom baudrate such as 1.5Mbps due to driver restriction. If you know how to set custom baudrate on macOS, please add an item here to show your findings.
 
* It seems that the serial tool on macOS platform can not support custom baudrate such as 1.5Mbps due to driver restriction. If you know how to set custom baudrate on macOS, please add an item here to show your findings.
  
== Connection ==
+
== Conexión ==
  
Connect the USB to TTL serial cable as below. '''Don't connect the red wire.'''
+
Conecta el cable serie USB a TTL así. '''No conectes el cable rojo.'''
  
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! ROCK Pi 4 || <---> || USB to TTL cable
+
! ROCK Pi 4 || <---> || cable USB a TTL
 
|-
 
|-
| RX(pin 10) || <---> || Green wire
+
| RX(pin 10) || <---> || cable Verde
 
|-
 
|-
| TX(pin 8) || <---> || White wire
+
| TX(pin 8) || <---> || cable Blanco
 
|-
 
|-
| GND(pin 6) || <---> || Black wire
+
| GND(pin 6) || <---> || cable Negro
 
|}
 
|}
  
 
[[File:serial-connection.jpeg | 500px ]]
 
[[File:serial-connection.jpeg | 500px ]]
  
== Serial setting on host PC ==
+
== Configuración Serie del Ordenador ==
  
The default serial setting for ROCK Pi 4 u-boot and kernel console is:
+
La configuración por defecto para el u-boot y la consola del núcleo en ROCK Pi 4 es:
  
     baudrate: 1500000
+
     ratio de baudios: 1500000
     data bit: 8
+
     bits de datos: 8
     stop bit: 1
+
     bits de parada: 1
     parity : none
+
     paridad : ninguna
     flow control: none
+
     control de flujo: ninguno
  
 
=== Linux ===
 
=== Linux ===
  
Minicom is the serial tool that supports wide range baud rate.
+
Minicom es una herramienta en serie que soporta un amplio rango de ajustes de transmisión.
  
Install minicom:
+
Instalar minicom:
  
 
     sudo apt-get update
 
     sudo apt-get update
 
     sudo apt-get install minicom
 
     sudo apt-get install minicom
  
Plug in the USB to TTL cable, kernel `dmesg | tail` should show the following device:
+
Conecta el cable USB a TTL, kernel `dmesg | tail` debería mostrar el siguiente dispositivo:
  
 
     [1036835.654076] usb 1-6.4.3: new full-speed USB device number 103 using xhci_hcd
 
     [1036835.654076] usb 1-6.4.3: new full-speed USB device number 103 using xhci_hcd
Line 68: Line 68:
 
     [1036835.757195] usb 1-6.4.3: FTDI USB Serial Device converter now attached to ttyUSB0
 
     [1036835.757195] usb 1-6.4.3: FTDI USB Serial Device converter now attached to ttyUSB0
  
'''/dev/ttyUSB0''' is our device here.
+
'''/dev/ttyUSB0''' es nuestro dispositivo.
  
==== Setup minicom====
+
==== Configurar minicom====
  
 
First add current user to plugdev group to use minicom without sudo or root.
 
First add current user to plugdev group to use minicom without sudo or root.

Revision as of 07:48, 23 December 2018

    ROCK Pi 4 >  Desarrollando >  Consola Serie

ROCK Pi 4 incluye una consola serie, que puede acceder a mensajes de depuración de bajo nivel.

Requisitos

  • Placa ROCK Pi 4
  • Transformador ROCK Pi 4 y cable de carga USB Tipo C
  • Ordenador con Windows o Linux
  • Cable serie USB a TTL
    • El significado de cada pin del cable USB a TTL se muestra a continuación:

Usb2ttl-cable-definition.jpeg

Nota

  • The default baudrate of ROCK Pi 4 is 1500000(1.5Mbps), please check if your USB to TTL cable support 1.5Mbps baudrate. Some model of CP210X and PL2303x have baudrate limitation, please check the specified model. We also tested that some cheap PL2303x based cable does not work well. Make sure choose a high quality one. The instructions below use a FT232RL based cable.
  • It seems that the serial tool on macOS platform can not support custom baudrate such as 1.5Mbps due to driver restriction. If you know how to set custom baudrate on macOS, please add an item here to show your findings.

Conexión

Conecta el cable serie USB a TTL así. No conectes el cable rojo.

ROCK Pi 4 <---> cable USB a TTL
RX(pin 10) <---> cable Verde
TX(pin 8) <---> cable Blanco
GND(pin 6) <---> cable Negro

Serial-connection.jpeg

Configuración Serie del Ordenador

La configuración por defecto para el u-boot y la consola del núcleo en ROCK Pi 4 es:

   ratio de baudios: 1500000
   bits de datos: 8
   bits de parada: 1
   paridad  : ninguna
   control de flujo: ninguno

Linux

Minicom es una herramienta en serie que soporta un amplio rango de ajustes de transmisión.

Instalar minicom:

   sudo apt-get update
   sudo apt-get install minicom

Conecta el cable USB a TTL, kernel `dmesg | tail` debería mostrar el siguiente dispositivo:

   [1036835.654076] usb 1-6.4.3: new full-speed USB device number 103 using xhci_hcd
   [1036835.755730] usb 1-6.4.3: New USB device found, idVendor=0403, idProduct=6001
   [1036835.755732] usb 1-6.4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
   [1036835.755733] usb 1-6.4.3: Product: USB <-> Serial
   [1036835.755734] usb 1-6.4.3: Manufacturer: FTDI
   [1036835.756728] ftdi_sio 1-6.4.3:1.0: FTDI USB Serial Device converter detected
   [1036835.756750] usb 1-6.4.3: Detected FT232BM
   [1036835.757195] usb 1-6.4.3: FTDI USB Serial Device converter now attached to ttyUSB0

/dev/ttyUSB0 es nuestro dispositivo.

Configurar minicom

First add current user to plugdev group to use minicom without sudo or root.

   sudo usermod -a -G plugdev $USER

Edit your ~/.bashrc and add the following line with some default parameter

   alias minicom='minicom -w -t xterm -l -R UTF-8'

Login to a new terminal to take effect.

Create and edit file ~/.minirc.rockpi4, add the following content:

   pu port             /dev/ttyUSB0
   pu baudrate         1500000
   pu bits             8
   pu parity           N
   pu stopbits         1
   pu rtscts           No

Now run minicom rockpi4 to use the config above and connects to the ROCK Pi 4 serial console.

Windows

Putty is also great serial tool that supports wide range baud rate.

Plug in the USB to TTL cable to you windows PC. Viewing the device manager you can find the COM number. Here it is COM3.

Launch the application Putty on your windows PC. And do the setting as follows:

For category Session, set serial line as COM3, speed ad 1500000, connection type as Serial.

Write rockpi4 in the Saved Sessions column and press Save.

Putty-setting-session.jpg

For category Connection---Serial, do the setting:

Putty-setting-serial.jpg

Once finish the setting, press Open button to start.

Troubleshooting