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!

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM