[Galaxy S 4 Q&A, Help & Troubleshooting] b3niup:
Hi,

I'm having issues with 5GHz wifi on my I9505 with latest LineageOS 14.1.

It seems that my phone can't connect to channels that are not allowed for 'global' zone, for example 5660MHz (channel 132) but it scans and display such networks fine.

I've got set 'region code' in advanced wifi settings to Europe.

Few details:

# iw reg get
global
country 00: DFS-UNSET
(2402 - 2472 @ 40), (6, 20), (N/A)
(2457 - 2482 @ 40), (6, 20), (N/A), NO-IR
(2474 - 2494 @ 20), (6, 20), (N/A), NO-OFDM, NO-IR
(5170 - 5250 @ 40), (6, 20), (N/A), NO-IR
(5735 - 5835 @ 40), (6, 20), (N/A), NO-IR

iw reg set does nothing:

jfltexx:/ # iw reg set PL
jfltexx:/ # iw reg get
global
country 00: DFS-UNSET
(2402 - 2472 @ 40), (6, 20), (N/A)
(2457 - 2482 @ 40), (6, 20), (N/A), NO-IR
(2474 - 2494 @ 20), (6, 20), (N/A), NO-OFDM, NO-IR
(5170 - 5250 @ 40), (6, 20), (N/A), NO-IR
(5735 - 5835 @ 40), (6, 20), (N/A), NO-IR

logs from connecting to such network

