Einrichtung WLAN
Hier gilt mal wieder: „Erst informieren, dann kaufen!“
Ralink 5370 Chipsatz:
Hardwareerkennung unter Ubuntu 20.04
Wichtig ist, was dmesg ausgibt:
my@bash $ dmesg | tail -25
[ 544.141120] usb 1-1: SerialNumber: 1.0
[ 544.204156] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 544.210721] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 544.428394] usb 1-1: reset high-speed USB device number 2 using ehci-pci
[ 544.712782] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[ 545.597888] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected
[ 545.605639] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 545.625311] usbcore: registered new interface driver rt2800usb
[ 545.652306] rt2800usb 1-1:1.0 wlx000f0075f040: renamed from wlan0
[ 545.675217] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[ 545.677590] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[ 642.389589] usb 1-1: USB disconnect, device number 2
[ 4988.517386] usb 1-1: new high-speed USB device number 3 using ehci-pci
[ 4988.815925] usb 1-1: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[ 4988.815928] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4988.815930] usb 1-1: Product: 802.11 n WLAN
[ 4988.815932] usb 1-1: Manufacturer: Ralink
[ 4988.815932] usb 1-1: SerialNumber: 1.0
[ 4989.065192] usb 1-1: reset high-speed USB device number 3 using ehci-pci
[ 4989.344809] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[ 4990.230334] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 5370 detected
[ 4990.238296] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[ 4990.309560] rt2800usb 1-1:1.0 wlx000f0075f040: renamed from wlan0
[ 4990.343006] ieee80211 phy1: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[ 4990.343043] ieee80211 phy1: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
my@bash $
Interessant ist vor allem folgendes:
my@bash $ dmesg | grep -i firmware
[ 0.000000] [Firmware Bug]: TSC doesn't count with P0 frequency!
[ 545.675217] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[ 545.677590] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[ 4990.343006] ieee80211 phy1: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[ 4990.343043] ieee80211 phy1: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
my@bash $
my@bash $ ## Nach dem Namen des Pakets suchen, aus dem der Treiber stammt:
my@bash $ dpkg -S rt2870.bin
linux-firmware: /lib/firmware/rt2870.bin
my@bash $
my@bash $ ## >> Bei Ubuntu also im Paket "linux-firmware" enthalten.
Nach WLANs suchen:
my@bash $ whatis iwconfig
iwconfig (8) - configure a wireless network interface
my@bash $
my@bash $ # >> aus dem Debina/Ubuntu-Paket 'wireless-tools'
my@bash $
my@bash $ dpkg -L wireless-tools | grep bin
/sbin
/sbin/iwconfig
/sbin/iwevent
/sbin/iwgetid
/sbin/iwlist
/sbin/iwpriv
/sbin/iwspy
my@bash $
LPI-relevant ist, mit welchen alten Tools die Link-Qualität beurteilt werden kann:
iwconfig
iwspy
my@bash $ iwconfig
lo no wireless extensions.
enp0s3 no wireless extensions.
enp0s8 no wireless extensions.
wlx000f0075f040 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short long limit:2 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
my@bash $ ## >> Die HOFFENTLICH FUNKTIONIERENDE Schnittstelle ist "wlx000f0075f040"
my@bash $
my@bash $ whatis iwlist
iwlist (8) - Get more detailed wireless information from a wireless interface
my@bash $
my@bash $ iwlist scan
lo Interface doesn't support scanning.
enp0s3 Interface doesn't support scanning.
enp0s8 Interface doesn't support scanning.
wlx000f0075f040 Scan completed :
Cell 01 - Address: C2:92:8B:AB:45:33
Channel:6
Frequency:2.437 GHz (Channel 6)
Quality=49/70 Signal level=-61 dBm
Encryption key:on
ESSID:"Blckpanther"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
Extra:tsf=000000026f9b0e30
Extra: Last beacon: 3656ms ago
IE: Unknown: 000B426C636B70616E74686572
IE: Unknown: 010482848B96
IE: Unknown: 030106
IE: Unknown: 3B110C010204050C1617181A1B1C1D1F202180
IE: Unknown: 2A0100
IE: Unknown: 32080C1218243048606C
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown: 2D1A2D0113FF00000000000000000000000000000000000000000000
IE: Unknown: 3D1606000000000000000000000000000000000000000000
IE: Unknown: DD180050F2020101810003A4000027A4000042435E0062322F00
IE: Unknown: BF0C12718033FEFF8601FEFF8601
IE: Unknown: C005000000FEFF
IE: Unknown: 7F080400080000000040
Nach dem Aktivieren von WLAN-Tetering meldet sich das Netz „Blckpanther“:
my@bash $ iwlist scan | grep ESSID
lo Interface doesn't support scanning.
enp0s3 Interface doesn't support scanning.
enp0s8 Interface doesn't support scanning.
ESSID:"Blckpanther"
my@bash $
WPA2 mit wpa_supplicant per Cmdline
Das Ganze ist gar nicht so schwer, die Software ist meist schon installiert:
my@bash $ dpkg -l | grep wpa
ii wpasupplicant 2:2.9-1ubuntu4.3 amd64 client support for WPA and WPA2 (IEEE 802.11i)
my@bash $
my@bash $
my@bash $ whatis wpa_supplicant
wpa_supplicant (8) - Wi-Fi Protected Access client and IEEE 802.1X supplicant
my@bash $
my@bash $ whatis wpa_passphrase
wpa_passphrase (8) - Generate a WPA PSK from an ASCII passphrase for a SSID
my@bash $
my@bash $
my@bash $ ## Config-Datei erzeugen:
my@bash $ wpa_passphrase 'Blckpanther' 'h0ddo7.xA'
network={
ssid="Blckpanther"
#psk="h0ddo7.xA"
psk=976f19ed8df60be7f08e840449606f4aca2affdc319d0d7cb3d32568bdb102f0
}
my@bash $
my@bash $ wpa_passphrase 'Blckpanther' 'h0ddo7.xA' > myPanther.config
my@bash $
my@bash $
my@bash $ ## Den kryptografischen Handshake durchführen:
my@bash $ wpa_supplicant -i wlx000f0075f040 -c myPanther.config &
[1] 3696
my@bash $ Successfully initialized wpa_supplicant
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
(gekürzt)
wlx000f0075f040: SME: Trying to authenticate with c2:92:8b:ab:45:33 (SSID='Blckpanther' freq=2437 MHz)
wlx000f0075f040: Trying to associate with c2:92:8b:ab:45:33 (SSID='Blckpanther' freq=2437 MHz)
wlx000f0075f040: Associated with c2:92:8b:ab:45:33
wlx000f0075f040: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlx000f0075f040: WPA: Key negotiation completed with c2:92:8b:ab:45:33 [PTK=CCMP GTK=CCMP]
wlx000f0075f040: CTRL-EVENT-CONNECTED - Connection to c2:92:8b:ab:45:33 completed [id=0 id_str=]
my@bash $
my@bash $ jobs
[1]+ Läuft wpa_supplicant -i wlx000f0075f040 -c myPanther.config &
my@bash $
my@bash $
my@bash $ iwconfig
lo no wireless extensions.
enp0s3 no wireless extensions.
enp0s8 no wireless extensions.
wlx000f0075f040 IEEE 802.11 ESSID:"Blckpanther"
Mode:Managed Frequency:2.437 GHz Access Point: C2:92:8B:AB:45:33
Bit Rate=1 Mb/s Tx-Power=20 dBm
Retry short long limit:2 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=57/70 Signal level=-53 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
my@bash $
IP-Adresse via DHCP
Bevor nun mittels ‚dhclient‘ eine IP-Adresse von Android sollten wir das IPv4-Default-Gateway löschen:
my@bash $ ip -4 route
default via 192.168.2.1 dev enp0s3 proto static metric 100
169.254.0.0/16 dev enp0s3 scope link metric 1000
192.168.2.0/24 dev enp0s3 proto kernel scope link src 192.168.2.234 metric 100
my@bash $
my@bash $
my@bash $ ip route del default
my@bash $
my@bash $ ip -4 route
169.254.0.0/16 dev enp0s3 scope link metric 1000
192.168.2.0/24 dev enp0s3 proto kernel scope link src 192.168.2.234 metric 100
my@bash $
my@bash $ ping -c2 ping.de
ping: ping.de: Temporärer Fehler bei der Namensauflösung
my@bash $
my@bash $ dhclient wlx000f0075f040
my@bash $
my@bash $ ip -4 route
default via 192.168.43.156 dev wlx000f0075f040
169.254.0.0/16 dev enp0s3 scope link metric 1000
192.168.2.0/24 dev enp0s3 proto kernel scope link src 192.168.2.234 metric 100
192.168.43.0/24 dev wlx000f0075f040 proto kernel scope link src 192.168.43.180
my@bash $
my@bash $ ## >> Prima: das neue STD GW "192.168.43.156" ist da.
my@bash $
my@bash $ ping -c2 ping.de
PING ping.de (83.97.42.2) 56(84) Bytes Daten.
64 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=1 ttl=53 Zeit=31.7 ms
64 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=2 ttl=53 Zeit=31.6 ms
--- ping.de ping statistics ---
2 Pakete übertragen, 2 empfangen, 0% Paketverlust, Zeit 1002ms
rtt min/avg/max/mdev = 31.643/31.652/31.661/0.009 ms
my@bash $
my@bash $ ## >> Es läuft... - nun via WLAN-Tetering und Mobilfunkdatenkanal...
my@bash $
my@bash $
my@bash $ ip -4 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
inet 192.168.2.234/24 brd 192.168.2.255 scope global noprefixroute enp0s3
valid_lft forever preferred_lft forever
5: wlx000f0075f040: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
inet 192.168.43.180/24 brd 192.168.43.255 scope global dynamic wlx000f0075f040
valid_lft 3453sec preferred_lft 3453sec
my@bash $
my@bash $ ip -6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 2003:f4:e719:e182:a00:27ff:fe5a:81a1/64 scope global dynamic mngtmpaddr
valid_lft 14383sec preferred_lft 1783sec
inet6 fe80::a00:27ff:fe5a:81a1/64 scope link noprefixroute
valid_lft forever preferred_lft forever
my@bash $
Mit größeren Paketlängen und dem Pattern „deadbeef“ arbeiten:
my@bash $ ping -s 700 -p deadbeef ping.de
MUSTER: 0xdeadbeef
PING ping.de (83.97.42.2) 700(728) Bytes Daten.
708 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=1 ttl=53 Zeit=32.2 ms
708 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=2 ttl=53 Zeit=70.5 ms
708 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=3 ttl=53 Zeit=72.4 ms
708 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=4 ttl=53 Zeit=76.1 ms
708 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=5 ttl=53 Zeit=73.0 ms
708 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=6 ttl=53 Zeit=72.4 ms
708 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=7 ttl=53 Zeit=78.5 ms
708 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=8 ttl=53 Zeit=67.3 ms
708 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=9 ttl=53 Zeit=73.8 ms
708 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=10 ttl=53 Zeit=72.0 ms
708 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=17 ttl=53 Zeit=36.4 ms
708 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=18 ttl=53 Zeit=34.0 ms
708 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=19 ttl=53 Zeit=39.0 ms
708 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=20 ttl=53 Zeit=34.5 ms
708 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=21 ttl=53 Zeit=39.9 ms
wlx000f0075f040: CTRL-EVENT-DISCONNECTED bssid=c2:92:8b:ab:45:33 reason=14
wlx000f0075f040: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Von 192.168.43.180 icmp_seq=22 Zielhost nicht erreichbar
Von 192.168.43.180 icmp_seq=23 Zielhost nicht erreichbar
Von 192.168.43.180 icmp_seq=24 Zielhost nicht erreichbar
Von 192.168.43.180 icmp_seq=82 Zielhost nicht erreichbar
^C
--- ping.de ping statistics ---
84 Pakete übertragen, 21 empfangen, +61 Fehler, 75% Paketverlust, Zeit 92905ms
rtt min/avg/max/mdev = 32.248/60.576/78.518/17.767 ms, pipe 4
my@bash $
my@bash $ ## >> Der Abbruch wurde durch Deaktivieren des WLAN-Teterings ausgelöst.
my@bash $ jobs
[1]+ Läuft wpa_supplicant -i wlx000f0075f040 -c myPanther.config &
my@bash $
my@bash $ fg
wpa_supplicant -i wlx000f0075f040 -c myPanther.config
^Cwlx000f0075f040: CTRL-EVENT-DISCONNECTED bssid=c2:92:8b:ab:45:33 reason=3 locally_generated=1
nl80211: deinit ifname=wlx000f0075f040 disabled_11b_rates=0
wlx000f0075f040: CTRL-EVENT-TERMINATING
my@bash $
my@bash $ pgrep -alfi dhc
3736 dhclient wlx000f0075f040
my@bash $
my@bash $ killall dhclient
ZUSAMMENFASSUNG:
Passenden Treiber vorhanden?
dmesg | grep -i firmware`
, dann auchiwconfig
WLAN-Verbindung herstellen (mit wpasupplicant)
IP-Adresse dynamisch via WLAN-Schnittstelle beziehen
my@bash $ ## Zu a)
my@bash $ dmesg | grep -i firmware
[ 0.000000] [Firmware Bug]: TSC doesn't count with P0 frequency!
[ 545.675217] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[ 545.677590] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[ 4990.343006] ieee80211 phy1: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[ 4990.343043] ieee80211 phy1: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
my@bash $
my@bash $ ## Zu b)
my@bash $ wpa_passphrase 'Blckpanther' 'h0ddo7.xA' > myPanther.config
my@bash $
my@bash $ cat myPanther.config
network={
ssid="Blckpanther"
#psk="h0ddo7.xA"
psk=976f19ed8df60be7f08e840449606f4aca2affdc319d0d7cb3d32568bdb102f0
}
my@bash $
my@bash $ wpa_supplicant -i wlx000f0075f040 -c myPanther.config > /tmp/wlan.log 2>&1 &
[1] 3836
my@bash $
my@bash $
my@bash $ ## Zu c)
my@bash $ ip -4 addr show dev wlx000f0075f040
5: wlx000f0075f040: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
inet 192.168.43.180/24 brd 192.168.43.255 scope global dynamic wlx000f0075f040
valid_lft 2510sec preferred_lft 2510sec
my@bash $
my@bash $ ip -4 route
default via 192.168.43.156 dev wlx000f0075f040
169.254.0.0/16 dev enp0s3 scope link metric 1000
192.168.2.0/24 dev enp0s3 proto kernel scope link src 192.168.2.234 metric 100
192.168.43.0/24 dev wlx000f0075f040 proto kernel scope link src 192.168.43.180
my@bash $
my@bash $ ping -c3 ping.de
ping: ping.de: Temporärer Fehler bei der Namensauflösung
my@bash $
my@bash $
my@bash $ ip addr del 192.168.43.180/24 dev wlx000f0075f040
my@bash $
my@bash $ ip -4 addr show dev wlx000f0075f040
my@bash $
my@bash $ ip -4 route
169.254.0.0/16 dev enp0s3 scope link metric 1000
192.168.2.0/24 dev enp0s3 proto kernel scope link src 192.168.2.234 metric 100
my@bash $
my@bash $ ## Vorher ausgeführt: ip route del default
my@bash $ iwconfig
lo no wireless extensions.
enp0s3 no wireless extensions.
enp0s8 no wireless extensions.
wlx000f0075f040 IEEE 802.11 ESSID:"Blckpanther"
Mode:Managed Frequency:2.437 GHz Access Point: C2:92:8B:AB:45:33
Bit Rate=57.8 Mb/s Tx-Power=20 dBm
Retry short long limit:2 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=53/70 Signal level=-57 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:1 Invalid misc:60 Missed beacon:0
my@bash $
my@bash $ dhclient -v wlx000f0075f040
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlx000f0075f040/00:0f:00:75:f0:40
Sending on LPF/wlx000f0075f040/00:0f:00:75:f0:40
Sending on Socket/fallback
DHCPREQUEST for 192.168.43.180 on wlx000f0075f040 to 255.255.255.255 port 67 (xid=0x4b881a14)
DHCPACK of 192.168.43.180 from 192.168.43.100 (xid=0x141a884b)
bound to 192.168.43.180 -- renewal in 1482 seconds.
my@bash $
my@bash $ ping -c3 ping.de
PING ping.de (83.97.42.2) 56(84) Bytes Daten.
64 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=1 ttl=53 Zeit=33.4 ms
64 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=2 ttl=53 Zeit=41.8 ms
64 Bytes von lilly.ping.de (83.97.42.2): icmp_seq=3 ttl=53 Zeit=70.7 ms
--- ping.de ping statistics ---
3 Pakete übertragen, 3 empfangen, 0% Paketverlust, Zeit 2005ms
rtt min/avg/max/mdev = 33.427/48.623/70.663/15.953 ms
my@bash $
my@bash $ ## >> OK.
Verbindung seitens des Clients sauber abbauen:
my@bash $ ## release the current lease it has from the server:
my@bash $ dhclient -r -v wlx000f0075f040
Killed old client process
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlx000f0075f040/00:0f:00:75:f0:40
Sending on LPF/wlx000f0075f040/00:0f:00:75:f0:40
Sending on Socket/fallback
DHCPRELEASE of 192.168.43.180 on wlx000f0075f040 to 192.168.43.100 port 67 (xid=0x72cab248)
my@bash $
my@bash $ ip -4 addr show dev wlx000f0075f040
my@bash $
my@bash $ ip -4 route
169.254.0.0/16 dev enp0s3 scope link metric 1000
192.168.2.0/24 dev enp0s3 proto kernel scope link src 192.168.2.234 metric 100
my@bash $
my@bash $ iwconfig
lo no wireless extensions.
enp0s3 no wireless extensions.
enp0s8 no wireless extensions.
wlx000f0075f040 IEEE 802.11 ESSID:"Blckpanther"
Mode:Managed Frequency:2.437 GHz Access Point: C2:92:8B:AB:45:33
Bit Rate=1 Mb/s Tx-Power=20 dBm
Retry short long limit:2 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=55/70 Signal level=-55 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:1 Invalid misc:80 Missed beacon:0
my@bash $
my@bash $ jobs
[1]+ Läuft wpa_supplicant -i wlx000f0075f040 -c myPanther.config > /tmp/wlan.log 2>&1 &
my@bash $
my@bash $ kill %1
my@bash $
my@bash $ jobs
[1]+ Fertig wpa_supplicant -i wlx000f0075f040 -c myPanther.config > /tmp/wlan.log 2>&1
my@bash $
my@bash $ jobs
my@bash $
my@bash $ ## >> BEOBACHTUNG: Die blaue LED am Stick ist ausgegangen.
my@bash $
my@bash $ iwconfig
lo no wireless extensions.
enp0s3 no wireless extensions.
enp0s8 no wireless extensions.
wlx000f0075f040 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short long limit:2 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
my@bash $ ## >> Keine Funkwolke mehr assoziiert ;-)
Treibereinbindung auf Devuan Beowulf
Die Linux-Distribution entspricht in etwa Debian 10 ohne Systemd, im Vergleich zu Ubuntu gestaltet sich das Ganze aber deutlich schwieriger.
Nach dem Anstecken des WLAN-Sticks:
my@bash $ dmesg | tail -25
[ 2595.550690] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 3525.154301] usb 1-1: new high-speed USB device number 2 using ehci-pci
[ 3525.460878] usb 1-1: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[ 3525.460880] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3525.460882] usb 1-1: Product: 802.11 n WLAN
[ 3525.460883] usb 1-1: Manufacturer: Ralink
[ 3525.460884] usb 1-1: SerialNumber: 1.0
[ 3525.826356] usb 1-1: reset high-speed USB device number 2 using ehci-pci
[ 3526.111452] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[ 3526.997202] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected
[ 3527.009346] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 3527.009603] usbcore: registered new interface driver rt2800usb
[ 3527.015839] rt2800usb 1-1:1.0 wlx000f0075f040: renamed from wlan0
[ 7786.626921] usb 1-1: USB disconnect, device number 2
[13169.341586] usb 1-1: new high-speed USB device number 3 using ehci-pci
[13169.659319] usb 1-1: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[13169.659321] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[13169.659323] usb 1-1: Product: 802.11 n WLAN
[13169.659324] usb 1-1: Manufacturer: Ralink
[13169.659325] usb 1-1: SerialNumber: 1.0
[13169.909436] usb 1-1: reset high-speed USB device number 3 using ehci-pci
[13170.197606] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[13171.082109] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 5370 detected
[13171.090249] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[13171.098069] rt2800usb 1-1:1.0 wlx000f0075f040: renamed from wlan0
my@bash $
my@bash $ dmesg | grep -i firmware
[ 0.000000] [Firmware Bug]: TSC doesn't count with P0 frequency!
my@bash $
my@bash $
my@bash $ dmesg | grep -i -C3 firmware
[ 0.000000] Linux version 4.19.0-9-amd64 (debian-kernel@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07)
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.19.0-9-amd64 root=UUID=97801ac0-497b-4a19-9aee-1209aaee5773 ro quiet
[ 0.000000] [Firmware Bug]: TSC doesn't count with P0 frequency!
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
my@bash $
Hier liegt das Problem: keine klare Ansage, dass etwas fehlt (Ubuntu hatte gemeldet: „Loading firmware file ‚rt2870.bin‘“)!
my@bash $ iwconfig
wlx000f0075f040 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm
Retry short long limit:2 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
eth0 no wireless extensions.
lo no wireless extensions.
eth1 no wireless extensions.
my@bash $
my@bash $ whatis iw
iw (8) - show / manipulate wireless devices and their configuration
my@bash $
my@bash $ ## >> Erforderliche Debian-Pakete: 'wireless-tools', 'iw'
my@bash $
my@bash $ iw dev
phy#1
Interface wlx000f0075f040
ifindex 5
wdev 0x100000001
addr 00:0f:00:75:f0:40
type managed
txpower 0.00 dBm
my@bash $
my@bash $ iw dev
phy#1
Interface wlx000f0075f040
ifindex 5
wdev 0x100000001
addr 00:0f:00:75:f0:40
type managed
txpower 0.00 dBm
my@bash $
my@bash $ ## >> Auch das neue Tool listet die Schnittstelle auf.
Testen, ob das Device wirklich zum Scannen bereit ist:
(Alternativ mit den alten Tools: iwlist scan
)
my@bash $ iw dev wlx000f0075f040 scan
command failed: Network is down (-100)
my@bash $
my@bash $ ## >> Wie befürchtet: sofortige Fehlermeldung.
my@bash $
my@bash $ whatis apt-file
apt-file (1) - - APT package searching utility -- command-line interface
my@bash $
my@bash $ ## >> Paket 'apt-file' ist separat zu installieren, danach 'apt-file update' ausführen.
my@bash $
my@bash $ ## (Unter Ubuntu: /lib/firmware/rt2870.bin)
my@bash $
my@bash $ apt-file search rt2870.bin
my@bash $
my@bash $ ## >> Kein Treffer, weil es sich im "contrib" oder "non-free" Repo befindet.
my@bash $
my@bash $ apt-get install firmware-ralink
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
firmware-ralink ist schon die neueste Version (20190114-2).
Das folgende Paket wurde automatisch installiert und wird nicht mehr benötigt:
libjsoncpp1
Verwenden Sie »apt autoremove«, um es zu entfernen.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 8 nicht aktualisiert.
my@bash $
my@bash $
my@bash $ cat /etc/apt/sources.list
## package repositories
deb http://deb.devuan.org/merged beowulf main
deb http://deb.devuan.org/merged beowulf-updates main
deb http://deb.devuan.org/merged beowulf-security main
#deb http://deb.devuan.org/merged beowulf-backports main
## source repositories
#deb-src http://deb.devuan.org/merged beowulf main
#deb-src http://deb.devuan.org/merged beowulf-updates main
#deb-src http://deb.devuan.org/merged beowulf-security main
#deb-src http://deb.devuan.org/merged beowulf-backports main
my@bash $
my@bash $ dpkg -l firmware-ralink
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name Version Architektur Beschreibung
+++-===============-============-============-==========================================================
ii firmware-ralink 20190114-2 all Binary firmware for Ralink wireless cards (dummmy package)
my@bash $
my@bash $ ## >> Verwirrung pur: das Paket ist zwar installiert, aber OHNE die eigentlichen Files (Debian macht die
my@bash $ ## Installation von nicht freier Software extra schwer!)
my@bash $ apt-cache depends firmware-ralink
firmware-ralink
Hängt ab von: firmware-misc-nonfree
my@bash $
my@bash $
my@bash $ apt-get install firmware-misc-nonfree
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
firmware-misc-nonfree ist schon die neueste Version (20190114-2).
firmware-misc-nonfree wurde als manuell installiert festgelegt.
Das folgende Paket wurde automatisch installiert und wird nicht mehr benötigt:
libjsoncpp1
Verwenden Sie »apt autoremove«, um es zu entfernen.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 8 nicht aktualisiert.
my@bash $
my@bash $ dpkg -l firmware-misc-nonfree
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name Version Architektur Beschreibung
+++-=====================-============-============-=======================================================
ii firmware-misc-nonfree 20190114-2 all Binary firmware for various drivers in the Linux kernel
my@bash $
my@bash $
my@bash $ find /lib/firmware/ -name "rt2870*"
/lib/firmware/rt2870.bin
my@bash $
my@bash $
my@bash $
my@bash $ dmesg | less
my@bash $
my@bash $
my@bash $ dmesg | grep -iE 'ralink|5370'
[ 3525.460878] usb 1-1: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[ 3525.460883] usb 1-1: Manufacturer: Ralink
[ 3526.997202] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected
[13169.659319] usb 1-1: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[13169.659324] usb 1-1: Manufacturer: Ralink
[13171.082109] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 5370 detected
my@bash $
my@bash $
my@bash $
my@bash $
my@bash $ file /lib/firmware/rt2870.bin
/lib/firmware/rt2870.bin: data
my@bash $
my@bash $ ls -l /lib/firmware/rt2870.bin
-rw-r--r-- 1 root root 8192 Aug 23 2019 /lib/firmware/rt2870.bin
my@bash $
my@bash $
my@bash $ uname -r
4.19.0-9-amd64
my@bash $
my@bash $
my@bash $
my@bash $ dpkg -l firmware-misc-nonfree
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name Version Architektur Beschreibung
+++-=====================-============-============-=======================================================
ii firmware-misc-nonfree 20190114-2 all Binary firmware for various drivers in the Linux kernel
my@bash $
my@bash $ apt-cache policy firmware-misc-nonfree
firmware-misc-nonfree:
Installiert: 20190114-2
Installationskandidat: 20190114-2
Versionstabelle:
*** 20190114-2 100
100 /var/lib/dpkg/status
my@bash $
my@bash $ ## >> Vermutung: alles nur 'dummy'-Packages!
my@bash $
my@bash $
my@bash $ ## Am besten mal die non-free Quellen dazunehmen:
my@bash $ vi /etc/apt/sources.list
my@bash $ ## >> Jeweils "contrib non-free" angehängt.
my@bash $
my@bash $
my@bash $ grep -v ^# /etc/apt/sources.list
deb http://deb.devuan.org/merged beowulf main contrib non-free
deb http://deb.devuan.org/merged beowulf-updates main contrib non-free
deb http://deb.devuan.org/merged beowulf-security main contrib non-free
my@bash $
my@bash $ apt-get update
OK:1 http://deb.devuan.org/merged beowulf InRelease
OK:2 http://deb.devuan.org/merged beowulf-updates InRelease
OK:3 http://deb.devuan.org/merged beowulf-security InRelease
Holen:4 http://deb.devuan.org/merged beowulf/contrib amd64 Packages [50,3 kB]
Holen:5 http://deb.devuan.org/merged beowulf/contrib Translation-en [44,1 kB]
Holen:6 http://deb.devuan.org/merged beowulf/contrib amd64 Contents (deb) [89,7 kB]
Holen:7 http://deb.devuan.org/merged beowulf/non-free amd64 Packages [88,1 kB]
Holen:8 http://deb.devuan.org/merged beowulf/non-free Translation-en [88,2 kB]
Holen:9 http://deb.devuan.org/merged beowulf/non-free amd64 Contents (deb) [767 kB]
Holen:10 http://deb.devuan.org/merged beowulf-updates/contrib amd64 Contents (deb) [36 B]
Holen:11 http://deb.devuan.org/merged beowulf-updates/non-free amd64 Packages [608 B]
Holen:12 http://deb.devuan.org/merged beowulf-updates/non-free Translation-en [673 B]
Holen:13 http://deb.devuan.org/merged beowulf-updates/non-free amd64 Contents (deb) [194 B]
Holen:14 http://deb.devuan.org/merged beowulf-security/contrib amd64 Contents (deb) [36 B]
Holen:15 http://deb.devuan.org/merged beowulf-security/non-free amd64 Packages [572 B]
Holen:16 http://deb.devuan.org/merged beowulf-security/non-free amd64 Contents (deb) [36 B]
Es wurden 1.130 kB in 2 s geholt (650 kB/s).
Paketlisten werden gelesen... Fertig
my@bash $
my@bash $
my@bash $ apt-get install firmware-ralink
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
firmware-ralink ist schon die neueste Version (20190114-2).
Das folgende Paket wurde automatisch installiert und wird nicht mehr benötigt:
libjsoncpp1
Verwenden Sie »apt autoremove«, um es zu entfernen.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 8 nicht aktualisiert.
my@bash $
my@bash $ apt-get install firmware-ralink --reinstall
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Das folgende Paket wurde automatisch installiert und wird nicht mehr benötigt:
libjsoncpp1
Verwenden Sie »apt autoremove«, um es zu entfernen.
0 aktualisiert, 0 neu installiert, 1 erneut installiert, 0 zu entfernen und 8 nicht aktualisiert.
Es müssen 17,7 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
Holen:1 http://deb.devuan.org/merged beowulf/non-free amd64 firmware-ralink all 20190114-2 [17,7 kB]
Es wurden 17,7 kB in 0 s geholt (158 kB/s).
(Lese Datenbank ... 115131 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../firmware-ralink_20190114-2_all.deb ...
Entpacken von firmware-ralink (20190114-2) über (20190114-2) ...
firmware-ralink (20190114-2) wird eingerichtet ...
my@bash $
my@bash $ apt-cache policy firmware-ralink
firmware-ralink:
Installiert: 20190114-2
Installationskandidat: 20190114-2
Versionstabelle:
*** 20190114-2 500
500 http://deb.devuan.org/merged beowulf/non-free amd64 Packages
100 /var/lib/dpkg/status
my@bash $
my@bash $
my@bash $ apt-cache policy firmware-misc-nonfree
firmware-misc-nonfree:
Installiert: 20190114-2
Installationskandidat: 20190114-2
Versionstabelle:
*** 20190114-2 500
500 http://deb.devuan.org/merged beowulf/non-free amd64 Packages
100 /var/lib/dpkg/status
my@bash $
my@bash $
my@bash $
my@bash $ find /lib/firmware/ -cmin -5
my@bash $
my@bash $ watch -n1 -d "dmesg | tail -25"
Every 1,0s: dmesg | tail -25 devuanBeo: Fri Mar 19 12:14:06 2021
[ 3525.154301] usb 1-1: new high-speed USB device number 2 using ehci-pci
[ 3525.460878] usb 1-1: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[ 3525.460880] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3525.460882] usb 1-1: Product: 802.11 n WLAN
[ 3525.460883] usb 1-1: Manufacturer: Ralink
[ 3525.460884] usb 1-1: SerialNumber: 1.0
[ 3525.826356] usb 1-1: reset high-speed USB device number 2 using ehci-pci
[ 3526.111452] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[ 3526.997202] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected
[ 3527.009346] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 3527.009603] usbcore: registered new interface driver rt2800usb
[ 3527.015839] rt2800usb 1-1:1.0 wlx000f0075f040: renamed from wlan0
[ 7786.626921] usb 1-1: USB disconnect, device number 2
[13169.341586] usb 1-1: new high-speed USB device number 3 using ehci-pci
[13169.659319] usb 1-1: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[13169.659321] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[13169.659323] usb 1-1: Product: 802.11 n WLAN
[13169.659324] usb 1-1: Manufacturer: Ralink
[13169.659325] usb 1-1: SerialNumber: 1.0
[13169.909436] usb 1-1: reset high-speed USB device number 3 using ehci-pci
[13170.197606] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[13171.082109] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 5370 detected
[13171.090249] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[13171.098069] rt2800usb 1-1:1.0 wlx000f0075f040: renamed from wlan0
[15409.480841] usb 1-1: USB disconnect, device number 3
[13169.659319] usb 1-1: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[13169.659321] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[13169.659323] usb 1-1: Product: 802.11 n WLAN
[13169.659324] usb 1-1: Manufacturer: Ralink
[13169.659325] usb 1-1: SerialNumber: 1.0
[13169.909436] usb 1-1: reset high-speed USB device number 3 using ehci-pci
[13170.197606] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[13171.082109] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 5370 detected
[13171.090249] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[13171.098069] rt2800usb 1-1:1.0 wlx000f0075f040: renamed from wlan0
[15409.480841] usb 1-1: USB disconnect, device number 3
[15488.788958] usb 1-1: new high-speed USB device number 4 using ehci-pci
[15489.111489] usb 1-1: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[15489.111491] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[15489.111493] usb 1-1: Product: 802.11 n WLAN
[15489.111494] usb 1-1: Manufacturer: Ralink
[15489.111495] usb 1-1: SerialNumber: 1.0
[15489.357111] usb 1-1: reset high-speed USB device number 4 using ehci-pci
[15489.644844] ieee80211 phy2: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[15490.532803] ieee80211 phy2: rt2x00_set_rf: Info - RF chipset 5370 detected
[15490.541008] ieee80211 phy2: Selected rate control algorithm 'minstrel_ht'
[15490.547826] rt2800usb 1-1:1.0 wlx000f0075f040: renamed from wlan0
my@bash $
my@bash $ dmesg | grep -i -C3 firmware
[ 0.000000] Linux version 4.19.0-9-amd64 (debian-kernel@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07)
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.19.0-9-amd64 root=UUID=97801ac0-497b-4a19-9aee-1209aaee5773 ro quiet
[ 0.000000] [Firmware Bug]: TSC doesn't count with P0 frequency!
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
my@bash $
my@bash $
my@bash $ iw dev wlx000f0075f040 scan
command failed: Network is down (-100)
my@bash $
my@bash $ iwlist scan
wlx000f0075f040 Interface doesn't support scanning : Network is down
eth0 Interface doesn't support scanning.
lo Interface doesn't support scanning.
eth1 Interface doesn't support scanning.
my@bash $
my@bash $ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 08:00:27:f3:63:0f brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 08:00:27:b6:04:95 brd ff:ff:ff:ff:ff:ff
6: wlx000f0075f040: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 00:0f:00:75:f0:40 brd ff:ff:ff:ff:ff:ff
my@bash $
my@bash $
my@bash $ ## Ist es evl. doch nur wegen "Network is down"? Siehe hier:
my@bash $ ip link show dev wlx000f0075f040
6: wlx000f0075f040: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 00:0f:00:75:f0:40 brd ff:ff:ff:ff:ff:ff
my@bash $
my@bash $ ## >> Stimmt: irgendwie "DOWN"
my@bash $
my@bash $
my@bash $ ip link set up dev wlx000f0075f040
my@bash $
my@bash $ ip link show dev wlx000f0075f040
6: wlx000f0075f040: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether 00:0f:00:75:f0:40 brd ff:ff:ff:ff:ff:ff
my@bash $
my@bash $ dmesg | grep -i firmware
[ 0.000000] [Firmware Bug]: TSC doesn't count with P0 frequency!
[15771.923865] ieee80211 phy2: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[15771.923899] rt2800usb 1-1:1.0: firmware: direct-loading firmware rt2870.bin
[15771.923902] ieee80211 phy2: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
my@bash $
my@bash $ ## >> Und schon wurde der Treiber nachgeladen, hier leider erst NACH dem Aktivieren der Karte!
Jetzt trauen wir uns wieder ans Scannen heran:
my@bash $ iw dev wlx000f0075f040 scan | grep -i ssid
SSID: o2-WLAN43
SSID: Blckpanther
my@bash $ ## >> funktioniert nun auch unter Devuan. :-) :-)
Interface aktivsetzen
Merke: Bei manchen Distributionen muss die NIC zuerst aktiviert werden, dann erst kann sie verwendet werden:
ifconfig <DEVICE> up
(neu:ip link set up dev <DEVICE>
)iwconfig <DEVICE> essid MeinHeimnetz key s:MeinWEPKey123
Bei unsicherer WEP-Verschlüsselung kann man direkt ‚iwconfig‘ nehmen
Unter Verwendung des neuen Tools:
iw dev wlan0 connect your_essid key 0:your_key
, Quelle https://donnutcompute.wordpress.com/2014/04/20/connect-to-wi-fi-via-command-line/
dhclient <DEVICE>
(weitere Clients sind: dhcpcd, pump, udhcpc)
Anwendnungsbeispiele für ‚iw‘
my@bash $ iw phy
Wiphy phy2
max # scan SSIDs: 4
max scan IEs length: 2257 bytes
max # sched scan SSIDs: 0
max # match sets: 0
(gekürzt)
software interface modes (can always be added):
* AP/VLAN
* monitor
valid interface combinations:
* #{ AP, mesh point } <= 8,
total <= 8, #channels <= 1
my@bash $
my@bash $ iw dev
phy#2
Interface wlx000f0075f040
ifindex 6
wdev 0x200000001
addr 00:0f:00:75:f0:40
type managed
txpower 20.00 dBm
my@bash $
my@bash $ iw dev wlx000f0075f040 scan | grep -i ssid
SSID: o2-WLAN43
SSID: Blckpanther
my@bash $
my@bash $ iw dev wlx000f0075f040 get power_save
Power save: off
my@bash $
my@bash $ iw dev wlx000f0075f040 set power_save on
my@bash $
my@bash $ iw dev wlx000f0075f040 get power_save
Power save: on
my@bash $
Siehe dazu auch https://wiki.ubuntuusers.de/iw/
Anwendnungsbeispiele für ‚iwlist‘
Hinweis: Das Tool stammt aus den alten Paket ‚wireless-tools‘.
my@bash $ iwconfig
wlx000f0075f040 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short long limit:2 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
eth0 no wireless extensions.
lo no wireless extensions.
eth1 no wireless extensions.
my@bash $
my@bash $ iwlist wlx000f0075f040 frequency
wlx000f0075f040 14 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Channel 12 : 2.467 GHz
Channel 13 : 2.472 GHz
Channel 14 : 2.484 GHz
my@bash $
my@bash $ iwlist wlx000f0075f040 scanning | grep -i ssid
my@bash $
Ausblick: der NetworkManager kann dies auch alles sehr schön:
=> https://nullr0ute.com/2016/09/connect-to-a-wireless-network-using-command-line-nmcli/
Dazu diese Braindumps beachten (‚nmcli‘): => https://pemmann.de/cc/Doc/Braindumps/LPI-102/500v2020/102-by.axel-mixed.txt
WLAN-Verbindung via NetworkManager aufbauen
Wir nehmen dazu wieder Ubuntu her, bei dem es eine bessere Treiberunterstützung gibt.
Dabei verfahren wir nach https://nullr0ute.com/2016/09/connect-to-a-wireless-network-using-command-line-nmcli/.
my@bash $ iwconfig
lo no wireless extensions.
enp0s3 no wireless extensions.
enp0s8 no wireless extensions.
my@bash $
my@bash $ iwconfig
lo no wireless extensions.
enp0s3 no wireless extensions.
enp0s8 no wireless extensions.
wlx000f0075f040 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short long limit:2 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
my@bash $
my@bash $
my@bash $ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 08:00:27:5a:81:a1 brd ff:ff:ff:ff:ff:ff
3: enp0s8: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
link/ether 08:00:27:05:fb:59 brd ff:ff:ff:ff:ff:ff
6: wlx000f0075f040: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
link/ether 00:0f:00:75:f0:40 brd ff:ff:ff:ff:ff:ff
my@bash $
my@bash $ nmcli dev
DEVICE TYPE STATE CONNECTION
enp0s3 ethernet verbunden netplan-enp0s3
wlx000f0075f040 wifi nicht verbunden --
enp0s8 ethernet nicht verfügbar --
lo loopback nicht verwaltet --
my@bash $
my@bash $ nmcli con
NAME UUID TYPE DEVICE
netplan-enp0s3 1eef7e45-3b9d-3043-bee3-fc5925c90273 ethernet enp0s3
Blckpanther b89ce2c1-98a3-4a23-b9ff-fbe376fb6de3 wifi --
netplan-enp0s8 9a683faa-2cc7-384f-9230-8beaf91f9f29 ethernet --
my@bash $
my@bash $
my@bash $ nmcli radio
WIFI-HW WIFI WWAN-HW WWAN
aktiviert aktiviert aktiviert aktiviert
my@bash $
my@bash $
my@bash $ nmcli device wifi list
IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY
C2:92:8B:AB:45:33 Blckpanther Infra 6 117 Mbit/s 100 ▂▄▆█ WPA2
my@bash $
my@bash $
my@bash $ nmcli device wifi rescan
my@bash $
my@bash $ nmcli device wifi list
IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY
C2:92:8B:AB:45:33 Blckpanther Infra 6 117 Mbit/s 100 ▂▄▆█ WPA2
my@bash $
my@bash $ nmcli device wifi connect Blckpanther password h0ddo7.xA
Gerät »wlx000f0075f040« wurde erfolgreich mit »b89ce2c1-98a3-4a23-b9ff-fbe376fb6de3« aktiviert.
my@bash $
my@bash $ ## >> Hurra!
my@bash $
my@bash $ ip -4 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
inet 192.168.2.234/24 brd 192.168.2.255 scope global noprefixroute enp0s3
valid_lft forever preferred_lft forever
6: wlx000f0075f040: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
inet 192.168.43.180/24 brd 192.168.43.255 scope global dynamic noprefixroute wlx000f0075f040
valid_lft 3559sec preferred_lft 3559sec
my@bash $
my@bash $ ip -4 route
default via 192.168.43.23 dev wlx000f0075f040 proto dhcp metric 600
169.254.0.0/16 dev enp0s3 scope link metric 1000
192.168.2.0/24 dev enp0s3 proto kernel scope link src 192.168.2.234 metric 100
192.168.43.0/24 dev wlx000f0075f040 proto kernel scope link src 192.168.43.180 metric 600
my@bash $
my@bash $ nmcli
wlx000f0075f040: verbunden zu Blckpanther
"Ralink RT5370"
wifi (rt2800usb), 00:0F:00:75:F0:40, hw, mtu 1500
ip4-Vorgabe
inet4 192.168.43.180/24
route4 0.0.0.0/0
route4 192.168.43.0/24
inet6 fe80::dd0c:a969:4323:268b/64
route6 fe80::/64
route6 ff00::/8
enp0s3: verbunden zu netplan-enp0s3
"Intel 82540EM"
ethernet (e1000), 08:00:27:5A:81:A1, hw, mtu 1500
ip6-Vorgabe
inet4 192.168.2.234/24
route4 169.254.0.0/16
route4 192.168.2.0/24
inet6 2003:f4:e719:e182:a00:27ff:fe5a:81a1/64
inet6 fe80::a00:27ff:fe5a:81a1/64
route6 2003:f4:e719:e182::/64
route6 fe80::/64
route6 ::/0
route6 ff00::/8
enp0s8: nicht verfügbar
"Intel 82540EM"
ethernet (e1000), 08:00:27:05:FB:59, hw, mtu 1500
lo: nicht verwaltet
"lo"
loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536
DNS configuration:
servers: 192.168.43.23
interface: wlx000f0075f040
servers: 194.25.2.129 8.8.8.8
domains: dom1.test
interface: enp0s3
Rufen Sie »nmcli device show« auf, um vollständige Informationen über bekannte Geräte abzurufen
und »nmcli connection show« für eine Übersicht über aktive Verbindungsprofile.
Die Hilfeseiten nmcli(1) und nmcli-examples(7) geben vollständige Aufrufbeschreibungen.
my@bash $
my@bash $
my@bash $ nmcli device wifi list
IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY
* C2:92:8B:AB:45:33 Blckpanther Infra 6 117 Mbit/s 93 ▂▄▆█ WPA2
my@bash $
my@bash $
my@bash $ nmcli device
DEVICE TYPE STATE CONNECTION
wlx000f0075f040 wifi verbunden Blckpanther
enp0s3 ethernet verbunden netplan-enp0s3
enp0s8 ethernet nicht verfügbar --
lo loopback nicht verwaltet --
my@bash $
my@bash $
Kontrolle, Tests
my@bash $ ip -4 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
inet 192.168.2.234/24 brd 192.168.2.255 scope global noprefixroute enp0s3
valid_lft forever preferred_lft forever
6: wlx000f0075f040: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
inet 192.168.43.180/24 brd 192.168.43.255 scope global dynamic noprefixroute wlx000f0075f040
valid_lft 3217sec preferred_lft 3217sec
my@bash $
my@bash $ ip r
default via 192.168.43.23 dev wlx000f0075f040 proto dhcp metric 600
169.254.0.0/16 dev enp0s3 scope link metric 1000
192.168.2.0/24 dev enp0s3 proto kernel scope link src 192.168.2.234 metric 100
192.168.43.0/24 dev wlx000f0075f040 proto kernel scope link src 192.168.43.180 metric 600
my@bash $
my@bash $
my@bash $
my@bash $ netplan --help
usage: /usr/sbin/netplan [-h] [--debug] ...
Network configuration in YAML
optional arguments:
-h, --help show this help message and exit
--debug Enable debug messages
Available commands:
help Show this help message
apply Apply current netplan config to running system
generate Generate backend specific configuration files from /etc/netplan/*.yaml
get Get a setting by specifying a nested key like "ethernets.eth0.addresses", or "all"
info Show available features
ip Retrieve IP information from the system
set Add new setting by specifying a dotted key=value pair like ethernets.eth0.dhcp4=true
try Try to apply a new netplan config to running system, with automatic rollback
my@bash $
my@bash $
my@bash $ ifup
Der Befehl 'ifup' wurde nicht gefunden, kann aber installiert werden mit:
apt install ifupdown # version 0.8.35ubuntu1, or
apt install netscript-2.4 # version 5.5.3
my@bash $
my@bash $ ip link set down dev enp0s3
my@bash $
my@bash $ ip -4 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
inet 192.168.2.234/24 brd 192.168.2.255 scope global noprefixroute enp0s3
valid_lft forever preferred_lft forever
6: wlx000f0075f040: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
inet 192.168.43.180/24 brd 192.168.43.255 scope global dynamic noprefixroute wlx000f0075f040
valid_lft 3042sec preferred_lft 3042sec
my@bash $
my@bash $ traceroute -n ping.de
traceroute to ping.de (83.97.42.2), 30 hops max, 60 byte packets
1 192.168.43.23 3.977 ms 4.612 ms 6.671 ms
2 192.168.2.1 57.129 ms 57.898 ms 59.598 ms
3 62.155.247.115 59.616 ms 59.614 ms 61.698 ms
4 62.154.43.138 61.741 ms 61.746 ms 63.747 ms
5 80.150.171.254 63.823 ms 63.819 ms 82.372 ms
6 217.71.101.250 104.889 ms 102.727 ms 102.374 ms
7 195.253.6.80 100.344 ms 49.779 ms 49.099 ms
8 195.253.7.242 47.336 ms 47.797 ms 47.828 ms
9 83.97.42.2 47.413 ms 47.457 ms 75.536 ms
my@bash $
my@bash $
my@bash $ ip addr del 192.168.2.234/24 dev enp0s3
RTNETLINK answers: Cannot assign requested address
my@bash $
my@bash $ ip -4 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
6: wlx000f0075f040: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
inet 192.168.43.180/24 brd 192.168.43.255 scope global dynamic noprefixroute wlx000f0075f040
valid_lft 2963sec preferred_lft 2963sec
my@bash $
my@bash $
my@bash $ traceroute -n ping.de
traceroute to ping.de (83.97.42.2), 30 hops max, 60 byte packets
1 192.168.43.23 4.269 ms 4.281 ms 5.941 ms
2 192.168.2.1 20.094 ms 20.251 ms 20.249 ms <<<<<--- geht noch über den DSL-Router ins Inet
3 62.155.247.115 20.302 ms 33.865 ms 33.948 ms
4 62.154.43.138 54.421 ms 54.516 ms 56.722 ms
5 80.150.171.254 90.460 ms 90.563 ms 90.563 ms
6 217.71.101.250 90.606 ms 133.916 ms 134.097 ms
7 195.253.6.80 132.701 ms 118.850 ms 118.836 ms
8 195.253.7.242 167.192 ms 168.611 ms 154.915 ms
9 83.97.42.2 156.688 ms 136.251 ms 136.275 ms
my@bash $
my@bash $ tracepath -n ping.de
1?: [LOCALHOST] pmtu 1500
1: 192.168.43.23 47.658ms
1: 192.168.43.23 3.341ms
2: 192.168.2.1 14.561ms
3: 192.168.2.1 10.949ms pmtu 1492
3: 62.155.247.115 16.966ms
4: 62.154.43.138 35.435ms asymm 7
5: 80.150.171.254 37.004ms asymm 8
6: 217.71.101.250 37.789ms asymm 9
7: 195.253.6.80 47.871ms asymm 10
8: 195.253.7.242 37.007ms asymm 11
9: 83.97.42.2 35.692ms reached
Resume: pmtu 1492 hops 9 back 12
my@bash $
my@bash $
my@bash $
my@bash $ tracepath -n ping.de
1?: [LOCALHOST] pmtu 1492
1: 192.168.43.23 6.154ms
1: 192.168.43.23 5.630ms
Nach dem Deaktivieren des WLANs auf dem Handy:
2: keine Antwort <<<<<---- geht NICHT mehr über den DSL-Router ins Inet, sondern via Mobilfunk
3: 10.81.85.1 527.553ms
4: 10.81.85.22 52.273ms asymm 5
5: 10.81.121.145 49.655ms
6: 195.71.45.209 58.813ms
7: 62.53.9.53 52.508ms asymm 8
8: 80.81.192.74 43.232ms asymm 11
9: 217.71.96.10 61.681ms asymm 12
10: 217.71.101.250 57.093ms asymm 13
11: 195.253.6.80 43.611ms asymm 14
12: 195.253.7.242 49.794ms asymm 15
13: 83.97.42.2 72.138ms reached
Resume: pmtu 1492 hops 13 back 16
my@bash $
my@bash $
my@bash $ tracepath -n ping.de
1?: [LOCALHOST] pmtu 1492
1: 192.168.43.23 3.952ms
1: 192.168.43.23 5.042ms
2: keine Antwort
3: 10.81.85.1 512.291ms
4: 10.81.85.22 46.671ms asymm 5
5: 10.81.121.145 59.612ms
6: 195.71.45.209 61.627ms
7: 62.53.10.51 67.016ms asymm 8
8: 80.81.192.74 46.446ms asymm 11
9: 217.71.96.10 69.221ms asymm 12
10: 217.71.101.250 48.055ms asymm 13
11: 195.253.6.80 62.352ms asymm 14
12: 195.253.7.242 62.013ms asymm 15
13: 83.97.42.2 64.573ms reached
Resume: pmtu 1492 hops 13 back 16
my@bash $
my@bash $ nmcli device wifi list
IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY
* C2:92:8B:AB:45:33 Blckpanther Infra 6 117 Mbit/s 91 ▂▄▆█ WPA2
my@bash $
Passt - die Sache läuft.