0 Votes

Code source wiki de Raspberry Pi

Version 8.2 par john le 2026/09/20 14:07

Afficher les derniers auteurs
1 {{info}}
2 **Pages détaillées**
3
4 Services : [[AdGuard Home>>Wiki Batcave John.Infrastructure.RaspberryPi.AdGuard Home.WebHome]] · [[Meshtastic>>Wiki Batcave John.Infrastructure.RaspberryPi.Meshtastic.WebHome]] · [[Jellyfin>>Wiki Batcave John.Infrastructure.RaspberryPi.Jellyfin.WebHome]] · [[OLED Stats>>Wiki Batcave John.Infrastructure.RaspberryPi.OLEDStats.WebHome]] · [[led-anim>>Wiki Batcave John.Infrastructure.RaspberryPi.led-anim.WebHome]]
5
6 Système : [[Noyau et dépôt Raspberry Pi>>Wiki Batcave John.Infrastructure.RaspberryPi.Noyau et dépôt Raspberry Pi.WebHome]] · [[SSD de stockage>>Wiki Batcave John.Infrastructure.RaspberryPi.SSD.WebHome]] · [[fail2ban>>Wiki Batcave John.Infrastructure.RaspberryPi.fail2ban.WebHome]] · [[chkrootkit>>Wiki Batcave John.Infrastructure.RaspberryPi.chkrootkit.WebHome]] [[Reconstruction>>doc:.Reconstruction.WebHome]]
7 {{/info}}
8
9 == Système ==
10
11 |=Élément|=Valeur
12 |Machine|Raspberry Pi 4
13 |OS|Debian 13, sans environnement graphique
14 |Noyau|6.18, du dépôt Raspberry Pi
15 |Cible systemd|##multi-user.target##
16 |Réseau|Wi-Fi
17 |Stockage des sauvegardes|SSD USB
18
19 == Services ==
20
21 === Conteneurs ===
22
23 |=Service|=Rôle
24 |AdGuard Home|DNS local, blocage, réécriture DNS
25 |OLED Stats|Statistiques sur l'écran OLED du boîtier
26 |Portainer + Portainer Agent|Gestion Docker
27 |Watchtower|Mise à jour automatique des images
28
29 === Natifs ===
30
31 |=Service|=Rôle
32 |meshtasticd|Nœud Meshtastic LoRa (HAT SX1262 en SPI)
33 |Jellyfin|Serveur multimédia
34 |fail2ban|Blocage des tentatives SSH
35 |smartmontools|Surveillance du SSD
36 |sysstat, acct|Statistiques système, comptabilité des processus
37 |chkrootkit, Lynis|Audit nocturne par timer
38 |led-anim|Animation du bandeau LED
39
40 == Outils ==
41
42 Plakar (dépôt), uhubctl, yt-dlp et client meshtastic (pipx), outils RTL-SDR.
43
44 == Configuration ==
45
46 === Wi-Fi : désactiver l'économie d'énergie ===
47
48 Le lien décroche sur les gros transferts SFTP quand l'économie d'énergie est active :
49
50 {{code language="bash"}}
51 sudo nmcli connection modify "<SSID>" 802-11-wireless.powersave 2
52 sudo nmcli connection up "<SSID>"
53 {{/code}}
54
55 === SSD USB sur pont ASMedia ===
56
57 Le pont se déconnecte sous forte charge en mode UAS. Forcer le mode usb-storage en ajoutant à la ligne unique de ##/boot/firmware/cmdline.txt## (identifiants donnés par ##lsusb##) :
58
59 {{code}}
60 usb-storage.quirks=<VID>:<PID>:u
61 {{/code}}
62
63 Montage à la demande dans ##/etc/fstab##, sans bloquer le démarrage si le disque est absent :
64
65 {{code}}
66 UUID=<UUID> <POINT_MONTAGE> <FS> defaults,nofail,x-systemd.automount 0 2
67 {{/code}}
68
69 Empêcher l'écriture sur la carte SD quand le SSD n'est pas monté (à faire sur le point de montage vide) :
70
71 {{code language="bash"}}
72 sudo chattr +i <POINT_MONTAGE>
73 {{/code}}
74
75 === SPI pour le module LoRa ===
76
77 Dans ##/boot/firmware/config.txt## :
78
79 {{code language="ini"}}
80 dtparam=spi=on
81 dtoverlay=spi0-0cs
82 {{/code}}
83
84 === meshtasticd ===
85
86 Les réglages vont dans ##/etc/meshtasticd/config.d/## : ces fichiers survivent aux mises à jour du paquet, contrairement à ##config.yaml##.
87
88 ##99-lora.yaml##, valeurs pour le HAT Waveshare SX126X :
89
90 {{code language="yaml"}}
91 Lora:
92 Module: sx1262
93 DIO2_AS_RF_SWITCH: true
94 CS: 21
95 IRQ: 16
96 Busy: 20
97 Reset: 18
98 SX126X_ANT_SW: 6
99 {{/code}}
100
101 ##98-webserver.yaml## :
102
103 {{code language="yaml"}}
104 Webserver:
105 Port: 443
106 RootPath: /usr/share/meshtasticd/web
107 {{/code}}
108
109 === Outils Python ===
110
111 {{code language="bash"}}
112 sudo apt install pipx
113 pipx install meshtastic
114 pipx install yt-dlp
115 pipx ensurepath
116 {{/code}}
117
118 Mise à jour : ##pipx upgrade-all##.
119
120 === led-anim ===
121
122 Voir la page [[led-anim>>Wiki Batcave John.Infrastructure.RaspberryPi.led-anim.WebHome]].
123
124 === Portainer Agent ===
125
126 L'agent doit être à la même version que le Portainer qui le pilote : épingler son tag sur celui du serveur plutôt que ##latest##.
127
128 === Services désactivés ===
129
130 ModemManager (sonde les ports série et peut perturber un nœud Meshtastic en USB), bluetooth, hciuart.