11-26 07:29:31.559 2022 2680 D WiFiServiceImpl : CONNECT nid=-1 uid=1000 name=android.uid.system:1000
11-26 07:29:31.559 2022 2680 D WifiService: Connect with configID: 1 SSID: "42" PROVIDER-NAME: null BSSID: null FQDN: null PRIO: 10 HIDDEN: false
11-26 07:29:31.559 2022 2680 D WifiService: NetworkSelectionStatus NETWORK_SELECTION_ENABLED
11-26 07:29:31.559 2022 2680 D WifiService: hasEverConnected: true
11-26 07:29:31.559 2022 2680 D WifiService: numAssociation 1
11-26 07:29:31.559 2022 2680 D WifiService: validatedInternetAccess
11-26 07:29:31.559 2022 2680 D WifiService: KeyMgmt: WPA_PSK Protocols: WPA RSN
11-26 07:29:31.559 2022 2680 D WifiService: AuthAlgorithms:
11-26 07:29:31.559 2022 2680 D WifiService: PairwiseCiphers: TKIP CCMP
11-26 07:29:31.559 2022 2680 D WifiService: GroupCiphers: TKIP CCMP
11-26 07:29:31.559 2022 2680 D WifiService: PSK: *
11-26 07:29:31.559 2022 2680 D WifiService: sim_num *
11-26 07:29:31.559 2022 2680 D WifiService: Enterprise config:
11-26 07:29:31.559 2022 2680 D WifiService: altsubject_match NULL
11-26 07:29:31.559 2022 2680 D WifiService: password <removed>
11-26 07:29:31.559 2022 2680 D WifiService: ca_path NULL
11-26 07:29:31.559 2022 2680 D WifiService: subject_match NULL
11-26 07:29:31.559 2022 2680 D WifiService: engine 0
11-26 07:29:31.559 2022 2680 D WifiService: client_cert NULL
11-26 07:29:31.559 2022 2680 D WifiService: ca_cert NULL
11-26 07:29:31.559 2022 2680 D WifiService: anonymous_identity NULL
11-26 07:29:31.559 2022 2680 D WifiService: identity NULL
11-26 07:29:31.559 2022 2680 D WifiService: key_id NULL
11-26 07:29:31.559 2022 2680 D WifiService: domain_suffix_match NULL
11-26 07:29:31.559 2022 2680 D WifiService: engine_id NULL
11-26 07:29:31.559 2022 2680 D WifiService: IP config:
11-26 07:29:31.559 2022 2680 D WifiService: IP assignment: DHCP
11-26 07:29:31.559 2022 2680 D WifiService: Proxy settings: NONE
11-26 07:29:31.559 2022 2680 D WifiService: networkSelectionBSSID=64:d1:54:73:6f:5e cuid=1000 cname=android.uid.system:1000 luid=1000 lname=android.uid.system:1000 lcuid=-1 userApproved=USER_APPROVED noInternetAccessExpected=false isCarrierNetwork=false roamingFailureBlackListTimeMilli: 1000
11-26 07:29:31.559 2022 2680 D WifiService: triggeredLow: 0 triggeredBad: 0 triggeredNotHigh: 0
11-26 07:29:31.559 2022 2680 D WifiService: ticksLow: 0 ticksBad: 0 ticksNotHigh: 0
11-26 07:29:31.559 2022 2680 D WifiService: triggeredJoin: 0
11-26 07:29:31.559 2022 2681 D WifiStateMachine: CONNECT_NETWORK updating existing config with id=1 configKey="42"WPA_PSK
11-26 07:29:31.623 2022 7714 D WifiNetworkHistory: saving network history: "42"WPA_PSK gw: null Network Selection-status: NETWORK_SELECTION_ENABLED ephemeral=false choice:null link:1 status:2 nid:1 hasEverConnected: true
11-26 07:29:31.624 2022 7714 V WifiNetworkHistory: writeKnownNetworkHistory write config "42"WPA_PSK
11-26 07:29:31.624 2022 7714 D WifiNetworkHistory: writeKnownNetworkHistory write linked 1
11-26 07:29:31.625 2022 7714 D WifiNetworkHistory: saving network history: "42'"WPA_PSK gw: null Network Selection-status: NETWORK_SELECTION_ENABLED ephemeral=false choice:"42"WPA_PSK link:1 status:1 nid:0 hasEverConnected: true
11-26 07:29:31.626 2022 7714 V WifiNetworkHistory: writeKnownNetworkHistory write config "42'"WPA_PSK
11-26 07:29:31.628 2022 7714 D WifiNetworkHistory: writeKnownNetworkHistory write linked 1
11-26 07:29:31.640 2022 2681 I WifiConnectivityManager: connectToUserSelectNetwork: netId=1 persist=true
11-26 07:29:31.656 2022 7715 D WifiNetworkHistory: saving network history: "42"WPA_PSK gw: null Network Selection-status: NETWORK_SELECTION_ENABLED ephemeral=false choice:null link:1 status:2 nid:1 hasEverConnected: true
11-26 07:29:31.656 2022 7715 V WifiNetworkHistory: writeKnownNetworkHistory write config "42"WPA_PSK
11-26 07:29:31.657 2022 7715 D WifiNetworkHistory: writeKnownNetworkHistory write linked 1
11-26 07:29:31.658 2022 7715 D WifiNetworkHistory: saving network history: "42'"WPA_PSK gw: null Network Selection-status: NETWORK_SELECTION_ENABLED ephemeral=false choice:"42"WPA_PSK link:1 status:1 nid:0 hasEverConnected: true
11-26 07:29:31.658 2022 7715 V WifiNetworkHistory: writeKnownNetworkHistory write config "42'"WPA_PSK
11-26 07:29:31.661 2022 2681 I WifiConnectivityManager: scheduleWatchdogTimer
11-26 07:29:31.662 2022 7715 D WifiNetworkHistory: writeKnownNetworkHistory write linked 1
11-26 07:29:32.737 7625 7625 I wpa_supplicant: wlan0: Trying to associate with 64:d1:54:73:6f:5e (SSID='42' freq=5660 MHz)
11-26 07:29:32.797 7625 7625 I wpa_supplicant: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=64:d1:54:73:6f:5e status_code=1
11-26 07:29:33.127 2022 2681 I WifiConnectivityManager: trackBssid: disable 64:d1:54:73:6f:5e
11-26 07:29:33.128 2022 2681 D WifiHAL : Start get packet fate command
11-26 07:29:33.128 2022 2681 D WifiHAL : createRequest Get Tx packet fate request
11-26 07:29:33.128 2022 2681 E WifiHAL : Failed to register get pkt fate response; result = -95
11-26 07:29:33.128 2022 2681 E WifiNative-HAL: getTxPktFatesNative returned -95
11-26 07:29:33.128 2022 2681 D WifiHAL : Start get packet fate command
11-26 07:29:33.128 2022 2681 D WifiHAL : createRequest Get Rx packet fate request
11-26 07:29:33.128 2022 2681 E WifiHAL : Failed to register get pkt fate response; result = -95
11-26 07:29:33.128 2022 2681 E WifiNative-HAL: getRxPktFatesNative returned -95
11-26 07:29:33.165 2022 2681 E WifiQualifiedNetworkSelector:: 42:64:d1:54:73:6f:5e is in blacklist.
11-26 07:29:33.208 2022 2681 E SupplicantStateTracker: Ignoring { when=-81ms what=147499 target=com.android.internal.util.StateMachine$SmHandler }

Keep in mind that there're two networks configured on my device:

1. ssid: 42 - this is the problematic 5GHz network

2. ssid: 42' - this is 2.4GHz network which works fine

When I change 5GHz frequency to 5240MHz it works without any issues.

I'm running LineageOS 14.1 nightly build 20171122 with latest PDA and CSC.