Edge2 Android Wifi Country Code = [CN] disables U-NII-2C channels

Which system do you use? Android, Ubuntu, OOWOW or others?

Android 12

Which version of system do you use? Khadas official images, self built images, or others?

Khadas official Android source code

Please describe your issue below:

The Edge2 compiled from source code will not connect to my router in the US when operating at 5GHz U-NII-2C (Channels 100 to 144)

It appears as though the source code produces an image with a default configuration that results in the regulatory domain to “ccode=CN” which disables U-NII-2C channels.

Routers operating at 5GHz U-NII-2C (Channels 100 to 144) in the US will not work properly with this device.

$ getprop | grep CN
response:
$ [ro.boot.wificountrycode]: [CN]

If I switch the router to another channel or frequency configuration, the Edge2 connects as expected.

How do I modify this configuration in the source code so I can compile a version that will work properly in the US or EU? Many thanks for the help!

Post a console log of your issue below:


$ getprop | grep CN
response:
$ [ro.boot.wificountrycode]: [CN]

$ logcat -d | grep wificountrycode

08-22 11:38:15.913     0     0 I         : Kernel command line: storagemedia=emmc androidboot.storagemedia=emmc androidboot.mode=normal  androidboot.dtb_idx=0 androidboot.dtbo_idx=0  androidboot.verifiedbootstate=orange androidboot.serialno=03000033A00013 khadas_mipi_id=0 is_mipi_lcd_exit=0 console=ttyFIQ0 firmware_class.path=/vendor/etc/firmware init=/init rootwait ro loop.max_part=7 androidboot.console=ttyFIQ0 androidboot.wificountrycode=CN androidboot.hardware=rk30board androidboot.boot_devices=fe2e0000.mmc androidboot.selinux=permissive earlycon=uart8250,mmio32,0xfeb50000 irqchip.gicv3_pseudo_nmi=0
08-23 12:50:22.798     1     1 I /system/bin/init: type=1107 audit(0.0:1868): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for property=ro.boot.wificountrycode pid=10554 uid=0 gid=0 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:wifi_config_prop:s0 tclass=property_service permissive=1'
08-23 12:50:26.252   255   255 E init    : Unable to set property 'ro.boot.wificountrycode' from uid:0 gid:0 pid:10554: Read-only property was already set
08-23 12:50:22.804 10554 10554 W libc    : Unable to set property "ro.boot.wificountrycode" to "EU": error code: 0xb

$ logcat -d | grep WifiCountryCode

08-23 00:09:49.539   588   684 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {ConcreteClientModeManager{id=42592820 iface=wlan0 role=ROLE_CLIENT_PRIMARY}=false}
08-23 00:09:59.836   588   684 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {ConcreteClientModeManager{id=42592820 iface=wlan0 role=ROLE_CLIENT_PRIMARY}=true}
08-23 00:09:59.836   588   684 D WifiCountryCode: Reading country code from telephony
08-23 00:09:59.837   588   684 D WifiCountryCode: Set telephony country code to: 
08-23 00:09:59.837   588   684 D WifiCountryCode: updateCountryCode to CN
08-23 00:09:59.838   588   684 I WifiCountryCode: Receive onSetCountryCodeSucceeded CN
08-23 01:33:27.525   588   684 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {ConcreteClientModeManager{id=42592820 iface=wlan0 role=ROLE_CLIENT_PRIMARY}=false}
08-23 01:33:37.643   588   684 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {ConcreteClientModeManager{id=42592820 iface=wlan0 role=ROLE_CLIENT_PRIMARY}=true}
08-23 01:33:37.643   588   684 D WifiCountryCode: Reading country code from telephony
08-23 01:33:37.644   588   684 D WifiCountryCode: Set telephony country code to: 
08-23 01:33:37.644   588   684 D WifiCountryCode: updateCountryCode to CN
08-23 01:33:37.645   588   684 I WifiCountryCode: Receive onSetCountryCodeSucceeded CN
08-23 04:16:25.390   588   684 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {ConcreteClientModeManager{id=42592820 iface=wlan0 role=ROLE_CLIENT_PRIMARY}=false}
08-23 04:16:35.696   588   684 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {ConcreteClientModeManager{id=42592820 iface=wlan0 role=ROLE_CLIENT_PRIMARY}=true}
08-23 04:16:35.697   588   684 D WifiCountryCode: Reading country code from telephony
08-23 04:16:35.697   588   684 D WifiCountryCode: Set telephony country code to: 
08-23 04:16:35.698   588   684 D WifiCountryCode: updateCountryCode to CN
08-23 04:16:35.699   588   684 I WifiCountryCode: Receive onSetCountryCodeSucceeded CN
08-23 09:38:03.470   588   684 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {ConcreteClientModeManager{id=42592820 iface=wlan0 role=ROLE_CLIENT_PRIMARY}=false}
08-23 09:38:13.598   588   684 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {ConcreteClientModeManager{id=42592820 iface=wlan0 role=ROLE_CLIENT_PRIMARY}=true}
08-23 09:38:13.598   588   684 D WifiCountryCode: Reading country code from telephony
08-23 09:38:13.599   588   684 D WifiCountryCode: Set telephony country code to: 
08-23 09:38:13.599   588   684 D WifiCountryCode: updateCountryCode to CN
08-23 09:38:13.601   588   684 I WifiCountryCode: Receive onSetCountryCodeSucceeded CN
08-23 19:41:43.292   588   684 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {}
08-23 19:41:45.773   588   684 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {ConcreteClientModeManager{id=115409608 iface=wlan0 role=ROLE_CLIENT_PRIMARY}=true}
08-23 19:41:45.773   588   684 D WifiCountryCode: Reading country code from telephony
08-23 19:41:45.775   588   684 D WifiCountryCode: Set telephony country code to: 
08-23 19:41:45.775   588   684 D WifiCountryCode: updateCountryCode to CN
08-23 19:41:45.777   588   684 I WifiCountryCode: Receive onSetCountryCodeSucceeded CN
08-23 19:41:48.405   588   684 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {ConcreteClientModeManager{id=115409608 iface=wlan0 role=ROLE_CLIENT_PRIMARY}=false}
08-23 19:41:58.528   588   684 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {ConcreteClientModeManager{id=115409608 iface=wlan0 role=ROLE_CLIENT_PRIMARY}=true}
08-23 19:41:58.528   588   684 D WifiCountryCode: Reading country code from telephony
08-23 19:41:58.529   588   684 D WifiCountryCode: Set telephony country code to: 
08-23 19:41:58.529   588   684 D WifiCountryCode: updateCountryCode to CN
08-23 19:41:58.531   588   684 I WifiCountryCode: Receive onSetCountryCodeSucceeded CN

