Enabling Wi-Fi hardware¶
Wifi is fairly easy to get going on most Qualcomm devices. The following should enable your device’s Wi-Fi hardware:
echo 1 > /dev/wcnss_wlan echo sta > /sys/module/wlan/parameters/fwpath
It is recommended to build Broadcom drivers as a module since that will ensure use of the device’s MAC address.
In the kernel defconfigs, make sure these settings are set:
Then add this to your device’s init.rc file, it’s recommended to set this in early stages to avoid race condition with network manager (
on post-fs-data is a good place for this):
Testing Wi-Fi functionality¶
You may run the following command to see if your Wi-Fi hardware has come up:
Your device should show up as
wlan0 and have a state of “Disconnected” when it is ready. At that point, run the following command to enter an interface that you can use to connect to Wi-Fi:
Once you are connected to Wi-Fi, try pinging an Internet device:
If all of this is successful, you have successfully brought up your Wi-Fi hardware. If not, check your device’s Logcat for possible errors.
Kernel 3.10 ping:
socket: Permission denied¶
This error is most common on devices which shipped with Linux kernel 3.10. To resolve it, apply the following patches: