4.0 KiB
Executable File
4.0 KiB
Executable File
Installation : pi + VMA405 ou RC522
1 - Cloner le projet
2 - Créer une image
- PI OS Lite LEGACY
- Utilisateur = sysop
- Wifi
- SSH
Attention, penser à mettre votre clef publique sur le pi (ssh-copy)
3 - Ansible(hôte) inventaire des clients(raspberry pi)
sudo nano /etc/ansible/hosts
[rpiDsi]
pi1 ansible_host=192.168.1.11 hostname=pi1 token=xxxxxxxxxxxx password=xxxxxxxxxxxx frontType=FPI serveur=nom_de_domain(+port si besoin) protocole=http(ou https)
pi2 ansible_host=192.168.1.6 hostname=pi2 token=xxxxxxxxxxxx password=xxxxxxxxxxxx frontType=FPI serveur=nom_de_domain(+port si besoin) protocole=http(ou https)
4 - Ansible(hôte) installation des machines
- A la racine du projet
ansible-playbook install_1024x600_vma405_chromium.yml -K
Informations
Pin raspberry pi 3 b+
| côté usb | 39 | 37 | 35 | 33 | 31 | 29 | 27 | 25 | 23 | 21 | 19 | 17 | 15 | 13 | 11 | 9 | 7 | 5 | 3 | 1 | côté sdcar |
| reseau | 40 | 38 | 36 | 34 | 32 | 30 | 28 | 26 | 24 | 22 | 20 | 18 | 16 | 14 | 12 | 10 | 8 | 6 | 4 | 2 |
Cablage VMA405 ou RC522
| côté usb | 39 | 37 | 35 | 33 | 31 | 29 | 27 | 25 | SCK | MISO | MOSI | 17 | 15 | 13 | 11 | GND | 7 | 5 | 3 | vcc |
| reseau | 40 | 38 | 36 | 34 | 32 | 30 | 28 | 26 | NSS | RST | 20 | 18 | 16 | 14 | 12 | 10 | 8 | 6 | 4 | 2 |
| RC522 / VMA405 | PI 3 B+ | Couleur cable |
|---|---|---|
| 3.3v / VCC | 1 | rouge |
| RST | 22 | marron |
| GND | 9 | noir |
| IRQ | pas utilisé | |
| MISO | 21 | jaune |
| MOSI | 19 | vert |
| SCK | 23 | bleu |
| SDA | 24 | violet |
splash screen (écran de boot)
-
sudo nano /boot/config.txt
disable splash=1 -
sudo nano /boot/cmdline.txt
consoleblank=0 loglevel=1 quiet logo.nologo -
Pour afficher l'image
sudo apt install fbi -
Créer un service
sudo nano /etc/systemd/system/splashscreen.service
[Unit]
Description=Splash screen
DefaultDependencies=no
After=local-fs.target
[Service]
ExecStart=/usr/bin/fbi -d /dev/fb0 --noverbose -a /home/sysop/splash.png
StandardInput=tty
StandardOutput=tty
[Install]
WantedBy=sysinit.target
- active le service
sudo systemctl enable splashscreen.service sudo systemctl start splashscreen.service
/ext/xdg/openbox/autostart
#/etc/xdg/openbox/
DISPLAY=:0 xdotool getactivewindow key F5
# stop veille/économie dénergie
xset dpms 0 0 0 && xset s noblank && xset s off
#Touches pour sortir du serveur X => CTRL-ATL-Backspace
setxkbmap -option terminate:ctrl_alt_bksp
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' ~/.config/chromium/Default/Preferences
# vidage du cache chromium
rm -fr /home/sysop/.cache/chromium
rm -fr /home/sysop/.config/chromium/Default/
# orientation de l'écran
xrandr --output DSI-1 --rotate right
# lance chromium avec un user agent spécifique hostname,password,periph,ip (provenant en partie de .chromium_env)
cd /home/sysop/serveurNfcNodeJs/
node serveur_nfc.js
/home/sysop/.bashrc (ajouter)
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx -- -nocursor