• wpa_supplicant启动出错rfkill: Cannot open RFKILL control device


    在板子是调试网络,千辛万苦把wpa_supplicant及其依赖都移植编译进来了,在板子上调试启动的时候启动报错了

    D/wpa_supplicant( 1152): wpa_supplicant v2.1-devel-4.4.2
    D/wpa_supplicant( 1152): random: Trying to read entropy from /dev/random
    I/wpa_supplicant( 1152): Successfully initialized wpa_supplicant
    D/wpa_supplicant( 1152): Initializing interface 'wlan0' conf '/system/etc/wifi/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
    D/wpa_supplicant( 1152): Configuration file '/system/etc/wifi/wpa_supplicant.conf' -> '/system/etc/wifi/wpa_supplicant.conf'
    D/wpa_supplicant( 1152): Reading configuration file '/system/etc/wifi/wpa_supplicant.conf'
    D/wpa_supplicant( 1152): update_config=1
    D/wpa_supplicant( 1152): ctrl_interface='wlan0'
    D/wpa_supplicant( 1152): eapol_version=1
    D/wpa_supplicant( 1152): ap_scan=1
    D/wpa_supplicant( 1152): fast_reauth=1
    I/wpa_supplicant( 1152): rfkill: Cannot open RFKILL control device
    D/wpa_supplicant( 1152): nl80211: RFKILL status not available
    D/WifiHWInfo( 1152): /data/misc/wifi/wifi_hardware_info not exist, try to create it!
    rfkill: Cannot open RFKILL control device
    打开rfkill失败,这是一个控制接口应该在/dev/rfkill,看了下板子上,确实没有这个设备接口。
    RFKill
    Many computer systems contain radio transmitters, including Wi-Fi, Bluetooth, and 3G devices. These devices consume power, which is wasted when the device is not in use.
    RFKill is a subsystem in the Linux kernel that provides an interface through which radio transmitters in a computer system can be queried, activated, and deactivated. When transmitters are deactivated, they can be placed in a state where software can reactive them (a  soft block) or where software cannot reactive them (a  hard block).
    The RFKill core provides the application programming interface (API) for the subsystem. Kernel drivers that have been designed to support RFkill use this API to register with the kernel, and include methods for enabling and disabling the device. Additionally, the RFKill core provides notifications that user applications can interpret and ways for user applications to query transmitter states.
    The RFKill interface is located at  /dev/rfkill, which contains the current state of all radio transmitters on the system. Each device has its current RFKill state registered in  sysfs. Additionally, RFKill issues  uevents for each change of state in an RFKill-enabled device.
    Rfkill is a command-line tool with which you can query and change RFKill-enabled devices on the system. To obtain the tool, install the  rfkill package.
    Use the command  rfkill list to obtain a list of devices, each of which has an  index number associated with it, starting at

    这是内核编译的时候没有打开,需要在内核里面

    CONFIG_RFKILL

    打开配置及其一些子项打开

    CONFIG_RFKILL=y
     908 CONFIG_RFKILL_PM=y
     909 # CONFIG_RFKILL_INPUT is not set
     910 # CONFIG_RFKILL_REGULATOR is not set
     911 # CONFIG_RFKILL_GPIO is not set
     912 # CONFIG_RFKILL_RESET is not set
     913 CONFIG_RFKILL_RK=y
     914 # CONFIG_NET_9P is not set
     915 # CONFIG_CAIF is not set
     916 # CONFIG_CEPH_LIB is not set

    重新编译打包烧录,重新启动wap

    root@dolphin-fvd-p1:/ # ls /dev/rfkill                                         
    /dev/rfkill
    root@dolphin-fvd-p1:/ # wpa_supplicant  -iwlan -c/system/etc/wifi/wpa_supplicant.conf                                        
    --------- beginning of /dev/log/main
    __bionic_open_tzdata: couldn't find any tzdata when looking for Asia/Shanghai!
    __bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
    __bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
    D/WifiHWInfo( 1155): /data/misc/wifi/wifi_hardware_info not exist, try to create it!
  • 相关阅读:
    理解区块链之前,先上手体验一把数字货币(2018-04-06 陈浩 第6讲)
    约瑟夫·卢宾《以太坊:从底层揭秘区块链应用和机会》2018-04-21
    以太坊智能合约介绍,Solidity介绍
    新浪微博 [异常问题] 414 Request-URL Too Large
    Google自动广告,将广告代码放置在 HTML 中的什么位置?
    囤币一族,被中国市场遗忘的价值币ADA
    基于EOS开发的Dapp大全
    朴素贝叶斯算法,贝叶斯分类算法,贝叶斯定理原理
    区块链3.0 ada Cardano卡尔达诺如何获得一致好评?
    拜占庭将军问题(Byzantine Generals Problem),一个关于分布式系统容错问题故事
  • 原文地址:https://www.cnblogs.com/tid-think/p/10905056.html
Copyright © 2020-2023  润新知