@byob11 Try adding the ccode=US character to the /vendor/etc/firmware/config.txt file.

$ source build/envsetup.sh
$ lunch kedge2-userdebug

$ cd ~/WORKING_DIRECTORY/vendor/rockchip/common/wifi/firmware
$ nano config.txt
wl_suspend=3=0
wl_resume=2=0
insuspend=0x7
ccode=US

  • exit and save

$ make -j4
$ ./build.sh -u
$ cd ~/WORKING_DIRECTORY/rockdev/Image-kedge2
$ flash device

DOES NOT WORK.

This suggestion did not work. The changes made to the source code (per the suggestion above) appears to have been successfully flashed to the device:

$ adb shell
$ su
$ cd /vendor/etc/firmware
$ cat config.txt
wl_suspend=3=0
wl_resume=2=0
insuspend0x7
ccode=US

But the kedge2 still fails to work correctly using 5GHz Wifi in the US.

08-25 19:03:52.292   591   757 E WifiVendorHal: stopRssiMonitoring(l.2617) failed {.code = ERROR_NOT_AVAILABLE, .description = }
08-25 19:03:52.295   591   757 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {ConcreteClientModeManager{id=533863 iface=wlan0 role=ROLE_CLIENT_PRIMARY}=true}
08-25 19:03:52.296   591   757 D WifiCountryCode: Reading country code from telephony
08-25 19:03:52.297   591   757 D WifiCountryCode: Set telephony country code to: 
08-25 19:03:52.297   591   757 D WifiCountryCode: updateCountryCode to CN
08-25 19:03:52.298  2272  2272 I wpa_supplicant: wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=CN
08-25 19:03:52.299   591   757 D WifiNative: onSetCountryCodeSucceeded: CN
08-25 19:03:52.299   591   757 I WifiCountryCode: Receive onSetCountryCodeSucceeded CN
08-25 19:03:52.300   591   757 I WifiClientModeImpl[wlan0]: disconnectedstate enter
08-25 19:03:52.300   591   757 E WifiScoringParams: Invalid frequency(-1), using 5G as default rssi array
08-25 19:03:52.303   591   757 E SupplicantStateTracker[wlan0]: Ignoring { when=-51ms what=147499 obj= ssid: "" bssid: 3c:84:6a:8f:7e:bf statusCode: 1 timedOut: false oceRssiBasedAssocRejectInfo: null mboAssocDisallowedInfo: null target=com.android.wifi.x.com.android.internal.util.StateMachine$SmHandler }
08-25 19:03:52.304   405   405 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.30ms>
08-25 19:03:52.305   405   405 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.18ms>
08-25 19:03:55.766   491   491 W         : [dhd] [wlan0] wl_run_escan : LEGACY_SCAN sync ID: 183, bssidx: 0
08-25 19:03:55.835   300   300 I logd    : logdr: UID=1000 GID=1000 PID=2513 n tail=127 logMask=80 pid=0 start=0ns deadline=0ns
08-25 19:03:54.863   591  2135 D WifiNl80211Manager: Scan result ready event
$ getprop | grep CN
[ro.boot.wificountrycode]: [CN]

@byob11 The method I provided above is modified using adb push. If you want to compile firmware by modifying the code, make the following modifications: vendor/rockchip/common/wifi/firmware/config.txt

@goenjoy Thank you. I realized that and made corrections.

Regarding ADB PUSH on Android 12 - It doesn’t work?

The following did not work for me:

  1. launch terminal on device
  2. type su
  3. mount -o remount, rw /vendor
  4. modify config.txt >> ccode=US

When you attempt to modify the config.txt file, the contents become NULL and the file results in zero bytes. When you reboot, the file is corrupted. The file exisits by name, but is zero bytes. This is for any file on Android 12. You can’t simply change bootanimatuon.zip on kedge2 Android 12 using this method anymore.

adb push config.txt /sdcard/config.txt
adb shell "su 0 mount -o remount,rw /vendor"
adb shell "su 0 mv /sdcard/config.txt /vendor/etc/firmware/config.txt"
adb shell "su 0 chgrp root /vendor/etc/firmware/config.txt"
adb shell "su 0 chmod 644 /vendor/etc/firmware/config.txt"
adb shell "su 0 mount -o remount,ro /vendor"

ls -l /vendor/etc/firmware/config.txt
0 bytes config.txt

I’ve also tried the following to no avail:

cd /vendor/etc/firmware
su
echo -e "\nccode=US" >> config.txt
reboot

This suggestion did not work. The changes made to the source code (per the suggestion above) appears to have been successfully flashed to the device:

$ adb shell
$ su
$ cd /vendor/etc/firmware
$ cat config.txt
wl_suspend=3=0
wl_resume=2=0
insuspend0x7
ccode=US

But the kedge2 still fails to work correctly using 5GHz Wifi in the US.

@byob11

device/khadas/common$ git diff
diff --git a/BoardConfig.mk b/BoardConfig.mk
index b1ecb7c..5d0d32c 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -100,11 +100,11 @@ ifeq ($(TARGET_BUILD_VARIANT), user)
 PRODUCT_KERNEL_CONFIG += non_debuggable.config
 endif
 
-ROCKCHIP_ANDROID_BOOT_CMDLINE ?= androidboot.console=ttyFIQ0 androidboot.wificountrycode=CN
+ROCKCHIP_ANDROID_BOOT_CMDLINE ?= androidboot.console=ttyFIQ0 androidboot.wificountrycode=US

@goenjoy

Modifying vendor/khadas/common/BoardConfig.mk SUCCESSFULLY changed the WifiCountryCode to US on my build and device. HOWEVER, the connectivity issues still exist!

cat ~/WORKING_DIRECTORY/device/khadas/common/BoardConfg.mk | grep -i wificountrycode
ROCKCHIP_ANDROID_BOOT_CMDLINE ?= androidboot.console=ttyFIQ0 androidboot.wificountrycode=US

make clean
reboot
cd ~/WORKING_DIRECTORY
source build/envsetup.sh
lunch kedge2-userdebug
make -j4
./build.sh -u

The device shows my SSID and I type password. It fails to connect. Now it’s saying authentication timeout. If I leave the device, it will eventually attach without me doing anything to the device?

