Outils pour utilisateurs

Outils du site


commun:raspberry_pi

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
commun:raspberry_pi [2018/08/26 17:01] – modification externe 127.0.0.1commun:raspberry_pi [2018/12/02 17:39] (Version actuelle) – [wpa_supplicant] francois
Ligne 3: Ligne 3:
 ===== V4l camera module ===== ===== V4l camera module =====
  
-bcm2835-v4l2+Créer un fichier ''/etc/modules-load.d/camera.conf'' et ajouter la ligne: 
 +  bcm2835-v4l2
  
 ===== Video streaming depuis la caméra ===== ===== Video streaming depuis la caméra =====
Ligne 14: Ligne 15:
 sur VLC sur VLC
 Ouvrir le flux réseau http://alarmpi_wifi:8090 Ouvrir le flux réseau http://alarmpi_wifi:8090
 +
 +===== wpa_supplicant =====
 +
 +(ça s'applique à Arch Linux)
 +
 +créer le fichier ''/etc/wpa_supplicant/wpa_supplicant.conf''
 +<file ini /etc/wpa_supplicant/wpa_supplicant.conf>
 +ctrl_interface=/run/wpa_supplicant
 +update_config=1
 +</file>
 +
 +Après, exécuter les commandes suivantes
 +<code bash>
 +sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf 
 +sudo wpa_cli
 +</code>
 +
 +Et ensuite dans le prompt:
 +<code>
 +> scan
 +OK
 +<3>CTRL-EVENT-SCAN-STARTED 
 +<3>CTRL-EVENT-SCAN-RESULTS 
 +<3>CTRL-EVENT-NETWORK-NOT-FOUND 
 +> scan_results
 +bssid / frequency / signal level / flags / ssid
 +10:fe:ed:2b:51:de 2462 -62 [WPA-PSK-CCMP][WPA2-PSK-CCMP][ESS] wifi_fd
 +> add_network
 +0
 +> set_network 0 ssid "wifi_fd"
 +OK
 +> set_network 0 psk "mon_mot_de_passe"
 +OK
 +> enable_network 0
 +OK
 +<3>CTRL-EVENT-SCAN-STARTED 
 +> 
 +<3>CTRL-EVENT-SCAN-RESULTS 
 +<3>SME: Trying to authenticate with 10:fe:ed:2b:51:de (SSID='wifi_fd' freq=2462 MHz)
 +<3>Trying to associate with 10:fe:ed:2b:51:de (SSID='wifi_fd' freq=2462 MHz)
 +<3>Associated with 10:fe:ed:2b:51:de
 +<3>CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
 +<3>CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=FR
 +<3>WPA: Key negotiation completed with 10:fe:ed:2b:51:de [PTK=CCMP GTK=CCMP]
 +<3>CTRL-EVENT-CONNECTED - Connection to 10:fe:ed:2b:51:de completed [id=0 id_str=]
 +<3>WPA: Group rekeying completed with 10:fe:ed:2b:51:de [GTK=CCMP]
 +> 
 +> save_config
 +OK
 +> quit
 +</code>
 +
 +Ensuite on teste comme suit
 +<code>
 +[alarm@alarmpi ~]$ sudo dhcpcd wlan0
 +DUID 00:01:00:01:23:7b:1d:48:74:da:38:02:68:aa
 +wlan0: IAID 38:02:68:aa
 +wlan0: soliciting a DHCP lease
 +wlan0: soliciting an IPv6 router
 +wlan0: Router Advertisement from fe80::12fe:edff:fe2b:51de
 +wlan0: soliciting a DHCPv6 lease
 +wlan0: dropping DHCPv6 due to no valid routers
 +wlan0: offered 192.168.1.130 from 192.168.1.90
 +wlan0: probing address 192.168.1.130/24
 +wlan0: leased 192.168.1.130 for 43200 seconds
 +wlan0: adding route to 192.168.1.0/24
 +wlan0: adding default route via 192.168.1.90
 +forked to background, child pid 371
 +</code>
 +
 +Ensuite créer le fichier de démarrage automatique de wpa_supplicant:
 +<file ini /etc/systemd/system/wpa_supp.service>
 +[Unit]
 +Description=Wifi Network
 +After=network.target
 +
 +# Limite les re-démarrages à 5 tentatives
 +StartLimitIntervalSec=200
 +StartLimitBurst=5
 +
 +[Service]
 +ExecStart=wpa_supplicant -P/var/run/wpasupp.pid -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
 +Type=forking
 +PIDFile=/var/run/wpasupp.pid
 +
 +# Re-essai si échec. Tempo de 30 secondes
 +Restart=always
 +RestartSec=30
 +
 +[Install]
 +WantedBy=default.target
 +</file>
 +
 +Ensuite créer le fichier d'appel dhcp:
 +<file ini /etc/systemd/system/dhcpcd_wlan0.service>
 +[Unit]
 +Description=Wifi Network
 +After=wpa_supp.service
 +
 +StartLimitIntervalSec=200
 +StartLimitBurst=5
 +
 +[Service]
 +ExecStart=/usr/bin/dhcpcd wlan0
 +Type=forking
 +PIDFile=/run/dhcpcd-wlan0.pid
 +
 +Restart=always
 +RestartSec=30
 +
 +[Install]
 +WantedBy=default.target
 +</file>
commun/raspberry_pi.1535302914.txt.gz · Dernière modification : (modification externe)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki