User Tools

Site Tools


doc:appunti:android:desktop_replace_rpi

This is an old revision of the document!


Un Raspberry Pi al posto del notebook

raspi-config

Per configurare la tastiera si sceglie da raspi-config la voce … FIXME oppure da riga di comando:

dpkg-reconfigure keyboard-configuration

FIXME Nella versione RaspiOS 2020-05-27 purtroppo non funziona (non si avvia) l'interfaccia testuale di configurazione.

Il file che viene creato è /etc/default/keyboard, questo un esempio per una tastiera italiana e il tasto LeftLogo associato alla funzione compose:

XKBMODEL="pc105"
XKBLAYOUT="it"
XKBVARIANT=""
XKBOPTIONS="compose:lwin"
BACKSPACE="guess"

Abilitare SSH

Per abilitare l'accesso via SSH senza poter utilizzare monitor o tastiera del Raspberry Pi è sufficiente creare un file di nome ssh nella partizione boot della microSD (ovviamente estraendola dal Raspberry e montandola in un PC).

Al reboot successivo il servizio ssh verrà attivato in modo permanente e il file /boot/ssh rimosso.

Abilitare VNC

vncviewer

 CConnection: Using RFB protocol version 3.8
 CConnection: No matching security types

Edit the file /root/.vnc/config.d/vncserver-x11

Authentication=VncAuth
Encryption=AlwaysOff
Password=????????
vncpasswd -service

Tastiera Bluetooth

Abbiamo provato una tastiera Bluetooth Perixx Periboard 804II.

Vantaggi

  • Compatta (300 x 150 x 15 mm) e leggera (273 grammi).
  • Ricaricabile.
  • Non richiede dongle USB perché utilizza il Bluetooth integrato del Raspberry Pi 3.

Svantaggi

  • A volte è necessario premere ripetutamente un tasto per uscire dallo sleep mode.
  • La meccanica dei tasti è solo discreta.

Per connetterla la prima volta al Raspberry Pi è necessario accenderla e premere il pulsantino connect sul retro, la tastiera si mette in modalità pairing ed il led Bluetooth inizia a lampeggiare. Quindi sul Raspberry, da riga di comando, si esegue una shell bluetoothctl. Quella che segue è la sessione per il paring e il connect. Quando viene mostrato il PIN, questo va digitato sulla tastiera seguito dal tasto Enter:

# bluetoothctl
Agent registered
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent is already registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
Discovery started
[CHG] Controller B8:27:EB:76:B3:62 Discovering: yes
[NEW] Device 41:39:4E:4D:D2:64 41-39-4E-4D-D2-64
[NEW] Device CC:C5:0A:0E:0B:EB CC-C5-0A-0E-0B-EB
[CHG] Device CC:C5:0A:0E:0B:EB LegacyPairing: no
[CHG] Device CC:C5:0A:0E:0B:EB Name: Bluetooth Keyboard
[CHG] Device CC:C5:0A:0E:0B:EB Alias: Bluetooth Keyboard
[CHG] Device CC:C5:0A:0E:0B:EB LegacyPairing: yes
[bluetooth]# pair CC:C5:0A:0E:0B:EB
Attempting to pair with CC:C5:0A:0E:0B:EB
[CHG] Device CC:C5:0A:0E:0B:EB Connected: yes
[agent] PIN code: 493972
[CHG] Device CC:C5:0A:0E:0B:EB Modalias: usb:v04E8pA02Ad0001
[CHG] Device CC:C5:0A:0E:0B:EB UUIDs: 00001000-0000-1000-8000-00805f9b34fb
[CHG] Device CC:C5:0A:0E:0B:EB UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device CC:C5:0A:0E:0B:EB UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device CC:C5:0A:0E:0B:EB ServicesResolved: yes
[CHG] Device CC:C5:0A:0E:0B:EB Paired: yes
Pairing successful
[CHG] Device CC:C5:0A:0E:0B:EB ServicesResolved: no
[CHG] Device CC:C5:0A:0E:0B:EB Connected: no
[bluetooth]# connect CC:C5:0A:0E:0B:EB
Attempting to connect to CC:C5:0A:0E:0B:EB
[CHG] Device CC:C5:0A:0E:0B:EB Connected: yes
Connection successful
[CHG] Device CC:C5:0A:0E:0B:EB ServicesResolved: yes
[Bluetooth Keyboard]# trust CC:C5:0A:0E:0B:EB
[CHG] Device CC:C5:0A:0E:0B:EB Trusted: yes
Changing CC:C5:0A:0E:0B:EB trust succeeded

Avendo attivato il trust la tastiera verrà collegata automaticamente ad ogni riavvio, è sufficiente che sia accesa.

FIXME Cosa accade se usiamo la tastiera accoppiata con un altro dispositivo? Sarà necessario fare di nuovo il paring?

Web References

doc/appunti/android/desktop_replace_rpi.1598882169.txt.gz · Last modified: 2020/08/31 13:56 by niccolo