08-28 22:05:20.822   590  1131 D WifiNl80211Manager: Scan result ready event
08-28 22:05:20.822   590  1131 D WifiNative: Scan result ready event
08-28 22:05:24.280  1043  1043 W         : [dhd] [wlan0] wl_run_escan : LEGACY_SCAN sync ID: 2, bssidx: 0
08-28 22:05:20.859   590   698 D WificondScannerImpl: Filtering out 1 scan results.
08-28 22:05:20.888   590   694 D WifiScoreReport: setShouldReduceNetworkScore=false mNetworkAgent is null? true
08-28 22:05:20.888   590   694 D WifiClientModeImpl[wlan0]: CMD_START_CONNECT  my state DisconnectedState nid=0 roam=false
08-28 22:05:20.890   590   694 I WifiClientModeImpl[wlan0]: Connecting with 70:f7:54:b8:c3:fd as the mac address
08-28 22:05:20.890   498   498 W wificond: Scan is not started. Ignore abort request
08-28 22:05:20.890   590   694 D SupplicantStaIfaceHal: connectToNetwork "Sentinel24G"WPA_PSK
08-28 22:05:20.891   590   694 D SupplicantStaIfaceHal: Network is already saved, will not trigger remove and add operation.
08-28 22:05:20.896   590   694 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {ConcreteClientModeManager{id=9448 iface=wlan0 role=ROLE_CLIENT_PRIMARY}=false}
08-28 22:05:20.896   590   694 D WifiClientModeImpl[wlan0]: Start Connecting Watchdog 2
08-28 22:05:20.901   498   498 I wificond: Received external scan result notification from kernel.
08-28 22:05:20.901   498   498 W wificond: Scan aborted
08-28 22:05:20.902   590  1131 D WifiNl80211Manager: Scan failed event
08-28 22:05:20.902   590  1131 D WifiNative: Scan failed event
08-28 22:05:20.902   590   698 W WificondScannerImpl: Scan failed
08-28 22:05:20.903  1043  1043 I wpa_supplicant: wlan0: Trying to associate with SSID 'Sentinel24G'
08-28 22:05:24.376  1043  1043 W         : [dhd] [wlan0] wl_ext_set_chanspec : channel 5g-36(0xe02a 80MHz)
08-28 22:05:24.377  1043  1043 W         : [dhd] [wlan0] wl_conn_debug_info : Connecting with 3c:84:6a:8f:68:af ssid "Sentinel24G", len (11), channel=5g-36(chan_cnt=1), sec=wpa2/psk/mfpn/aes, rssi=0
08-28 22:05:21.326  1521  1521 D TestService: Rock check storage 6
08-28 22:05:22.011   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:05:22.012   403   403 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.19ms>
08-28 22:05:23.012   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:05:23.013   403   403 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.25ms>
08-28 22:05:23.226  1560  1578 D RKUpdateService: WorkHandler::handleMessage() : To perform 'COMMAND_CHECK_LOCAL_UPDATING'.
08-28 22:05:23.226  1560  1578 D RKUpdateService: try to search update file : /data/media/0/update.zip
08-28 22:05:23.226  1560  1578 D RKUpdateService: try to search update file : /storage/emulated/0/update.zip
08-28 22:05:24.013   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:05:24.014   403   403 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.27ms>
08-28 22:05:25.014   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:05:25.015   403   403 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.26ms>
08-28 22:05:26.016   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:05:26.017   403   403 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.25ms>
08-28 22:05:27.019   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:05:27.020   403   403 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.26ms>
08-28 22:05:28.019   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:05:28.020   403   403 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.26ms>
08-28 22:05:28.284  1560  1578 D RKUpdateService: request remote server error...
08-28 22:05:28.286   590   611 I DropBoxManagerService: add tag=system_app_strictmode isTagEnabled=true flags=0x2
08-28 22:05:29.020   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:05:29.021   403   403 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.26ms>
08-28 22:05:30.020   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:05:30.021   403   403 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.26ms>
08-28 22:05:30.927  1043  1043 I wpa_supplicant: wlan0: Authentication with 3c:84:6a:8f:68:af timed out.
08-28 22:05:34.385  1043  1043 W         : [dhd] [wlan0] wl_cfg80211_disconnect : Reason 3, act 1, bssid 00:00:00:00:00:00
08-28 22:05:34.386     0     0 W         : [    C0] [dhd] dhd_flow_rings_delete: ifindex 0
08-28 22:05:34.386   214   214 W         : [dhd] [wlan0] wl_ext_iapsta_link : connect failed event=0, reason=0, status=4
08-28 22:05:34.386   214   214 W         : [dhd] [wlan0] wl_handle_assoc_fail : assoc fail Reason: WLC_E_SET_SSID from 00:00:00:00:00:00
08-28 22:05:34.386   214   214 W         : [dhd] [wlan0] wl_bss_connect_done : Report connect result - connection failed
08-28 22:05:34.386   214   214 W         : [dhd] [wlan0] IAPSTA-ERROR) wl_ext_in4way_sync_sta : connect failed at 1
08-28 22:05:34.386   233   233 W         : [dhd] [wlan0] wl_iw_event : [1 times] disconnected with 00:00:00:00:00:00, event 11, reason 8
08-28 22:05:34.386   233   233 W         : [dhd] [wlan0] wl_ext_iapsta_link : [S] Link down with 00:00:00:00:00:00, WLC_E_DISASSOC(11), reason 8
08-28 22:05:34.387   607   607 W         : [dhd] [wlan0] wl_ext_iapsta_link : [S] Link down with 00:00:00:00:00:00, WLC_E_DISASSOC(11), reason 8
08-28 22:05:30.929   590   694 D WifiClientModeImpl[wlan0]: L2ConnectingState: Authentication failure  reason=1 error=-1
08-28 22:05:30.929   430   430 D WifiHAL : Start debug command
08-28 22:05:30.934   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:05:30.934   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:05:31.153  1043  1043 I wpa_supplicant: wlan0: CTRL-EVENT-DISCONNECTED bssid=3c:84:6a:8f:68:af reason=3 locally_generated=1
08-28 22:05:31.156   430   430 D WifiHAL : Start debug command
08-28 22:05:31.157  1043  1043 I wpa_supplicant: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=3c:84:6a:8f:68:af status_code=1
08-28 22:05:31.158   590  1619 D SupplicantStaIfaceCallbackImpl: flush PMK cache due to association rejection for config id 0.
08-28 22:05:34.626   296   296 I logd    : logdr: UID=1000 GID=1000 PID=1896 n tail=127 logMask=19 pid=0 start=0ns deadline=0ns
08-28 22:05:31.183   430   430 D WifiHAL : Start get packet fate command
08-28 22:05:31.184   430   430 D WifiHAL : createRequest Get Tx packet fate request
08-28 22:05:31.184   430   430 D WifiHAL : In GetPktFateCommand::handleResponse
08-28 22:05:31.184   430   430 I WifiHAL : Id = 0, subcmd = 0, len = 8
08-28 22:05:31.184   430   430 I WifiHAL : Response recieved for get TX pkt fate command
08-28 22:05:31.184   430   430 I WifiHAL : No: of pkt fates provided is 0
08-28 22:05:34.641   430   430 W [dhd] dhd_dbg_monitor_get_tx_pkts(): no tx_status in tx completion messages, make sure that 'd11status' is enabled in firmware, status_pos=0
08-28 22:05:31.184   430   430 D WifiHAL : Start get packet fate command
08-28 22:05:31.184   430   430 D WifiHAL : createRequest Get Rx packet fate request
08-28 22:05:31.184   430   430 D WifiHAL : In GetPktFateCommand::handleResponse
08-28 22:05:31.184   430   430 I WifiHAL : Id = 0, subcmd = 0, len = 8
08-28 22:05:31.184   430   430 I WifiHAL : Response recieved for get RX pkt fate command
08-28 22:05:31.184   430   430 I WifiHAL : No: of pkt fates provided is 0
08-28 22:05:31.186   590   694 E WifiVendorHal: stopRssiMonitoring(l.2617) failed {.code = ERROR_NOT_AVAILABLE, .description = }
08-28 22:05:31.188   590   694 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {ConcreteClientModeManager{id=9448 iface=wlan0 role=ROLE_CLIENT_PRIMARY}=true}
08-28 22:05:31.188   590   694 D WifiCountryCode: Reading country code from telephony
08-28 22:05:31.189   590   694 D WifiCountryCode: Set telephony country code to: 
08-28 22:05:31.189   590   694 D WifiCountryCode: updateCountryCode to US
08-28 22:05:31.190  1043  1043 I wpa_supplicant: wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
08-28 22:05:31.191   590   694 D WifiNative: onSetCountryCodeSucceeded: US
08-28 22:05:31.191   590   694 I WifiCountryCode: Receive onSetCountryCodeSucceeded US
08-28 22:05:31.191   590   694 I WifiClientModeImpl[wlan0]: disconnectedstate enter
08-28 22:05:31.192   590   694 E WifiScoringParams: Invalid frequency(-1), using 5G as default rssi array
08-28 22:05:31.194   590   694 E SupplicantStateTracker[wlan0]: Ignoring { when=-36ms what=147499 obj= ssid: "" bssid: 3c:84:6a:8f:68:af statusCode: 1 timedOut: false oceRssiBasedAssocRejectInfo: null mboAssocDisallowedInfo: null target=com.android.wifi.x.com.android.internal.util.StateMachine$SmHandler }
08-28 22:05:31.194   590   694 I WifiService: onDriverCountryCodeChanged US

