Qualcomm WiFi android
Layer migration (bcm4329)
Define the location of the kernel module (including the kernel module, firmware, NVRAM, and other kernel modules, such as the sdio driver or USB driver (if it is a USB Nic ))
Hardware/libhardware_legacy/WiFi/wifi. C.
Some Macros in wifi. C can be configured in boardconfig. mk.
Board_wpa_supplicant_driver: = wext
Wifi_driver_module_path: =/system/etc/DHD. Ko
Wifi_driver_module_name: = DHD
Wpa_supplicant_version: = ver_0_6_x
Go to system/CORE/rootdir/etc/init. qcom. RC.
The following two services are added:
Service wpa_supplicant/system/bin/logwrapper/system/bin/wpa_supplicant
-DWext
-IWlan0
-C/Data/MISC/WiFi/wpa_supplicant.conf
-DD
User WiFi system
GROUP SYSTEM
# Socket wpa_wlan0 dgram 660 WiFi
Disabled
Oneshot
-I <ifname>:
Network Interface Name
-C <conf>:Configuration File Name
-C <ctrl_intf>:Control Interface Name
-D <driver>:Driver type
-P <driver_param>:Driver Parameters
-B <br_ifname>:Bridge Interface Name
Http://blog.csdn.net/wyl123/article/details/4692617
The above website has an introduction
Wpa_supplicant
And wpa_cli usage:
Http://blog.163.com/wxiongn@126/blog/static/11788203820102262748358/
Add_network
1
> Set_network 2 SSID "gionee (znsj )"
Fail
> Set_network 1
<2> CTRL-EVENT-SCAN-RESULTS
SSID "gionee (znsj )"
OK
> Et_network 1 PSK "1234567890"
Unknown command 'Et _ Network'
> Set_network 1 PSK "1234567890"
<2> CTRL-EVENT-SCAN-RESULTS
"
OK
> Enable_network 1
OK
Service dhcpcd_wlan0/system/bin/dhcpcd-BKL-D wlan0-O domain_name_servers
Disabled
Oneshot
Android. mk in system/CORE/rootdir/can be copied:
# Files that live under/system/etc /...
Copy_from: = \
ETC/hosts. conf \
ETC/hosts \
ETC/init. qcom. post_boot.sh \
ETC/init. qcom. bt. sh \
ETC/init. qcom. Coex. sh \
ETC/init. qcom. fm. sh \
ETC/init. qcom. sdio. sh \
ETC/DHD. Ko \
ETC/fw_bcm4329.bin \
ETC/nvram.txt \
ETC/init. qcom. Wifi. Sh
This means to copy the files in system/CORE/rootdir/etc/to the/system/etc/directory of the system file system.
Go to the frameworks/base/WiFi/Java/Android/NET/WiFi/wifistatetracker. Java directory:
Minterfacename = systemproperties. Get ("wifi. Interface", "wlan0 ");
Sdnspropnames = new string [] {
"DHCP." + minterfacename + ". dns1 ",
"DHCP." + minterfacename + ". dns2"
};
Execution Process:
After wpa_supplicant is started:
The daemon generates an/data/MISC/WiFi/wpa_supplicant/wlan0 interface.
Based on wpa_cupplicant.conf:
Ctrl_interface = dir =/data/MISC/WiFi/wpa_supplicant group = WiFi
At the same time, create a socketies directory under/data/MISC/WiFi/. There will be two sockets
One is the control interface and the other is the monitoring interface (this interface is used to monitor Event Events sent from wpa_supplicant .).
Wi-Fi. c communicates with the daemon through these two interfaces.