oh5.0.2 设置无法打开wifi,提示操作WLAN错误

问题描述:
1、oh5.0.2 设置无法打开wifi,提示操作WLAN错误
复现情况:
1、从下拉栏和设置中打开wifi失败。
2、从命令行ifconfig wlan0 up 可以正常开启wlan0,并且开启后,再从设置中打开WLAN正常,而且可以搜索并连接wifi正常使用。
设置中打开wifi的内核打印情况:
[dhd] dhd_open: Enter wlan0
[ 7480.666544] [dhd] dhd_open : no mutex held. set lock
[ 7480.666550] [dhd]
[ 7480.666550] Dongle Host Driver, version 100.10.545.19 (r826445-20210310-3)
[ 7480.666560] [dhd][wlan0] wl_android_wifi_on : in g_wifi_on=0
[ 7480.666565] [dhd] wifi_platform_set_power = 1, delay: 200 msec
[ 7480.666571] [dhd] ======== PULL WL_REG_ON(-1) HIGH! ========
[ 7480.666575] [WLAN_RFKILL]: rockchip_wifi_power: 1
[ 7480.666580] [WLAN_RFKILL]: rockchip_wifi_power: toggle = false
[ 7480.666583] [WLAN_RFKILL]: wifi turn on power [GPIO-1-0]
[ 7480.972749] sdio_reset_comm():
[ 7481.192782] mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[ 7481.209643] mmc_host mmc0: Bus speed (slot 0) = 187500Hz (slot req 100000Hz, actual 93750HZ div = 1)
[ 7481.266776] mmc0: queuing unknown CIS tuple 0x80 (2 bytes)
[ 7481.273007] mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
[ 7481.279223] mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
[ 7481.290402] mmc0: queuing unknown CIS tuple 0x80 (7 bytes)
[ 7481.304055] mmc0: queuing unknown CIS tuple 0x81 (9 bytes)
[ 7481.509825] mmc_host mmc0: Bus speed (slot 0) = 150000000Hz (slot req 150000000Hz, actual 150000000HZ div = 0)
[ 7481.642300] dwmmc_rockchip fe2d0000.mmc: Successfully tuned phase to 145
[ 7481.642356] [dhd] sdioh_start: set sd_f2_blocksize 256
[ 7481.642604] [dhd] dhd_bus_devreset: == Power ON ==
[ 7481.642868] [dhd] F1 signature read @0x18000000=0x15294345
[ 7481.645710] [dhd] F1 signature OK, socitype:0x1 chip:0x4345 rev:0x9 pkg:0x2
[ 7481.646276] [dhd] DHD: dongle ram size is set to 819200(orig 819200) at 0x198000
[ 7481.646329] [dhd] dhd_bus_devreset: making DHD_BUS_DOWN
[ 7481.646367] [dhd] dhdsdio_probe_init: making DHD_BUS_DOWN
[ 7481.646472] [dhd] dhd_conf_read_config : Ignore config file /vendor/etc/firmware/config.txt
[ 7481.646482] [dhd] dhd_conf_set_path_params : Final fw_path=/vendor/etc/firmware/fw_bcm43456c5_ag.bin
[ 7481.646485] [dhd] dhd_conf_set_path_params : Final nv_path=/vendor/etc/firmware/nvram_ap6256.txt
[ 7481.646489] [dhd] dhd_conf_set_path_params : Final clm_path=/vendor/etc/firmware/clm_bcm43456c5_ag.blob
[ 7481.646492] [dhd] dhd_conf_set_path_params : Final conf_path=/vendor/etc/firmware/config.txt
[ 7481.646893] ######################################pfw_path:/vendor/etc/firmware/fw_bcm43456c5_ag.bin
[ 7481.646900] [dhd] dhdsdio_download_code_file: Open firmware file failed /vendor/etc/firmware/fw_bcm43456c5_ag.bin
[ 7481.646906] [dhd] _dhdsdio_download_firmware: dongle image file download failed
[ 7481.646927] [dhd] dhd_bus_devreset Failed to download binary to the dongle
[ 7481.646933] [dhd] dhd_net_bus_devreset: dhd_bus_devreset: -35
[ 7481.646940] [dhd] dhd_dbg_detach_pkt_monitor, 2100
[ 7481.646945] [dhd] dhd_net_bus_devreset: dhd_bus_devreset: -35
[ 7481.646991] [dhd] wifi_platform_set_power = 0, delay: 0 msec
[ 7481.646996] [dhd] ======== PULL WL_REG_ON(-1) LOW! ========
[ 7481.647000] [WLAN_RFKILL]: rockchip_wifi_power: 0
[ 7481.647005] [WLAN_RFKILL]: rockchip_wifi_power: toggle = false
[ 7481.647009] [WLAN_RFKILL]: wifi shut off power [GPIO-1-1]
[ 7481.647013] [dhd][wlan0] wl_android_wifi_on : Failed
[ 7481.647017] [dhd] dhd_open : wl_android_wifi_on failed (-35)
[ 7481.647021] [dhd] dhd_stop: Enter wlan0
[ 7481.647027] [dhd][wlan0] wl_android_wifi_off : in g_wifi_on=0, on_failure=1
[ 7481.647031] [dhd] dhd_dbg_detach_pkt_monitor, 2100
[ 7481.647035] [dhd] dhd_net_bus_devreset: dhd_bus_devreset: -35
[ 7481.647072] [dhd] wifi_platform_set_power = 0, delay: 0 msec
[ 7481.647077] [dhd] ======== PULL WL_REG_ON(-1) LOW! ========
[ 7481.647080] [WLAN_RFKILL]: rockchip_wifi_power: 0
[ 7481.647083] [WLAN_RFKILL]: rockchip_wifi_power: toggle = false
[ 7481.647086] [WLAN_RFKILL]: wifi shut off power [GPIO-1-1]
[ 7481.647089] [dhd][wlan0] wl_android_wifi_off : out
[ 7481.647096] [dhd] dhd_stop: Exit wlan0
[ 7481.647099] [dhd] dhd_open : the lock is released.
[ 7481.647103] [dhd] dhd_open: Exit wlan0 ret=-1
[ 7481.647106] [dhd] Failed to open primary dev ret -1
[ 7482.967841] [dhd] dhd_open: Enter wlan0
[ 7482.967855] [dhd] dhd_open : no mutex held. set lock
[ 7482.967861] [dhd]
[ 7482.967861] Dongle Host Driver, version 100.10.545.19 (r826445-20210310-3)
可以看到是无法打开wifi的驱动文件。
hilog部分日志:
01-01 20:12:49.004 2056 2056 I A00500/[Settings]: Settings WifiModel -> wifi is already inactive
01-01 20:12:49.045 2056 2352 E C01406/OHOS::RS: RSRenderNode::UpdateFilterCacheWithBelowDirty filter cache is disabled.
01-01 20:12:49.061 276 276 I C02c11/APPSPAWN: [appspawn_kickdog.c:79]kick appspawn dog start
01-01 20:12:49.061 276 276 I C02c11/APPSPAWN: [appspawn_kickdog.c:47]OpenAppSpawnWatchdogFile
01-01 20:12:49.061 276 276 E C02c11/APPSPAWN: [appspawn_kickdog.c:29]open /proc/sys/hguard/user_list fail,errno:2
01-01 20:12:49.061 276 276 I C02c11/APPSPAWN: [appspawn_kickdog.c:57]open finish,result:-1
01-01 20:12:49.065 2056 2352 E C01406/OHOS::RS: RSRenderNode::UpdateFilterCacheWithBelowDirty filter cache is disabled.
01-01 20:12:49.131 2401 2402 E C05200/wpa_supplicant: Could not set interface wlan0 flags (UP): Operation not permitted
01-01 20:12:49.131 2401 2402 E C05200/wpa_supplicant: nl80211: Could not set interface 'wlan0' UP
01-01 20:12:49.131 2401 2402 I C05200/wpa_supplicant: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
01-01 20:12:49.131 2401 2402 E C05200/wpa_supplicant: wlan0: Failed to initialize driver interface
01-01 20:12:49.132 2401 2402 I C05200/wpa_supplicant: Enter eapol_sm_deinit
01-01 20:12:49.132 2401 2402 I C05200/wpa_supplicant: wlan0: Cancelling scan request
01-01 20:12:49.132 2401 2402 I C05200/wpa_supplicant: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
01-01 20:12:49.132 361 361 E C01560/WifiHalWpaCommon: <private> request success, but response FAIL
01-01 20:12:49.132 361 361 I C01560/WifiWpaHal: WpaCliAddIface failed, cmd: INTERFACE_ADD wlan0 /data/service/el1/public/wifi/wpa_supplicant/wpa_supplicant.conf, buf: FAIL
01-01 20:12:49.132 361 361 E C01560/WifiHalStaInterface: Failed to add wpa iface!
01-01 20:12:49.132 361 361 E C01560/WifiHalStaInterface: Failed to add wpa interface!
01-01 20:12:49.132 361 361 I C01560/WifiWpaHal: Remove interface: wlan0
01-01 20:12:49.132 361 361 I C01560/WifiHalStaInterface: Stop supplicant
01-01 20:12:49.132 361 361 I C01560/WifiWpaHal: Enter WpaCliWpaTerminate
01-01 20:12:49.132 2401 2402 I C05200/wpa_supplicant: eloop_terminate set eloop.terminate = 1
01-01 20:12:49.132 2401 2402 I C05200/wpa_supplicant: eloop_terminate set eloop.terminate = 0
01-01 20:12:49.132 361 361 I C01560/WifiHalModuleManage: Stop module internal check wpa process: 2401
01-01 20:12:49.132 361 361 I C01560/WifiHalModuleManage: Waitpid 2401 ret 0, tryTimes 29 and retry
01-01 20:12:49.232 361 361 I C01560/WifiHalModuleManage: Stop wpa process [2401] success, tryTimes 28
01-01 20:12:49.248 2056 2352 E C01406/OHOS::RS: RSRenderNode::UpdateFilterCacheWithBelowDirty filter cache is disabled.
01-01 20:12:49.269 2056 2352 E C01406/OHOS::RS: RSRenderNode::UpdateFilterCacheWithBelowDirty filter cache is disabled.
01-01 20:12:49.332 361 2403 I C01560/WifiWpaHal: =====================thread exit=======================
01-01 20:12:49.332 361 361 I C01560/WifiHalStaInterface: wpa_supplicant stop successfully
提示:wpa_supplicant: Could not set interface wlan0 flags (UP): Operation not permitte
您需要先 登录 才能评论/回答

全部评论(7)
请问解决没有?

2025-02-25 09:32:28
引用:“解决了base/startup/init/services/sandbox/system-sandbox64.json 中路径存在问题。 新增一下 { "src-path" : "/vendor", "sandbox-path" : "/vendor", "sandbox-flags" : [ &q”
谢了,我的也ok了

解决了base/startup/init/services/sandbox/system-sandbox64.json 中路径存在问题。
新增一下
{
"src-path" : "/vendor",
"sandbox-path" : "/vendor",
"sandbox-flags" : [ "bind", "rec", "private" ]
}, {
"src-path" : "/vendor/etc/firmware",
"sandbox-path" : "/vendor/etc/firmware",
"sandbox-flags" : [ "bind", "rec", "private" ]
},

看样子是权限问题。selinux关闭验证一下。 另外提供一下完整的hilog日志附件

2025-02-18 15:36:55