More suspicious logcat messages:

WifiNl80211Manager: Scan result ready event
08-28 22:15:28.415   590  1294 D WifiNative: Scan result ready event
08-28 22:15:28.423   590   698 D WificondScannerImpl: Filtering out 4 scan results.
08-28 22:15:28.451   590   694 D WifiScoreReport: setShouldReduceNetworkScore=false mNetworkAgent is null? true
08-28 22:15:28.451   590   694 D WifiClientModeImpl[wlan0]: CMD_START_CONNECT  my state DisconnectedState nid=2 roam=false
08-28 22:15:28.453   590   694 I WifiClientModeImpl[wlan0]: Connecting with 70:f7:54:b8:c3:fd as the mac address
08-28 22:15:28.453   498   498 W wificond: Scan is not started. Ignore abort request
08-28 22:15:28.453   590   694 D SupplicantStaIfaceHal: connectToNetwork "Sentinel24G"WPA_PSK
08-28 22:15:28.454   590   694 D SupplicantStaIfaceHal: Network is already saved, will not trigger remove and add operation.
08-28 22:15:28.455  1043  1043 I wpa_supplicant: wlan0: Trying to associate with SSID 'Sentinel24G'
08-28 22:15:28.456   590   694 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {ConcreteClientModeManager{id=9448 iface=wlan0 role=ROLE_CLIENT_PRIMARY}=false}
08-28 22:15:28.456   590   694 D WifiClientModeImpl[wlan0]: Start Connecting Watchdog 11
08-28 22:15:31.919  1043  1043 W         : [dhd] [wlan0] wl_ext_set_chanspec : channel 5g-36(0xe02a 80MHz)
08-28 22:15:31.920  1043  1043 W         : [dhd] [wlan0] wl_conn_debug_info : Connecting with 3c:84:6a:8f:68:af ssid "Sentinel24G", len (11), channel=5g-36(chan_cnt=1), sec=wpa2/psk/mfpn/aes, rssi=0
08-28 22:15:28.779   898   898 E PreferenceGroup: Found duplicated key: "StandardWifiEntry:{"SCAN_RESULT_KEY":"{\"SSID\":\"Sentinel24G\",\"SECURITY_TYPES\":[2,4]}","IS_TARGETING_NEW_NETWORKS":true}". This can cause unintended behaviour, please use unique keys for every preference.
08-28 22:15:29.569   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:15:29.570   403   447 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.34ms>
08-28 22:15:30.287   590  1042 I WifiService: startScan uid=1000
08-28 22:15:30.307   498   498 E wificond: NL80211_CMD_TRIGGER_SCAN failed: Device or resource busy
08-28 22:15:30.307   590   698 E WificondScannerImpl: Failed to start scan, freqs=null
08-28 22:15:33.764   498   498 W         : [dhd] [wlan0] IAPSTA-ERROR) wl_ext_in4way_sync_sta : scan during connecting... 1
08-28 22:15:30.310   590   694 E WifiScanRequestProxy: Scan failure received. reason: -1,description: Scan failed
08-28 22:15:30.569   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:15:30.570   403   447 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.27ms>
08-28 22:15:31.573   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:15:31.573   403   447 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.26ms>
08-28 22:15:32.574   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:15:32.575   403   447 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.26ms>
08-28 22:15:33.573   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:15:33.574   403   447 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.27ms>
08-28 22:15:34.573   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:15:34.575   403   447 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.28ms>
08-28 22:15:35.575   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:15:35.575   403   447 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.31ms>
08-28 22:15:36.575   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:15:36.579   403   447 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.28ms>
08-28 22:15:37.579   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:15:37.580   403   447 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.26ms>
08-28 22:15:38.491  1043  1043 I wpa_supplicant: wlan0: Authentication with 3c:84:6a:8f:68:af timed out.
08-28 22:15:41.949  1043  1043 W         : [dhd] [wlan0] wl_cfg80211_disconnect : Reason 3, act 1, bssid 00:00:00:00:00:00
08-28 22:15:41.951     0     0 W         : [    C0] [dhd] dhd_flow_rings_delete: ifindex 0
08-28 22:15:41.951   607   607 W         : [dhd] [wlan0] wl_ext_iapsta_link : connect failed event=0, reason=0, status=4
08-28 22:15:38.493   590   694 D WifiClientModeImpl[wlan0]: L2ConnectingState: Authentication failure  reason=1 error=-1
08-28 22:15:38.494   430   430 D WifiHAL : Start debug command
08-28 22:15:41.951   607   607 W         : [dhd] [wlan0] wl_iw_event : [1 times] disconnected with 00:00:00:00:00:00, event 11, reason 8
08-28 22:15:41.951   607   607 W         : [dhd] [wlan0] wl_ext_iapsta_link : [S] Link down with 00:00:00:00:00:00, WLC_E_DISASSOC(11), reason 8
08-28 22:15:41.951   233   233 W         : [dhd] [wlan0] wl_handle_assoc_fail : assoc fail Reason: WLC_E_SET_SSID from 00:00:00:00:00:00
08-28 22:15:38.497   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:15:41.951   233   233 W         : [dhd] [wlan0] wl_bss_connect_done : Report connect result - connection failed
08-28 22:15:41.951   233   233 W         : [dhd] [wlan0] IAPSTA-ERROR) wl_ext_in4way_sync_sta : connect failed at 1
08-28 22:15:38.497   590   609 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: true
08-28 22:15:41.952   607   607 W         : [dhd] [wlan0] wl_ext_iapsta_link : [S] Link down with 00:00:00:00:00:00, WLC_E_DISASSOC(11), reason 8
08-28 22:15:38.720  1043  1043 I wpa_supplicant: wlan0: CTRL-EVENT-DISCONNECTED bssid=3c:84:6a:8f:68:af reason=3 locally_generated=1
08-28 22:15:38.721   430   430 D WifiHAL : Start debug command
08-28 22:15:38.724  1043  1043 I wpa_supplicant: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=3c:84:6a:8f:68:af status_code=1
08-28 22:15:38.725   590  1619 D SupplicantStaIfaceCallbackImpl: flush PMK cache due to association rejection for config id 2.
08-28 22:15:42.191   296   296 I logd    : logdr: UID=1000 GID=1000 PID=2130 n tail=127 logMask=19 pid=0 start=0ns deadline=0ns
08-28 22:15:38.771   430   430 D WifiHAL : Start get packet fate command
08-28 22:15:38.772   430   430 D WifiHAL : createRequest Get Tx packet fate request
08-28 22:15:38.772   430   430 D WifiHAL : In GetPktFateCommand::handleResponse
08-28 22:15:38.772   430   430 I WifiHAL : Id = 0, subcmd = 0, len = 8
08-28 22:15:38.772   430   430 I WifiHAL : Response recieved for get TX pkt fate command
08-28 22:15:38.772   430   430 I WifiHAL : No: of pkt fates provided is 0
08-28 22:15:38.772   430   430 D WifiHAL : Start get packet fate command
08-28 22:15:38.772   430   430 D WifiHAL : createRequest Get Rx packet fate request
08-28 22:15:38.773   430   430 D WifiHAL : In GetPktFateCommand::handleResponse
08-28 22:15:38.773   430   430 I WifiHAL : Id = 0, subcmd = 0, len = 8
08-28 22:15:38.773   430   430 I WifiHAL : Response recieved for get RX pkt fate command
08-28 22:15:38.773   430   430 I WifiHAL : No: of pkt fates provided is 0
08-28 22:15:42.229   430   430 W [dhd] dhd_dbg_monitor_get_tx_pkts(): no tx_status in tx completion messages, make sure that 'd11status' is enabled in firmware, status_pos=0
08-28 22:15:38.774   590   694 E WifiVendorHal: stopRssiMonitoring(l.2617) failed {.code = ERROR_NOT_AVAILABLE, .description = }
08-28 22:15:38.777   590   694 D WifiCountryCode: evaluateAllCmmStateAndApplyIfAllReady: {ConcreteClientModeManager{id=9448 iface=wlan0 role=ROLE_CLIENT_PRIMARY}=true}
08-28 22:15:38.778   590   694 D WifiCountryCode: Reading country code from telephony
08-28 22:15:38.779   590   694 D WifiCountryCode: Set telephony country code to: 
08-28 22:15:38.780   590   694 D WifiCountryCode: updateCountryCode to US
08-28 22:15:38.781  1043  1043 I wpa_supplicant: wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
08-28 22:15:38.782   590   694 D WifiNative: onSetCountryCodeSucceeded: US
08-28 22:15:38.782   590   694 I WifiCountryCode: Receive onSetCountryCodeSucceeded US
08-28 22:15:38.784   590   694 I WifiClientModeImpl[wlan0]: disconnectedstate enter
08-28 22:15:38.785   590   694 E WifiScoringParams: Invalid frequency(-1), using 5G as default rssi array
08-28 22:15:38.787   590   694 E WifiClientModeImpl[wlan0]: Error! unhandled message{ when=-293ms what=131145 arg1=10 target=com.android.wifi.x.com.android.internal.util.StateMachine$SmHandler }
08-28 22:15:38.791   590   694 E SupplicantStateTracker[wlan0]: Ignoring { when=-64ms what=147499 obj= ssid: "" bssid: 3c:84:6a:8f:68:af statusCode: 1 timedOut: false oceRssiBasedAssocRejectInfo: null mboAssocDisallowedInfo: null target=com.android.wifi.x.com.android.internal.util.StateMachine$SmHandler }
08-28 22:15:38.791   590   694 I WifiService: onDriverCountryCodeChanged US
08-28 22:15:38.802   590   694 E ApConfigUtil: Malformed channel value detected: java.lang.NumberFormatException: For input string: ""
08-28 22:15:38.813   403   447 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.31ms>
08-28 22:15:38.813   403   447 I netd    : interfaceGetCfg(wlan0) -> {InterfaceConfigurationParcel{ifName: wlan0, hwAddr: 70:f7:54:b8:c3:fd, ipv4Addr: 0.0.0.0, prefixLength: 0, flags: [up, broadcast, multicast]}} <0.17ms>
08-28 22:15:42.274   498   498 W         : [dhd] [wlan0] wl_run_escan : LEGACY_SCAN sync ID: 45, bssidx: 0
08-28 22:15:42.312   296   296 I logd    : logdr: UID=1000 GID=1000 PID=2132 n tail=127 logMask=80 pid=0 start=0ns deadline=0ns
08-28 22:15:40.297   590   747 I WifiService: startScan uid=1000
08-28 22:15:41.844   590   694 D WifiConfigStore: Writing to stores completed in 4 ms.
08-28 22:15:42.755   590   747 D WifiNl80211Manager: Scan result ready event
08-28 22:15:42.755   590   747 D WifiNative: Scan result ready event
08-28 22:15:42.762   590   698 D WificondScannerImpl: Filtering out 4 scan results.
08-28 22:15:49.094   422   422 W healthd : battery l=50 v=3 t=2.6 h=2 st=3 c=-1600 fc=100 chg=au
08-28 22:15:50.337   590   747 I WifiService: startScan uid=1000
08-28 22:15:53.806   498   498 W         : [dhd] [wlan0] wl_run_escan : LEGACY_SCAN sync ID: 46, bssidx: 0
08-28 22:15:54.322   590   747 D WifiNl80211Manager: Scan result ready event
08-28 22:15:54.322   590   747 D WifiNative: Scan result ready event
08-28 22:15:54.332   590   698 D WificondScannerImpl: Filtering out 4 scan results.
08-28 22:16:00.369   590  1042 I WifiService: startScan uid=1000
08-28 22:16:03.847   498   498 W         : [dhd] [wlan0] wl_run_escan : LEGACY_SCAN sync ID: 47, bssidx: 0
08-28 22:16:04.359   590  1042 D WifiNl80211Manager: Scan result ready event
08-28 22:16:04.359   590  1042 D WifiNative: Scan result ready event
08-28 22:16:04.367   590   698 D WificondScannerImpl: Filtering out 2 scan results.
08-28 22:16:10.400   590  1042 I WifiService: startScan uid=1000
08-28 22:16:13.878   498   498 W         : [dhd] [wlan0] wl_run_escan : LEGACY_SCAN sync ID: 48, bssidx: 0
08-28 22:16:13.786   590   694 E WifiScoringParams: Invalid frequency(-1), using 5G as default rssi array
08-28 22:16:14.391   590  1042 D WifiNl80211Manager: Scan result ready event
08-28 22:16:14.391   590  1042 D WifiNative: Scan result ready event
08-28 22:16:14.400   590   698 D WificondScannerImpl: Filtering out 2 scan results.
08-28 22:16:20.433   590  1042 I WifiService: startScan uid=1000
08-28 22:16:23.911   498   498 W         : [dhd] [wlan0] wl_run_escan : LEGACY_SCAN sync ID: 49, bssidx: 0
08-28 22:16:24.429   590  1042 D WifiNl80211Manager: Scan result ready event
08-28 22:16:24.429   590  1042 D WifiNative: Scan result ready event
08-28 22:16:24.437   590   698 D WificondScannerImpl: Filtering out 1 scan results.
08-28 22:16:30.465   590  1294 I WifiService: startScan uid=1000
08-28 22:16:33.943   498   498 W         : [dhd] [wlan0] wl_run_escan : LEGACY_SCAN sync ID: 50, bssidx: 0
08-28 22:16:34.469   590  1294 D WifiNl80211Manager: Scan result ready event
08-28 22:16:34.469   590  1294 D WifiNative: Scan result ready event
08-28 22:16:34.478   590   698 D WificondScannerImpl: Filtering out 2 scan results.
08-28 22:16:38.519   590   610 W InputDispatcher: Cannot transfer touch state because there is no exact window being touched
08-28 22:16:38.519   590   610 I WindowManager: Could not transfer touch to the status bar
08-28 22:16:40.498   590  1042 I WifiService: startScan uid=1000
08-28 22:16:43.969   498   498 W         : [dhd] [wlan0] wl_run_escan : LEGACY_SCAN sync ID: 51, bssidx: 0
08-28 22:16:44.507   590  1042 D WifiNl80211Manager: Scan result ready event
08-28 22:16:44.507   590  1042 D WifiNative: Scan result ready event
08-28 22:16:44.516   590   698 D WificondScannerImpl: Filtering out 1 scan results.
08-28 22:16:49.093   422   422 W healthd : battery l=50 v=3 t=2.6 h=2 st=3 c=-1600 fc=100 chg=au
08-28 22:16:50.517   590  1042 I WifiService: startScan uid=1000
08-28 22:16:53.993   498   498 W         : [dhd] [wlan0] wl_run_escan : LEGACY_SCAN sync ID: 52, bssidx: 0
08-28 22:16:54.540   590  1042 D WifiNl80211Manager: Scan result ready event
08-28 22:16:54.541   590  1042 D WifiNative: Scan result ready event
08-28 22:16:54.549   590   698 D WificondScannerImpl: Filtering out 3 scan results.
08-28 22:16:57.241   590   610 W InputDispatcher: Cannot transfer touch state because there is no exact window being touched
08-28 22:16:57.241   590   610 I WindowManager: Could not transfer touch to the status bar
08-28 22:17:00.308   768   768 D ViewRootImpl[NavigationBar0]: updatePointerIcon called with position out of bounds
08-28 22:17:00.550   590  1042 I WifiService: startScan uid=1000
08-28 22:17:04.028   498   498 W         : [dhd] [wlan0] wl_run_escan : LEGACY_SCAN sync ID: 53, bssidx: 0
08-28 22:17:02.698   768   768 D ViewRootImpl[NavigationBar0]: updatePointerIcon called with position out of bounds
08-28 22:17:02.828   898   898 W SettingsMetricsFeature: action(Pair<Integer, Object>... taggedData) is deprecated, Use action(int, int, int, String, int) instead.
08-28 22:17:02.831   590  1042 I WifiService: forget uid=1000
08-28 22:17:02.849   590   694 D WifiConfigStore: Writing to stores completed in 12 ms.
08-28 22:17:02.860   590   694 D WifiConfigStore: Writing to stores completed in 5 ms.
08-28 22:17:02.874   590   694 D WifiConfigStore: Writing to stores completed in 7 ms.
08-28 22:17:02.875   590   694 D SupplicantStaIfaceHal: Remove cached HAL data for config id 2
08-28 22:17:02.881   590  1239 D WifiMemoryStoreImpl: Remove cluster Gdd0a6634b8061469: SUCCESS deleted: 0
08-28 22:17:02.882   590   694 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcastMultiplePermissions:1214 android.content.Context.sendBroadcastWithMultiplePermissions:2275 com.android.server.wifi.WifiServiceImpl.broadcastWifiCredentialChanged:4879 com.android.server.wifi.WifiServiceImpl.lambda$forget$107:5021 com.android.server.wifi.WifiServiceImpl.$r8$lambda$7beg8AktVqd1-OeR0KEsKcRtDDM:0 
08-28 22:17:03.164   898  1039 D OpenGLRenderer: endAllActiveAnimators on 0xb4000074094e2e10 (MenuPopupWindow$MenuDropDownListView) with handle 0xb4000073192daef0
08-28 22:17:03.165   590  1294 W InputManager-JNI: Input channel object '74caa09 PopupWindow:fec23e1 (client)' was disposed without first being removed with the input manager!
08

