View previous topic :: View next topic |
Author |
Message |
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1481 Location: Richmond Hill, Canada
|
Posted: Tue Nov 07, 2023 10:07 pm Post subject: |
|
|
brendlefly62,
Thank you for the feed back And sorry for the slow response, I am learning more on Gentoo's network management than ever
In reviewing this entire thread I realize that it was not cleared that you system network management setup is based on which one of Gentoo's method- dhcpcd
- Netifrc
- Systemd
I believe you are using netifrc, however just in case I guess wrong please check if you have dhcpcd in openrc any run level byif dhcpcd exist in default runlevel or "needed/wanted" runlevel please let me know and we should discuss about this further. On the other hand if you are using systemd as network management than my suggestion here are all wrong.
Assuming netifrc is network management manager
Your /etc/conf.d/net could have following /etc/conf.d/net: | modules_eth3="wpa_supplicant"
config_eth3="dhcp"
# nodns -- disable overwrite /etc/resolv.conf (i.e. not calling hook resolv.conf)
dhcp_eth3="nodns"
# --nohook wpa_supplicant -- Not calling dhcpcd hook script /usr/share/dhcpcd/hooks/10-wpa_supplicant, wast of time.
# --timeout 10 -- wait for 10 seconds for ip address, otherwise fail startup.
# --ipv4only -- just get IPv4 address, no IPv6 request send out.
dhcpcd_eth3="--timeout 10 --ipv4only --nohook wpa_supplicant -j /var/log/dhcpcd-eth3.log"
# Add -d if you wish to see more debug information
wpa_supplicant_eth3="-f /var/log/wpa_supplicant.log" |
I notice in your post when wpa_supplicant successful establish connection it actually use CCMP instead TKIP so I prove a updated /etc/modprobe.d/wl.conf. The primary changes are replace lib80211_crypt_tkip with lib80211_crypt_ccmp /etc/modprobe.d/wl.conf: | # wl module conf for modprobe
blacklist ssb
blacklist bcma
blacklist b43
blacklist brcmsmac
blacklist brcmfmac
# cfg80211 + mac80211
softdep wl pre: lib80211 lib80211_crypt_ccmp |
No changes required for /etc/wpa_supplicant/wpa_supplicant.conf
Please add net.eth3 back to default level Code: | rc-update add net.eth3 default |
While we are in the rc service topic, Please ensure service "wpa_supplicant" is not setup Code: | rc-update del wpa_supplicant default
rc-service wpa_supplicant stop |
After finish all changes above you can try to either "reboot" or start rc service net.eth3 Code: | rc-service net.eth3 start |
If thing still not work out as planned please post /var/log/wpa_supplicant.log, /var/log/dhcpcd-eth3.log and dmesg that relevant to modules, wpa_supplicant and dhcp. |
|
Back to top |
|
|
brendlefly62 Apprentice
Joined: 19 Dec 2009 Posts: 156
|
Posted: Fri Nov 10, 2023 1:18 am Post subject: |
|
|
Hi, pingtoo. I'm out of town, and I'll get on the rest of this when I get back. Meanwhile - yes the system is netifrc. I will verify, but I'm pretty sure neither wpa_supplicant nor dhcpcd are in any runlevel. Both are installed and configured, and they are started by other runlevel services that depend on them. E.g. starting /etc/init.d/net.eth3 will require both wpa_sypplicant and dhcpcd. More to follow |
|
Back to top |
|
|
brendlefly62 Apprentice
Joined: 19 Dec 2009 Posts: 156
|
Posted: Sun Nov 12, 2023 3:26 pm Post subject: |
|
|
Hello again, pingtoo. I'm home; sorry for the delay. As mentioned above, yes - netifrc on openrc. I've also verified that dhcpcd is not running in any openrc runlevel -- Code: | $ rc-status --all | grep dhcp
<no output> |
I have updated /etc/modprobe.d/wl.conf as you recommended -- Code: | # cat /etc/modprobe.d/wl.conf
#...
softdep wl pre: lib80211 lib80211_crypt_tkip
softdep wl pre: lib80211 lib80211_crypt_ccmp
| (Note that my "blacklist" entries are in /etc/modprobe.d/blacklist.conf, just to keep things cleaner - and they appear to be effective)
I also ensured wpa_supplicant is not set up -- Code: | # find /etc/runlevels/ -iname 'wpa*'
<no output>
# rc-status --all | grep wpa
<no output>
# rc-update del wpa_supplicant
* rc-update: service `wpa_supplicant' is not in the runlevel `default'
# rc-service wpa_supplicant stop
* WARNING: wpa_supplicant is already stopped |
I also made the changes you recommended in /etc/conf.d/net -- Code: | # Extra wifi via on-board bcm4352 (wl.ko)
modules_eth3="wpa_supplicant"
config_eth3="dhcp"
# nodns -- disable overwrite /etc/resolv.conf (i.e. not calling hook resolv.conf)
dhcp_eth3="nodns"
# --nohook wpa_supplicant -- Not calling dhcpcd hook script /usr/share/dhcpcd/hooks/10-wpa_supplicant, wast of time.
# --timeout 10 -- wait for 10 seconds for ip address, otherwise fail startup.
# --ipv4only -- just get IPv4 address, no IPv6 request send out.
dhcpcd_eth3="--timeout 10 --ipv4only --nohook wpa_supplicant -j -d /var/log/dhcpcd-eth3.log"
# Add -d if you wish to see more debug information
wpa_supplicant_eth3="-f /var/log/wpa_supplicant.log" |
I added net.eth3 back to the default runlevel and started it-- Code: | # rc-update add net.eth3 default
# /etc/init.d/net.eth3 start |
I noted that ifconfig shows eth3 UP but gives it inet6, no ipv4 address...
Here are the contents of logs --
Code: | # cat /var/log/wpa_supplicant.log
Successfully initialized wpa_supplicant
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
... ### (repeats many times)
# cat /var/log/dhcpcd-eth3.log
cat: /var/log/dhcpcd-eth3.log: No such file or directory |
lsmod does not show the addition of ccmp -- Code: | # lsmod
Module Size Used by
iwlmvm 348160 0
mac80211 950272 1 iwlmvm
wl 6369280 0
iwlwifi 307200 1 iwlmvm
lib80211_crypt_tkip 16384 0
lib80211 16384 1 lib80211_crypt_tkip
cfg80211 892928 4 wl,iwlmvm,iwlwifi,mac80211 |
So, I verified the configuration files again and then rebooted
Results:
ifconfig shows same status for eth3 -- Code: | eth3: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet6 fe80::5627:1eff:feef:96b5 prefixlen 64 scopeid 0x20<link>
...
|
lsmod seems to be the same as above, ccmp is not there, despite addtion in /etc/modprobe.d/wl.conf -- Code: | # lsmod
Module Size Used by
iwlmvm 348160 0
mac80211 950272 1 iwlmvm
wl 6369280 0
iwlwifi 307200 1 iwlmvm
lib80211_crypt_tkip 16384 0
lib80211 16384 1 lib80211_crypt_tkip
cfg80211 892928 4 wl,iwlmvm,iwlwifi,mac80211 |
rc-status shows net.eth3 "inactive" and some other services "scheduled" like before (seems eth3 is interpreted as main provider of 'net' which affects services with rc-need=net or something such??) -- Code: | # rc-status | grep -v started
Runlevel: default
net.eth3 [ inactive ]
dnsmasq [ scheduled ]
conntrackd [ scheduled ]
netmount [ scheduled ]
openvpn.server [ scheduled ]
|
I made one change in /etc/conf.d/net to move the "-d" to the end of the string, *after the "-j /var/log/dhcpcd-eth3.log"
Here are the post-reboot logs -- Code: | # head -n 100 /var/log/wpa_supplicant.log
Successfully initialized wpa_supplicant
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
...
# cat /var/log/wpa_supplicant.log
... ### too big to fit inside scrollback, but I noticed the following in the middle of many failed scans...
...
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
eth3: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
eth3: CTRL-EVENT-DSCP-POLICY clear_all
eth3: CTRL-EVENT-DSCP-POLICY clear_all
nl80211: deinit ifname=eth3 disabled_11b_rates=0
eth3: CTRL-EVENT-TERMINATING
Successfully initialized wpa_supplicant
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
...
# cat /var/log/dhcpcd-eth3.log
cat: /var/log/dhcpcd-eth3.log: No such file or directory
| Note: the dhcpcd-eth3 log file is still not there...
Anyway, this status is a denial of service for things dependent on e.g. dnsmasq, so I have again removed net.eth3 from the default runlevel again, for now |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1481 Location: Richmond Hill, Canada
|
Posted: Sun Nov 12, 2023 3:44 pm Post subject: |
|
|
brendlefly62 wrote: | I have updated /etc/modprobe.d/wl.conf as you recommended -- Code: | # cat /etc/modprobe.d/wl.conf
#...
softdep wl pre: lib80211 lib80211_crypt_tkip
softdep wl pre: lib80211 lib80211_crypt_ccmp
| (Note that my "blacklist" entries are in /etc/modprobe.d/blacklist.conf, just to keep things cleaner - and they appear to be effective) | Did you actually place them as two lines? I am not sure it will work or not, I suggest use one line Code: | softdep wl pre: lib80211 lib80211_crypt_ccmp lib80211_crypt_tkip | Also can you manually bring up the eth3 like you did before and verify that it is actually use ccmp as opposite to tkip, I mean one connected, you should have ccmp module loaded.
as of /var/log/dhcpcd-eth3.log, there are two possibilities, one is dhcpcd did not start because wpa_supplicant did not establish connection yet. the other is that dhcpcd want the /var/log/dhcpcd-eth3.log exist first before it will write anything to it, so for the first case please verify if dhcpcd for eth3 interface is actually running and for second case please touch /var/log/dhcpcd-eth3.log to create the file before start.
FYI, the configuration I suggested is using netifrc with openrc, so dhcpcd run on per interface, you may see dhcpcd running for other interface but the argument to the dhcpcd will show which interface it is monitoring.
Please also modify /etc/conf.d/net to force use wext driver for wpa_supplicant Code: | # Extra wifi via on-board bcm4352 (wl.ko)
modules_eth3="wpa_supplicant"
config_eth3="dhcp"
# nodns -- disable overwrite /etc/resolv.conf (i.e. not calling hook resolv.conf)
dhcp_eth3="nodns"
# --nohook wpa_supplicant -- Not calling dhcpcd hook script /usr/share/dhcpcd/hooks/10-wpa_supplicant, wast of time.
# --timeout 10 -- wait for 10 seconds for ip address, otherwise fail startup.
# --ipv4only -- just get IPv4 address, no IPv6 request send out.
dhcpcd_eth3="--timeout 10 --ipv4only --nohook wpa_supplicant -j -d /var/log/dhcpcd-eth3.log"
# Add -d if you wish to see more debug information
wpa_supplicant_eth3="-Dwext -f /var/log/wpa_supplicant.log" |
|
|
Back to top |
|
|
brendlefly62 Apprentice
Joined: 19 Dec 2009 Posts: 156
|
Posted: Tue Nov 14, 2023 12:37 am Post subject: |
|
|
Hi, pingtoo. It looks like those config changes made the difference... one remaining question about dhcpcd command syntax in it use in /etc/conf.d/net (near the bottom). Pardon the "storytelling" getting to that bottom line.
Quote: | I suggest use one line |
Code: | # cfg80211 + mac80211
softdep wl pre: lib80211 lib80211_crypt_tkip lib80211_crypt_ccmp
|
Quote: | manually bring up the eth3 like you did before and verify that it is actually use ccmp as opposite to tkip, I mean one connected, you should have ccmp module loaded.
| Stop wpa_supplicant or dhcpcd if in use with eth3; unblock rfkill if needed…
Code: | # ps -aef | grep wpa
### <nothing>
# ps -aef | grep dhcp
root 2926 1 0 Nov12 ? 00:00:00 dhcpcd: eth0 [ip4] [ip6] ### leaving this alone, for eth0
# rfkill list | grep -A3 -i wireless
2: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
3: brcmwl-0: Wireless LAN
Soft blocked: no
Hard blocked: no
4: phy1: Wireless LAN
Soft blocked: no
Hard blocked: no
### nothing to unblock |
Bring up eth3 and then start wpa_supplicant for it – Code: |
# ifconfig eth3 up
# ifconfig eth3
eth3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::5627:1eff:xxxx:nnnn prefixlen 64 scopeid 0x20<link>
# INTERFACE=eth3; DRIVER=nl20211
# wpa_supplicant -D${DRIVER} -i${INTERFACE} -c /etc/wpa_supplicant/wpa_supplicant.conf -B >/dev/null
# ifconfig eth3
eth3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::5627:1eff:xxxx:nnnn prefixlen 64 scopeid 0x20<link>
# lsmod
Module Size Used by
iwlmvm 348160 0
mac80211 950272 1 iwlmvm
wl 6369280 0
iwlwifi 307200 1 iwlmvm
lib80211_crypt_tkip 16384 0
lib80211 16384 1 lib80211_crypt_tkip
cfg80211 892928 4 wl,iwlmvm,iwlwifi,mac80211
# dhcpcd ${INTERFACE} -t 30
dhcpcd-10.0.3 starting
DUID 00:01:00:01:2c:cd:73:cd:10:c3:7b:95:23:90
eth3: connected to Access Point:
eth3: IAID 1e:ef:96:b5
eth3: soliciting an IPv6 router
ipv6nd_sendrsprobe: Operation not permitted
eth3: soliciting a DHCP lease
ipv6nd_sendrsprobe: Operation not permitted
eth3: probing for an IPv4LL address
ipv6nd_sendrsprobe: Operation not permitted
eth3: using IPv4LL address 169.254.246.35
eth3: adding route to 169.254.0.0/16
eth3: adding default route |
Got only ipv4LL address. Try again with wext – Code: |
# ps -aef | grep wpa
### <nothing>
# ps -aef | grep dhcpcd
root 2926 1 0 Nov12 ? 00:00:00 dhcpcd: eth0 [ip4] [ip6]
root 7752 1 0 18:05 ? 00:00:00 dhcpcd: eth3 [ip4] [ip6]
# kill -9 7752 ### killing, to restart, but note that this shows it started, but no dhcpcd-eth3.log
# ps -aef | grep dhcpcd
root 2926 1 0 Nov12 ? 00:00:00 dhcpcd: eth0 [ip4] [ip6]
# rfkill list | grep -A3 -i wireless
2: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
3: brcmwl-0: Wireless LAN
Soft blocked: no
Hard blocked: no
4: phy1: Wireless LAN
Soft blocked: no
Hard blocked: no
# ifconfig eth3 down
# ifconfig eth3
eth3: flags=4098<BROADCAST,MULTICAST> mtu 1500
inet 169.254.246.35 netmask 255.255.0.0 broadcast 169.254.255.255
# ifconfig eth3 up
# ifconfig eth3
eth3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.246.35 netmask 255.255.0.0 broadcast 169.254.255.255
# DRIVER=wext
# wpa_supplicant -D${DRIVER} -i${INTERFACE} -c /etc/wpa_supplicant/wpa_supplicant.conf -B >/dev/null
# dhcpcd ${INTERFACE} -t 30
dhcpcd-10.0.3 starting
DUID 00:01:00:01:2c:cd:73:cd:10:c3:7b:95:23:90
eth3: connected to Access Point: <myssid>
eth3: IAID 1e:ef:96:b5
eth3: adding address fe80::b3e0:d7ed:xxxx:nnnn
eth3: soliciting an IPv6 router
eth3: soliciting a DHCP lease
ipv6nd_sendrsprobe: Operation not permitted
eth3: offered 192.168.xxx.nnn from 192.168.xxx.zzz <vendor url>
eth3: ignoring offer of 192.168.xxx.nnn from 192.168.xxx.zzz <vendor url>
eth3: probing address 192.168.xxx.nnn/24
ipv6nd_sendrsprobe: Operation not permitted
ipv6nd_sendrsprobe: Operation not permitted
eth3: leased 192.168.xxx.nnn for 86400 seconds
eth3: adding route to 192.168.xxx.0/24
eth3: adding default route via 192.168.xxx.zzz
# lsmod
Module Size Used by
iwlmvm 348160 0
mac80211 950272 1 iwlmvm
wl 6369280 0
iwlwifi 307200 1 iwlmvm
lib80211_crypt_tkip 16384 0
lib80211 16384 1 lib80211_crypt_tkip
cfg80211 892928 4 wl,iwlmvm,iwlwifi,mac80211 |
So – it works manually for wext, not nl80211; and no ccmp module loaded, even once connected
As for logs – Code: | # tail /var/log/wpa_supplicant.log
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
eth3: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
eth3: CTRL-EVENT-DSCP-POLICY clear_all
eth3: CTRL-EVENT-DSCP-POLICY clear_all
nl80211: deinit ifname=eth3 disabled_11b_rates=0
eth3: CTRL-EVENT-TERMINATING
### still no dhcpcd-eth3.log to be found
# touch /var/log/dhcpcd-eth3.log
# ls -al /var/log/dhcpcd-eth3.log
-rw-r--r-- 1 root root 0 Nov 13 18:24 /var/log/dhcpcd-eth3.log
# ps -aef | grep dhcpcd
root 2926 1 0 Nov12 ? 00:00:00 dhcpcd: eth0 [ip4] [ip6]
root 8141 1 0 18:14 ? 00:00:00 dhcpcd: eth3 [ip4] [ip6]
# kill -9 8141
# ps -aef | grep dhcpcd
root 2926 1 0 Nov12 ? 00:00:00 dhcpcd: eth0 [ip4] [ip6]
# ps -aef | grep wpa
root 8138 1 0 18:14 ? 00:00:00 wpa_supplicant -Dwext -ieth3 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
# kill -9 8138
# ps -aef | grep wpa
### <nothing>
# ifconfig eth3 down; ifconfig eth3 up
# ifconfig eth3 up
# wpa_supplicant -D${DRIVER} -i${INTERFACE} -c /etc/wpa_supplicant/wpa_supplicant.conf -B >/dev/null
# dhcpcd ${INTERFACE} -t 30
dhcpcd-10.0.3 starting
DUID 00:01:00:01:2c:cd:73:cd:10:c3:7b:95:23:90
eth3: connected to Access Point: <myssid>
eth3: IAID 1e:ef:96:b5
eth3: adding address fe80::b3e0:d7ed:xxxx:nnnn
eth3: rebinding lease of 192.168.xxx.nnn
eth3: leased 192.168.xxx.nnn for 86400 seconds
eth3: adding route to 192.168.xxx.0/24
eth3: adding default route via 192.168.xxx.zzz
# ls -al /var/log/dhcpcd-eth3.log
-rw-r--r-- 1 root root 0 Nov 13 18:24 /var/log/dhcpcd-eth3.log
# cat /var/log/dhcpcd-eth3.log
### note: tail of wpa_supplicant.log has also not changed |
Quote: | so for the first case please verify if dhcpcd for eth3 interface is actually running and for second case please touch /var/log/dhcpcd-eth3.log to create the file before start. |
So – yes running; no dhcpcd log, even after creating with touch first…
Lastly, I also added -Dwext to /etc/conf.d/net, killed wpa_supplicant and dhcpcd processes for eth3, and restarted with /etc/init.d/net.eth3 – Code: | # nano /etc/conf.d/net
…
# Extra wifi via on-board bcm4352 (wl.ko)
modules_eth3="wpa_supplicant"
config_eth3="dhcp"
# nodns -- disable overwrite /etc/resolv.conf (i.e. not calling hook resolv.conf)
dhcp_eth3="nodns"
# --nohook wpa_supplicant -- Not calling dhcpcd hook script /usr/share/dhcpcd/hooks/10-wpa_suppli>
# --timeout 10 -- wait for 10 seconds for ip address, otherwise fail startup.
# --ipv4only -- just get IPv4 address, no IPv6 request send out.
dhcpcd_eth3="--timeout 10 --ipv4only --nohook wpa_supplicant -j /var/log/dhcpcd-eth3.log -d"
# Add -d if you wish to see more debug information
wpa_supplicant_eth3="-Dwext -f /var/log/wpa_supplicant.log"
…
# ps -aef | grep wpa
# kill -9 8898
# ps -aef | grep dhcpcd
# kill -9 8901
###--------[ here is the dhcpcd log now ]----------------------------------------
# /etc/init.d/net.3th3 start
# cat dhcpcd-eth3.log
Nov 13 18:44:26 [9885]: dhcpcd-10.0.3 starting
Nov 13 18:44:26 [9887]: spawned manager process on PID 9887
Nov 13 18:44:26 [9887]: DUID 00:01:00:01:2c:cd:73:cd:10:c3:7b:95:23:90
Nov 13 18:44:26 [9887]: eth3: executing: /lib/dhcpcd/dhcpcd-run-hooks PREINIT
Nov 13 18:44:26 [9887]: eth3: connected to Access Point: <myssid>
Nov 13 18:44:26 [9887]: eth3: executing: /lib/dhcpcd/dhcpcd-run-hooks CARRIER
Nov 13 18:44:26 [9887]: eth3: IAID 1e:ef:96:b5
Nov 13 18:44:26 [9887]: eth3: delaying IPv4 for 1.6 seconds
Nov 13 18:44:27 [9887]: eth3: reading lease: /var/lib/dhcpcd/eth3-<myssid>.lease
Nov 13 18:44:27 [9887]: eth3: rebinding lease of 192.168.xxx.nnn
Nov 13 18:44:27 [9887]: eth3: ARP announcing 192.168.xxx.nnn (1 of 2), next in 2.0 seconds
Nov 13 18:44:27 [9887]: eth3: sending REQUEST (xid 0xb7f68bdd), next in 3.3 seconds
Nov 13 18:44:27 [9887]: eth3: acknowledged 192.168.xxx.nnn from 192.168.xxx.zzz ecosystem.home.cisco.com
Nov 13 18:44:27 [9887]: eth3: leased 192.168.xxx.nnn for 86400 seconds
Nov 13 18:44:27 [9887]: eth3: renew in 43200 seconds, rebind in 75600 seconds
Nov 13 18:44:27 [9887]: eth3: writing lease: /var/lib/dhcpcd/eth3-<myssid>.lease
Nov 13 18:44:27 [9887]: eth3: adding IP address 192.168.xxx.nnn/24 broadcast 192.168.7.255
Nov 13 18:44:27 [9887]: eth3: adding route to 192.168.xxx.0/24
Nov 13 18:44:27 [9887]: eth3: adding default route via 192.168.xxx.zzz
Nov 13 18:44:27 [9887]: eth3: ARP announcing 192.168.xxx.nnn (1 of 2), next in 2.0 seconds
Nov 13 18:44:27 [9887]: eth3: executing: /lib/dhcpcd/dhcpcd-run-hooks REBOOT
Nov 13 18:44:29 [9887]: eth3: ARP announcing 192.168.xxx.nnn (2 of 2)
###-----[ and here is the wpa_supplicant.log ]-----------------------------------------------
# tail -n100 /var/log/wpa_supplicant.log
>>>
eth3: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
eth3: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
eth3: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
eth3: CTRL-EVENT-DSCP-POLICY clear_all
eth3: CTRL-EVENT-DSCP-POLICY clear_all
nl80211: deinit ifname=eth3 disabled_11b_rates=0
eth3: CTRL-EVENT-TERMINATING
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
eth3: Trying to associate with c4:41:1e:xx:yy:zz (SSID='<mysid>' freq=<myfreq> MHz)
eth3: Associated with c4:41:xx:yy:zz
eth3: WPA: Key negotiation completed with c4:41:xx:yy:zz [PTK=CCMP GTK=CCMP]
eth3: CTRL-EVENT-CONNECTED - Connection to c4:41:xx:yy:zz completed [id=0 id_str=]
eth3: WPA: Group rekeying completed with c4:41:xx:yy:zz [GTK=CCMP] |
Note: ccpm still doesn’t show up in lsmod, but clearly from above, ccmp was used
Now after rebooting with these configuration changes – Code: |
# ifconfig
### eth3 not shown
# ifconfig eth3
eth3: flags=4098<BROADCAST,MULTICAST> mtu 1500
…
# ps -aef | grep -i 'dhcpcd\|wpa_supplicant'
root 2927 1 0 18:56 ? 00:00:00 dhcpcd: eth0 [ip4] [ip6]
# /etc/init.d/net.eth3 start
* Bringing up interface eth3
* Caching network module dependencies
* Starting wpa_supplicant on eth3 ... [ ok ]
* Starting wpa_cli on eth3 ... [ ok ]
* Backgrounding ... ...
* WARNING: net.eth3 has started, but is inactive
### both log files have new entries identical to above |
This looks good, but I noticed it associated with a second ssid from wpa_supplicant.conf, that I had intended to remove. So I added “disabled=1” to that network { } section, and restarted the interface – Code: | # /etc/init.d/net.eth3 restart
* Bringing down interface eth3
* Stopping dhcpcd on eth3 ...
dhcpcd: unrecognized option '--timeout 10 --ipv4only --nohook wpa_supplicant -j /var/log/dhcpcd-eth3.log -d'
usage: dhcpcd [-146ABbDdEGgHJKLMNPpqTV]
[-C, --nohook hook] [-c, --script script]
[-e, --env value] [-F, --fqdn FQDN] [-f, --config file]
[-h, --hostname hostname] [-I, --clientid clientid]
[-i, --vendorclassid vendorclassid] [-j, --logfile logfile]
[-l, --leasetime seconds] [-m, --metric metric]
[-O, --nooption option] [-o, --option option]
[-Q, --require option] [-r, --request address]
[-S, --static value]
[-s, --inform address[/cidr[/broadcast_address]]]
[--inform6] [-t, --timeout seconds] [-u, --userclass class]
[-v, --vendor code, value] [-W, --whitelist address[/cidr]] [-w]
[--waitip [4 | 6]] [-y, --reboot seconds]
[-X, --blacklist address[/cidr]] [-Z, --denyinterfaces pattern]
[-z, --allowinterfaces pattern] [--inactive] [interface] [...]
dhcpcd -n, --rebind [interface]
dhcpcd -k, --release [interface]
dhcpcd -U, --dumplease interface
dhcpcd --version
dhcpcd -x, --exit [interface] [ ok ]
* Stopping wpa_cli on eth3 ... [ ok ]
* Stopping wpa_supplicant on eth3 ... [ ok ]
* Bringing up interface eth3
* Starting wpa_supplicant on eth3 ... [ ok ]
* Starting wpa_cli on eth3 ... [ ok ]
* Backgrounding ... ...
* WARNING: net.eth3 has started, but is inactive |
Evidently, there is a typo of some sort in /etc/conf.d/net that was overlooked until restart. Based on “man dhcpcd, I suspect the “–nohook wpa_supplicant” part??
I also put eth3 back in the default runlevel and rebooted to test that with the new configuration, and it looks good Code: | # rc-status
Runlevel: default
net.br0 [ started ]
net.eth0 [ started ]
net.eth1 [ started ]
net.eth3 [ started ]
# dmesg | grep 'wl:\|eth3\|cfg80211\|bcm'
…
[ 28.305176] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 28.306801] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 28.320632] wl: loading out-of-tree module taints kernel.
[ 28.320636] wl: module license 'MIXED/Proprietary' taints kernel.
[ 28.340895] eth3: Broadcom BCM43b1 802.11 Hybrid Wireless Controller 6.30.223.271 (r587334) |
|
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1481 Location: Richmond Hill, Canada
|
Posted: Tue Nov 14, 2023 12:41 pm Post subject: |
|
|
brendlefly62,
Thank you very much for all the detail. It help greatly for understanding the events.
I guess if you agree we can call it a success for this thread now.
Thanks again for given me this opportunity for learning Gentoo's network management and more about Wifi support in Linux.
Following just something I learn from this exercise and try to address your questions in your last post.
- tkip and ccmp, I will try to research more later. my guess is that tkip may be is a early phase in wifi protocol for negotiate authentication and eventually wifi settle in ccmp for encryption the connection.
- nl20211 vs wext, There must be changes in Linux about calling parameters for configure wifi device and the newer nl20211 may be using something either in wrong order or too much/little argument for configuration function, the ret=-22 is evident because 22 is OSError "Invalid argument"
- dhcpcd about wrong options, from your post it seems to me the dhcpcd take the whole string as one argument, I am not sure where it went wrong there.
- --nohook wpa_supplicant is refer to telling /lib/dhcpcd/dhcpcd-run-hooks not to execute /usr/share/dhcpcd/hooks/10-wpa_supplicant. I just review the dhcpcd-run-hooks script it will NOT look into /usr/share/dhcpcd/hooks/, So may be you could just take it from the argument string.
- /var/log/dhcpcd-eth3.log, I think it is only when it actually got started within the netrcif framework that is when it produce the log, in your post earlier was not able to successfully start wpa_supplicant, therefor dhcpcd was never started.
|
|
Back to top |
|
|
brendlefly62 Apprentice
Joined: 19 Dec 2009 Posts: 156
|
Posted: Tue Nov 14, 2023 4:13 pm Post subject: |
|
|
Thanks, pingtoo. I will try w/o the --nohook wpa_supplicant. Yes, I agree; I will add a summary of the "solution" and then mark this solved |
|
Back to top |
|
|
brendlefly62 Apprentice
Joined: 19 Dec 2009 Posts: 156
|
Posted: Tue Nov 14, 2023 11:01 pm Post subject: |
|
|
Many thanks to those who helped, particularly pietinger and pingto.
Here is a summary of this “solution” to get the bcm4352 chip (in this case, built into ASUS P97 motherboard) working for 802.11 wifi
Caveats:
1. Only the broadcom-sta driver will work, b43 and bcma drivers (among others cannot be run at the same time)
2. The broadcom-sta driver works only in station (sta) and not in access-point (ap) mode, so this adapter cannot be used with hostapd, etc. to provide ap service
3. The code base is unmaintained. The “current” driver and associated firmware files for these (and b43) are from like 2015…
After considering these caveats, the author abandoned use of the bcm4352 in an active project and continued development of this limited “solution” purely for academic purposes.
Kernel: Code: |
--> Networking Options
--- Wireless
<M> cfg80211 - wireless configuration API
[*] enable powersave by default
[*] support CRDA
-*- cfg80211 wireless extensions compatibility
<M> Generic IEEE 802.11 Networking Stack (mac80211)
[*] Minstrel
Default rate control algorithm (Minstrel) --->
[*] Enable mac80211 mesh networking support
[*] Enable LED triggers
Device Drivers --> Wireless LAN
[*] Broadcom devices
< > Broadcom 43xx wireless support (mac80211 stack)
< > Broadcom 43xx-legacy wireless support (mac80211 stack)
< > Broadcom IEEE802.11n PCIe SoftMAC WLAN driver
<M> Broadcom FullMAC WLAN driver
[*] Broadcom 43xx SDIO device support
[*] Support for G-PHY (802.11g) devices
[*] Support for N-PHY (the main 802.11n series) devices
[*] Support for LP-PHY (low-power 802.11g) devices
[*] Support for HT-PHY (high throughput 802.11n) devices
[ ] Broadcom 43xx debugging
<M> Broadcom 43xx-legacy wireless support (mac80211 stack)
[ ] Broadcom 43xx-legacy debugging
Broadcom 43xx-legacy data transfer mode (DMA + PIO) --->
# for x in b43 cfg80211 ... ; zgrep -i config_$x /proc/config.gz; done
# CONFIG_B43 is not set
# CONFIG_B43LEGACY is not set
CONFIG_CFG80211=m
# CONFIG_NL80211_TESTMODE is not set
CONFIG_CFG80211_WEXT=y
CONFIG_LIB80211=m
CONFIG_LIB80211_CRYPT_WEP=m
CONFIG_LIB80211_CRYPT_CCMP=m
CONFIG_LIB80211_CRYPT_TKIP=m
CONFIG_MAC80211=m
|
Install Driver = wl [wl.ko, provided by net-wireless/broadcom-sta] Code: |
# emerge -av net-wireless/broadcom-sta | Note that emerge output will deliver warnings about other incompatible drivers it detects, with text like “BCMA: If you insist on building, it must be blacklisted”
Thus, do not build from kernel sources, or blacklist incompatible drivers: Code: | # cat /etc/modprobe.d/blacklist.conf
blacklist b43
blacklist bcma
blacklist ssb
blacklist brcmsmac
blacklist brcmfmac |
Note that bcm4352 is NOT supported by the b43 driver, which is one of those that must be blacklisted if installed.
No additional firmware beyond linux-firmware is required – if already installed, uninstall net-wireless/b43-firmware, net-wireless/b43legacy-firmware and net-wireless/b43-fwcutter. Don’t forget to manually remove the directory /lib/firmware/b43. Note also that Gentoo’s net-wireless/b43-firmware package downloads archived fw files and runs b43-fwcutter to install then – even if one did need the b43 driver, it is not necessary to run b43-fwcutter manually on fw archives of uncertain provenance. (Details in pages above)
Help wl with dependency on cfg80211 and other modules – Code: | # nano /etc/modprobe.d/wl.conf
…
softdep wl pre: lib80211 lib80211_crypt_tkip lib80211_crypt_ccmp
…
# cat /etc/modules-load.d/lib80211_crypt_tkip
lib80211_crypt_tkip
|
Use commands "ifconfig" and/or "tree /sys/class/net" to examine current interfaces
Use command "lsmod" to confirm that wl has not yet been started
Use command “modprobe wl” to load it, and then ifconfig and/or tree /sys/class/net to see what interface name was actually started
[for netifrc] Now configure networking for that interface – Code: | # nano /etc/conf.d/net
…
# Extra wifi via on-board bcm4352 (wl.ko)
modules_eth3="wpa_supplicant"
config_eth3="dhcp"
# nodns -- disable overwrite /etc/resolv.conf (i.e. not calling hook resolv.con>
dhcp_eth3="nodns"
# --nohook wpa_supplicant -- Not calling dhcpcd hook script /usr/share/dhcpcd/h>
# --timeout 10 -- wait for 10 seconds for ip address, otherwise fail startup.
# --ipv4only -- just get IPv4 address, no IPv6 request send out.
dhcpcd_eth3=" -4 -t 10 -j /var/log/dhcpcd-eth3.log"
# Add -d if you wish to see more debug information
wpa_supplicant_eth3="-Dwext -f /var/log/wpa_supplicant.log" |
Now start the interface— Code: | # /etc/init.d/net.ethX start
# ifconfig ethX |
See tons of resources consulted and detailed description of several methods of troubleshooting drivers, wpa_supplicant, wpa_cli, dhcpcd, etc. in the pages above
. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5371 Location: Bavaria
|
Posted: Tue Nov 14, 2023 11:12 pm Post subject: |
|
|
brendlefly62,
the honor belongs to @pingtoo alone ... and of course you.
I have just added a link to your last post in the Wiki article: https://wiki.gentoo.org/wiki/Wi-Fi |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|