raspberry
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| raspberry [2020/10/20 19:23] – created jose | raspberry [2022/01/29 15:54] (current) – [IP fija] jose | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Instalar ====== | ||
| + | Nos descargamos el software de: | ||
| + | |||
| + | https:// | ||
| + | |||
| + | Suele ser un zip, extraemos el img y lo pasamos a una sd: | ||
| + | dd if=2021-01-11-raspios-buster-armhf-lite.img of=/ | ||
| + | |||
| + | Nos ha creado dos particiones: | ||
| + | - boot\\ | ||
| + | - rootfs | ||
| + | |||
| + | Ahora para poder conectarnos sin monitor ni teclado | ||
| + | |||
| + | ===== Habilitar wifi ===== | ||
| + | En la pertición boot creamos el fichero wpa_supplicant.conf con los datos de nuestro wifi | ||
| + | boot/ | ||
| + | |||
| + | < | ||
| + | country=ES | ||
| + | ctrl_interface=DIR=/ | ||
| + | update_config=1 | ||
| + | |||
| + | network={ | ||
| + | scan_ssid=1 | ||
| + | ssid="< | ||
| + | psk="< | ||
| + | key_mgmt=WPA-PSK | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== IP por DHCP ===== | ||
| + | Si no queremos fija, se coneta por DHCP. Si hemos habilitado wifi por wifi o sinó por cable. Para mirar que ip tiene podemos hacer un nmap: | ||
| + | nmap -sP 192.168.1.0/ | ||
| + | |||
| + | < | ||
| + | Nmap scan report for 192.168.1.191 | ||
| + | Host is up (0.13s latency). | ||
| + | MAC Address: DC: | ||
| + | </ | ||
| + | |||
| + | ===== IP fija ===== | ||
| + | En la partición rootfs editamos el fichero: | ||
| + | rootfs/ | ||
| + | Depende si queremos editar wifi o cable ponemos eth0 o wlan0. Por ejemplo, poner por wifi la ip 192.168.1.191 | ||
| + | < | ||
| + | interface wlan0 | ||
| + | static ip_address=192.168.1.191/ | ||
| + | static routers=192.168.1.1 | ||
| + | static domain_name_servers=192.168.1.1 | ||
| + | </ | ||
| + | |||
| + | Si queremos añadir una ruta: | ||
| + | / | ||
| + | |||
| + | ip route add 10.0.0.0/8 via 10.38.28.6 | ||
| + | |||
| + | ===== Habilitar SSH ===== | ||
| + | Creamos un fichero que se llame ssh en la partición boot. Da igual que esté vacio. Podemos hacer: | ||
| + | touch boot/ssh | ||
| + | |||
| + | |||
| ====== Saber el modelo: ====== | ====== Saber el modelo: ====== | ||
| https:// | https:// | ||
| Line 10: | Line 72: | ||
| Model : Raspberry Pi 3 Model B Plus Rev 1.3 | Model : Raspberry Pi 3 Model B Plus Rev 1.3 | ||
| </ | </ | ||
| + | |||
| + | ====== Cambiar idioma teclado ====== | ||
| + | Si nos conectamos por ssh tendremos el idioma bien, pero en local no. Se hace con raspi-config: | ||
| + | sudo raspi-config | ||
| + | 5 Localisation Options | ||
| + | L3 Keyboard | ||
| + | | ||
| + | Y se selecciona el idioma | ||
| + | |||
| + | ====== Monitorización ====== | ||
| + | https:// | ||
| + | |||
| + | Mirar la temperatura: | ||
| + | vcgencmd measure_temp | ||
| + | temp=42.9' | ||
| + | |||
| + | Voltaje | ||
| + | vcgencmd measure_volts | ||
| + | volt=1.2500V | ||
| + | |||
| + | vcgencmd get_throttled | ||
| + | throttled=0x0 | ||
| + | |||
| + | | 0x0 | todo bien | | ||
| + | | 0x50000 | ha habido under voltage desde el último reinicio | | ||
| + | | 0x50005 | actualmente under voltage | | ||
| + | |||
| + | ===== Script ===== | ||
| + | |||
| + | < | ||
| + | #!/bin/bash | ||
| + | |||
| + | fecha=`date +\%Y\%m\%d_\%H\%M\%S` | ||
| + | voltios=`vcgencmd measure_volts` | ||
| + | test=" | ||
| + | case $test in | ||
| + | throttled=0x50005) estado=" | ||
| + | throttled=0x50000) estado=" | ||
| + | throttled=0x0) estado=" | ||
| + | *) estado=$test;; | ||
| + | esac | ||
| + | |||
| + | echo $fecha" | ||
| + | </ | ||
| + | |||
| + | ====== Pantallas TFT ====== | ||
| + | Pantalla tàctil de 10" con resolución 1024x600 | ||
| + | |||
| + | Modificar el fichero / | ||
| + | hdmi_group=2 | ||
| + | hdmi_mode=87 | ||
| + | hdmi_cvt 1024 600 60 6 0 0 0 | ||
| + | Puede que con Raspberry 4 falle. También funciona con esto: | ||
| + | disable_overscan=1 | ||
| + | hdmi_cvt=1024 600 3 0 0 0 | ||
| + | |||
raspberry.1603221802.txt.gz · Last modified: by jose