I don’t quite understand. Can you explain it in more detail?

Additionally, please follow the steps below to capture the kernel logs:
1, adb root && adb remount
2, adb push config.txt vendor/etc/firmware/config.txt
3, adb shell sync && adb reboot
4, Reproduce the problem you mentioned
5, adb shell dmesg > kernel.log
6, Put the kernel.log file on the cloud drive or directly paste it.

config.txt File Content (For print more wifi LOG):
wl_suspend=3=0
wl_resume=2=0
insuspend0x7
dhd_console_ms=20
wl_dbg_level=0x9
dump_msg_level=0xf
dhd_msg_level=0x801

@goenjoy Solution #1 WifiCountryCode=US

device/khadas/common$ git diff
diff --git a/BoardConfig.mk b/BoardConfig.mk
index b1ecb7c..5d0d32c 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -100,11 +100,11 @@ ifeq ($(TARGET_BUILD_VARIANT), user)
 PRODUCT_KERNEL_CONFIG += non_debuggable.config
 endif
 
-ROCKCHIP_ANDROID_BOOT_CMDLINE ?= androidboot.console=ttyFIQ0 androidboot.wificountrycode=CN
+ROCKCHIP_ANDROID_BOOT_CMDLINE ?= androidboot.console=ttyFIQ0 androidboot.wificountrycode=US

