Hallo!
Ich würde gerne mit meinem RaspberryPi 1B von netctl auf netctl-auto umsteigen.
Der RPi ist über einen LogiLink USB Wlan Dongle
lsusb
Bus 001 Device 005: ID 0bda:8171 Realtek Semiconductor Corp. RTL8188SU 802.11n WLAN Adapter
mit dem Router verbunden.
Die Verbindung wird mit netctl fehlerfrei aufgebaut und ist auch über Monate stabil, auch bei einem Router-Reboot.
Der Grund warum ich auf netctl-auto umsteigen will, ist folgender:
Ist die Wlan-Verbindung Router-seitig mal einige Zeit weg (Router abgedreht, etc.), also läuft der RPi in ein Connection-Timeout, findet kein reconnect mehr statt. Da der RPi in der Küche schlecht zugänglich steht, muss ich jedesmal, wenn er nicht mehr erreichbar ist, den Stecker ziehen.
In den Wiki-Seiten ist bezüglich netctl-auto nicht allzuviel Info zu finden. Auch google spuckt nur Ergebnisse aus, die nicht auf mein Problem zutreffen.
Wenn ich alle netctl Profile deaktiviere und stattdessen netctl-auto aktiviere und entsprechendes systemd-service (
netctl-auto@wlan0.service) aktiviere, wird zwar bei Systemstart eine Verbindung aufgebaut, aber keine IP bezogen. Führe ich dann manuell ein
root@RasPi ~ # dhcpcd wlan0
unknown option: RasPi
unknown option: RasPi
all: IPv6 kernel autoconf disabled
wlan0: adding address fe80::f153:5168:c992:59d6
if_addaddress6: Operation not supported
DUID 00:01:00:01:c7:92:bc:9f:00:13:33:b5:fb:ca
wlan0: IAID 33:b5:fb:ca
wlan0: rebinding lease of 192.168.86.123
wlan0: probing address 192.168.86.123/24
wlan0: leased 192.168.86.123 for 86400 seconds
wlan0: adding route to 192.168.86.0/24
wlan0: adding default route via 192.168.86.1
forked to background, child pid 753
aus, steht die Verbindung, und er ist über Wlan erreichbar. Allerdings nur bis zum nächsten reboot. Dann muss wieder das LAN-Kabel dran...
root@RasPi ~ # systemctl status netctl-auto@wlan0.service
● netctl-auto@wlan0.service - Automatic wireless network connection using netctl profiles
Loaded: loaded (/usr/lib/systemd/system/netctl-auto@.service; enabled; vendor preset: disabled)
Active: active (running) since Sam 2016-06-04 02:11:23 CEST; 11h ago
Docs: man:netctl.special(7)
Process: 220 ExecStart=/usr/bin/netctl-auto start %I (code=exited, status=0/SUCCESS)
CGroup: /system.slice/system-netctl\x2dauto.slice/netctl-auto@wlan0.service
└─272 wpa_supplicant -q -B -P /run/wpa_supplicant_wlan0.pid -i wlan0 -D nl80211,wext -c/run/network/wpa_supplicant_wlan0.conf -W
Jun 04 02:11:18 RasPi systemd[1]: Starting Automatic wireless network connection using netctl profiles...
Jun 04 02:11:20 RasPi netctl-auto[220]: Included profile 'Tomato24'
Jun 04 02:11:23 RasPi systemd[1]: Started Automatic wireless network connection using netctl profiles.
Jun 04 02:11:23 RasPi wpa_actiond[277]: Starting wpa_actiond session for interface 'wlan0'
Jun 04 02:11:28 RasPi wpa_actiond[277]: Terminating wpa_actiond session for interface 'wlan0'
root@RasPi ~ # netctl-auto list
* Tomato24
mein Profil:
root@RasPi ~ # cat /etc/netctl/Tomato24
Description='Wireless Connection to my Tomato Router'
Interface=wlan0
Connection=wireless
Security=wpa
IP6=no
IP=dhcp
DHCPClient=dhcpcd
Hostname=RasPi
ESSID='Tomato24'
# Prepend hexadecimal keys with \"
# If your key starts with ", write it as '""<key>"'
# See also: the section on special quoting rules in netctl.profile(5)
Key='password'
# Uncomment this if your ssid is hidden
#Hidden=yes
NETCTL_DEBUG=yes
IP6 und DHCPClient sind eigentlich nur zu Testzwecken da drin (sind aber default-Werte).
Hab auch schon an ein Script gedacht, dass alle paar Minuten kontrolliert ob der Router erreichbar ist, und wenn nicht, ein netctl restart ausführt. Aber das Problem muss doch auch sauber mit netctl-auto zu lösen sein!?
Danke schon mal im Vorraus!
LG
Markus