Bonjour
J’ai besoin d’aide .
J’ai un reseau wifi SSID : wifiap et un code WPA2 « testpassword »
J’arrive a connecter mon telephone android dessus
J’arrive a connecter mon PI4 Homeassistant dessus
Mais pas mon PI4 sous raspbian
J’ai configuré le /etc/wpa_supplicant/wpa_supplicant.conf
root@raspberrypi:/etc/wpa_supplicant# systemctl status wpa_supplicant.service
● wpa_supplicant.service - WPA supplicant
Loaded: loaded (/lib/systemd/system/wpa_supplicant.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2023-03-18 08:21:58 CET; 1s ago
Main PID: 4301 (wpa_supplicant)
Tasks: 1 (limit: 3932)
CGroup: /system.slice/wpa_supplicant.service
└─4301 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
Mar 18 08:21:58 raspberrypi systemd[1]: Starting WPA supplicant...
Mar 18 08:21:58 raspberrypi systemd[1]: Started WPA supplicant.
Mar 18 08:21:58 raspberrypi wpa_supplicant[4301]: Successfully initialized wpa_supplicant
root@raspberrypi:/etc/wpa_supplicant#
root@raspberrypi:/etc/wpa_supplicant#
root@raspberrypi:/etc/wpa_supplicant# cat /etc/wpa_supplicant/wpa_supplicant.conf
country=fr
update_config=1
ctrl_interface=/var/run/wpa_supplicant
network={
scan_ssid=1
ssid="wifiap"
psk="testpassword"
avec nmcli :
root@raspberrypi:/etc/wpa_supplicant# nmcli con
NAME UUID TYPE DEVICE
wifiap 2572babb-887d-4a9b-9a03-5aab5cd9a020 wifi --
root@raspberrypi:/etc/wpa_supplicant# nmcli con delete wifiap
Connection 'wifiap' (2572babb-887d-4a9b-9a03-5aab5cd9a020) successfully deleted.
root@raspberrypi:/etc/wpa_supplicant# nmcli con
root@raspberrypi:/etc/wpa_supplicant#
root@raspberrypi:/etc/wpa_supplicant#
root@raspberrypi:/etc/wpa_supplicant# nmcli d wifi
IN-USE SSID MODE CHAN RATE SIGNAL BARS SECURITY
wifiap Infra 8 135 Mbit/s 100 ▂▄▆█ WPA2
DIRECT-MZDESKTOP-BIU1OB7msBC Infra 11 195 Mbit/s 100 ▂▄▆█ WPA2
Livebox-0B7D Infra 11 260 Mbit/s 99 ▂▄▆█ WPA2
Livebox-0B7D Infra 36 540 Mbit/s 92 ▂▄▆█ WPA2
bh-ssid-386700J224700316 Infra 36 540 Mbit/s 92 ▂▄▆█ WPA2
bh-ssid-386700J224700316 Infra 11 270 Mbit/s 65 ▂▄▆_ WPA2
Livebox-0B7D Infra 36 270 Mbit/s 50 ▂▄__ WPA2
root@raspberrypi:/etc/wpa_supplicant# nmcli d wifi connect "wifiap" password "testpassword"
Error: Connection activation failed: (7) Secrets were required, but not provided.
J’ai toujours ce message d’erreur « Secrets were required, but not provided. »
Pouvez vous m’aider
Merci
Une recherche google me mène a :
Suffit de supprimer l’entrée en mémoire;
nmcli con delete <SSID>
Et de la recréer;
nmcli dev wifi connect <SSID> password <password>
bonjour
merci de ton aide
j’ai deja fait plusieures fois cette manip et ca marche pas
tiens regarde les captures d’ecran
root@raspberrypi:/home/pi# nmcli con
NAME UUID TYPE DEVICE
wifiap 9ff8a51f-5c8a-4d05-a6ed-37dd2e9b6cb7 wifi --
J’efface les connections existantes et je me reconnecte
root@raspberrypi:/home/pi# nmcli con delete wifiap
Connection 'wifiap' (9ff8a51f-5c8a-4d05-a6ed-37dd2e9b6cb7) successfully deleted.
root@raspberrypi:/home/pi# nmcli con
root@raspberrypi:/home/pi# nmcli dev wifi con "wifiap" password "testpassword"
Error: Connection activation failed: (7) Secrets were required, but not provided.
root@raspberrypi:/home/pi# nmcli con
NAME UUID TYPE DEVICE
wifiap 152649e8-1eec-4418-94a9-889f254f7296 wifi --
root@raspberrypi:/home/pi# nmcli con show "wifiap"
connection.id: wifiap
connection.uuid: 152649e8-1eec-4418-94a9-889f254f7296
connection.stable-id: --
connection.type: 802-11-wireless
connection.interface-name: --
connection.autoconnect: yes
connection.autoconnect-priority: 0
connection.autoconnect-retries: -1 (default)
connection.multi-connect: 0 (default)
connection.auth-retries: -1
connection.timestamp: 0
connection.read-only: no
connection.permissions: --
connection.zone: --
connection.master: --
connection.slave-type: --
connection.autoconnect-slaves: -1 (default)
connection.secondaries: --
connection.gateway-ping-timeout: 0
connection.metered: unknown
connection.lldp: default
connection.mdns: -1 (default)
connection.llmnr: -1 (default)
802-11-wireless.ssid: wifiap
802-11-wireless.mode: infrastructure
802-11-wireless.band: --
802-11-wireless.channel: 0
802-11-wireless.bssid: --
802-11-wireless.rate: 0
802-11-wireless.tx-power: 0
802-11-wireless.mac-address: DC:A6:32:68:5A:B0
802-11-wireless.cloned-mac-address: --
802-11-wireless.generate-mac-address-mask:--
802-11-wireless.mac-address-blacklist: --
802-11-wireless.mac-address-randomization:default
802-11-wireless.mtu: auto
802-11-wireless.seen-bssids: --
802-11-wireless.hidden: no
802-11-wireless.powersave: 0 (default)
802-11-wireless.wake-on-wlan: 0x1 (default)
802-11-wireless-security.key-mgmt: wpa-psk
802-11-wireless-security.wep-tx-keyidx: 0
802-11-wireless-security.auth-alg: open
802-11-wireless-security.proto: --
802-11-wireless-security.pairwise: --
802-11-wireless-security.group: --
802-11-wireless-security.pmf: 0 (default)
802-11-wireless-security.leap-username: --
802-11-wireless-security.wep-key0: <hidden>
802-11-wireless-security.wep-key1: <hidden>
802-11-wireless-security.wep-key2: <hidden>
802-11-wireless-security.wep-key3: <hidden>
802-11-wireless-security.wep-key-flags: 0 (none)
802-11-wireless-security.wep-key-type: unknown
802-11-wireless-security.psk: <hidden>
802-11-wireless-security.psk-flags: 0 (none)
802-11-wireless-security.leap-password: <hidden>
802-11-wireless-security.leap-password-flags:0 (none)
802-11-wireless-security.wps-method: 0 (default)
802-11-wireless-security.fils: 0 (default)
ipv4.method: auto
ipv4.dns: --
ipv4.dns-search: --
ipv4.dns-options: ""
ipv4.dns-priority: 0
ipv4.addresses: --
ipv4.gateway: --
ipv4.routes: --
ipv4.route-metric: -1
ipv4.route-table: 0 (unspec)
ipv4.ignore-auto-routes: no
ipv4.ignore-auto-dns: no
ipv4.dhcp-client-id: --
ipv4.dhcp-timeout: 0 (default)
ipv4.dhcp-send-hostname: yes
ipv4.dhcp-hostname: --
ipv4.dhcp-fqdn: --
ipv4.never-default: no
ipv4.may-fail: yes
ipv4.dad-timeout: -1 (default)
ipv6.method: auto
ipv6.dns: --
ipv6.dns-search: --
ipv6.dns-options: ""
ipv6.dns-priority: 0
ipv6.addresses: --
ipv6.gateway: --
ipv6.routes: --
ipv6.route-metric: -1
ipv6.route-table: 0 (unspec)
ipv6.ignore-auto-routes: no
ipv6.ignore-auto-dns: no
ipv6.never-default: no
ipv6.may-fail: yes
ipv6.ip6-privacy: -1 (unknown)
ipv6.addr-gen-mode: stable-privacy
ipv6.dhcp-duid: --
ipv6.dhcp-send-hostname: yes
ipv6.dhcp-hostname: --
ipv6.token: --
proxy.method: none
proxy.browser-only: no
proxy.pac-url: --
proxy.pac-script: --
root@raspberrypi:/home/pi# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.4 netmask 255.255.255.0 broadcast 192.168.1.255
ether dc:a6:32:68:5a:af txqueuelen 1000 (Ethernet)
RX packets 472969 bytes 31381679 (29.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 16399 bytes 1758010 (1.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1000 (Local Loopback)
RX packets 1097 bytes 76148 (74.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1097 bytes 76148 (74.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 2a:84:5e:30:9e:2d txqueuelen 1000 (Ethernet)
RX packets 147 bytes 22479 (21.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 108 bytes 14250 (13.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@raspberrypi:/home/pi# nmcli
wlan0: disconnected
"Broadcom BCM43438 combo and Bluetooth Low Energy"
1 connection available
wifi (brcmfmac), 2A:84:5E:30:9E:2D, hw, mtu 1500
eth0: unmanaged
"eth0"
ethernet (bcmgenet), DC:A6:32:68:5A:AF, hw, mtu 1500
lo: unmanaged
"lo"
loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536
Use "nmcli device show" to get complete information about known devices and
"nmcli connection show" to get an overview on active connection profiles.
Consult nmcli(1) and nmcli-examples(5) manual pages for complete usage details.
root@raspberrypi:/home/pi# nmcli wlan0
Error: argument 'wlan0' not understood. Try passing --help instead.
root@raspberrypi:/home/pi# nmcli connection show
NAME UUID TYPE DEVICE
wifiap 152649e8-1eec-4418-94a9-889f254f7296 wifi --
root@raspberrypi:/home/pi# nmcli device show
GENERAL.DEVICE: wlan0
GENERAL.TYPE: wifi
GENERAL.HWADDR: 2A:84:5E:30:9E:2D
GENERAL.MTU: 1500
GENERAL.STATE: 30 (disconnected)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
GENERAL.DEVICE: eth0
GENERAL.TYPE: ethernet
GENERAL.HWADDR: DC:A6:32:68:5A:AF
GENERAL.MTU: 1500
GENERAL.STATE: 10 (unmanaged)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
WIRED-PROPERTIES.CARRIER: on
IP4.ADDRESS[1]: 192.168.1.4/24
IP4.GATEWAY: 192.168.1.254
IP4.ROUTE[1]: dst = 0.0.0.0/0, nh = 192.168.1.254, mt = 0
IP4.ROUTE[2]: dst = 192.168.1.0/24, nh = 0.0.0.0, mt = 0
IP6.GATEWAY: --
GENERAL.DEVICE: lo
GENERAL.TYPE: loopback
GENERAL.HWADDR: 00:00:00:00:00:00
GENERAL.MTU: 65536
GENERAL.STATE: 10 (unmanaged)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
IP4.ADDRESS[1]: 127.0.0.1/8
IP4.GATEWAY: --
IP6.GATEWAY: --
J’ai besoin d’aide
Cordialement
j’ai ca dans les logs
root@raspberrypi:/home/pi#
root@raspberrypi:/home/pi#
root@raspberrypi:/home/pi# systemctl status NetworkManager
● NetworkManager.service - Network Manager
Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2023-03-18 14:20:05 CET; 12min ago
Docs: man:NetworkManager(8)
Main PID: 5056 (NetworkManager)
Tasks: 3 (limit: 3932)
CGroup: /system.slice/NetworkManager.service
└─5056 /usr/sbin/NetworkManager --no-daemon
Mar 18 14:31:45 raspberrypi NetworkManager[5056]: <warn> [1679146305.8883] device (wlan0): Activation: (wifi) association took too long
Mar 18 14:31:45 raspberrypi NetworkManager[5056]: <info> [1679146305.8885] device (wlan0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Mar 18 14:31:45 raspberrypi NetworkManager[5056]: <warn> [1679146305.8931] device (wlan0): Activation: (wifi) asking for new secrets
Mar 18 14:31:45 raspberrypi NetworkManager[5056]: <warn> [1679146305.9047] device (wlan0): No agents were available for this request.
Mar 18 14:31:45 raspberrypi NetworkManager[5056]: <info> [1679146305.9049] device (wlan0): state change: need-auth -> failed (reason 'no-secrets', sys-iface-state: 'managed')
Mar 18 14:31:45 raspberrypi NetworkManager[5056]: <warn> [1679146305.9096] device (wlan0): Activation: failed for connection 'wifiap'
Mar 18 14:31:45 raspberrypi NetworkManager[5056]: <info> [1679146305.9115] device (wlan0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Mar 18 14:31:46 raspberrypi NetworkManager[5056]: <info> [1679146306.4432] device (wlan0): set-hw-addr: set MAC address to 5E:59:94:C9:00:3A (scanning)
Mar 18 14:31:46 raspberrypi NetworkManager[5056]: <info> [1679146306.4616] device (wlan0): supplicant interface state: disconnected -> disabled
Mar 18 14:31:46 raspberrypi NetworkManager[5056]: <info> [1679146306.4621] device (wlan0): supplicant interface state: disabled -> inactive
root@raspberrypi:/home/pi#
je ne comprend pas pkoi ca marche pas avec pi4-raspbian
ca marche avec les autres matériels
Il veut créer le secret mais aucun service de disponible.
Regarde si tu as la « libsecret » d’installé.
Autre solution, désactiver le « random » Mac Address;
Sinon le problème vient du fait que tu sauvegarde l’information pour 1 user, et non global a la machine. C’est un problème courant avec NetworkManager et Gnome. Mais je ne crois pas que c’est exactement ta situation.
ca marche pas
C’est dommage
ah j’avais pas vu le message de levelKro SORRY
voici ce que j’ai d’installé
root@raspberrypi:/home/pi# dpkg -l | grep -i secret
ii gir1.2-secret-1:armhf 0.18.7-1 armhf Secret store (GObject-Introspection)
ii libsecret-1-0:armhf 0.18.7-1 armhf Secret store
ii libsecret-common 0.18.7-1 all Secret store (common files)
ii python-secretstorage 2.3.1-2 all Python module for storing secrets - Python 2.x version
ii python3-secretstorage 2.3.1-2 all Python module for storing secrets - Python 3.x version
Du coup je dois d’installer libsecret ? ou reseter la passphrase ou le mot de passe ?
Si oui je lance quelle commande ?
J’ai trouvé un article sur le web
Il est vrai qu’il y a est fichier secretkey sur mon raspberrypi
root@raspberrypi:/var/lib/NetworkManager# ls -l
total 24
-rw-r--r-- 1 root root 838 Mar 17 17:58 dhclient-acb630c7-73a9-4939-b576-bab198eaa014-wlan0.lease
-rw-r--r-- 1 root root 939 Feb 24 16:14 NetworkManager-intern.conf
-rw-r--r-- 1 root root 68 Mar 18 18:51 NetworkManager.state
-rw------- 1 root root 50 Mar 17 17:56 secret_key
-rw-r--r-- 1 root root 14 Mar 18 18:47 seen-bssids
-rw-r--r-- 1 root root 91 Mar 18 18:58 timestamps
merci
bon, j’ai finalement trouvé une solution
voici ce que j’ai fait
1/ Remove /var/lib/NetworkManager/secrets
2/ Unistall : apt-get purge network-manager
3/ reinstall networkManager : apt-get install network-manager
4/ config wifiap avec Nmtui
Merci beaucoup