WifiCountryCode=US SUCCESS

You have taught me how to successfully modify Android 12 to WifiCountryCode=US. On first boot, I experienced 5G connectivity issues. However, I have not been able to recreate the Wifi issues since changing to ccode=US and rebooting again after flashing and a successful first boot (aka a second full power cycle). In the first boot logcat file, I see the Wifi Authentication Timeouts occur around an “RKUpdateService” which fails. I do not see this service called again in subsequent reboots. Possible culprit? idk, but my original issue appears to be resolved. I’ll create a new post should something sprout.

@goenjoy Solution 2 - ADB write successfully.

1, adb root && adb remount
2, adb push config.txt vendor/etc/firmware/config.txt
3, adb shell sync && adb reboot
  1. Created config.txt on local machine
  2. cat config.txt
    wl_suspend=3=0
    wl_resume=2=0
    insuspend0x7
    dhd_console_ms=20
    wl_dbg_level=0x9
    dump_msg_level=0xf
    dhd_msg_level=0x801
  3. adb root
  4. adb remount
  5. adb push .\config.txt vendor/etc/firmware/config.txt
  6. adb sync
  7. adb reboot

ADB SUCCESS

You have taught me how to successfully modify Android 12 files through ADB by overwriting the config.txt file on the device without having to rebuild everything from source code.

Thank you very much!

1 Like

@byob11 If there are no issues, you need to remove these few lines of code, otherwise it will affect performance.

dhd_console_ms=20
wl_dbg_level=0x9
dump_msg_level=0xf
dhd_msg_level=0x801
1 Like