Wifi

= Software Configuration =

Setup with wpa_supplicant and without network manager
There are many tutorials out there on how to do this. Here is a good one.

Disabling networkmanager. Fully.
Even with the common trick of putting the following in /etc/NetworkManager/NetworkManager.conf [ifupdown] managed=true the despotic NetworkManager still will be messing up your careful setup from /etc/network/interfaces, and you might, once again, be left without wifi upon the next reboot.

To stop NetworkManager from running altogether, you can run the following (as root):

echo "manual" > /etc/init/network-manager.override

Now, at least on ubuntu, your wifi driver, wpa_supplicant and ifupdown will not be smacked about anymore.

Simple and dumb WPA setup
Install the following packages, if they are not installed already:

apt-get install wireless-tools wpasupplicant

Edit /etc/network/interfaces and add the following:

auto wlan0 iface wlan0 inet dhcp wpa-ssid YourSSID wpa-psk YourWPASharedKey

This is the most basic, but static, setup possible for wifi. If you need anything more, you need to read up on wpa_supplicant, or run through one of the tutorials referenced above.

=Driver specific information=

Driver refuses to load
When using the rt5370sta, 8188eu, 8189es or 8192cu drivers, which are all for USB based realtek devices, it might occur that the driver refuses to load:

ERR: script_parser_fetch usb_wifi_usbc_num failed modprobe: can't load module 8188eu (kernel/drivers/net/wireless/rtl8188eu/8188eu.ko): Cannot allocate memory

This is because the usb_wifi_para section is missing from your script.bin:

[usb_wifi_para] usb_wifi_used = 1 usb_wifi_usbc_num = 2

Where usb_wifi_usbc_num is the usbc to which your realtek usb wireless chip is attached.

Edit the .fex file and create the script .bin as explained in our Manual build howto, and  send a patch to sunxi-boards in to our mailinglist.

8192cu
Workaround for dropping connection because power save.

[ 1139.170000] rtl8192c_dm_RF_Saving: RF_Normal [ 1139.170000] rtl8192c_set_FwPwrMode_cmd: Mode = 1, SmartPS = 2 [ 1139.850000] rtw_set_ps_mode: Busy Traffic, Leave 802.11 power save.. [ 1139.850000] rtl8192c_set_FwPwrMode_cmd: Mode = 0, SmartPS = 0 [ 1141.170000] rtl8192c_dm_RF_Saving: RF_Save [ 1145.170000] rtw_set_ps_mode: Enter 802.11 power save mode...

To fix the problem create a file /etc/modprobe.d/8192cu.conf with the following contents: options 8192cu rtw_power_mgnt=0 rtw_enusbss=0