Wifi

= Software Configuration =

Debian/ubuntu with NetworkManager
NetworkManager uses its own wpa_supplicant configuration. That is the reason why manually editing /etc/network/interfaces to use wpa_supplicant does not work together with NetworkManager.

You have to disable all interfaces in /etc/network/interfaces e.g. by commenting out each line by inserting "#" as a first character.

You even have to disable Ethernet section to use wifi in network manager. Here is an example # interfaces(5) file used by ifup(8) and ifdown(8) auto lo   iface lo inet loopback #allow-hotplug eth0 #iface eth0 inet dhcp #auto eth0 #iface eth0 inet static #address 192.168.101.50 #netmask 255.255.255.0 #gateway 192.168.101.1 #broadcast 192.168.101.255 #auto wlan0 #iface wlan0 inet dhcp #   wpa-ssid YOUR-NETWORK-NAME #   wpa-key-mgmt WPA-PSK #   wpa-group TKIP CCMP #   wpa-psk YOUR-NETWORK-KEY

At your desktop there should emerge a network icon from NetworkManager in the task bar. You can edit the network setting with the gui dialogs.

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

Espressif
Espressif is a fairly young Chinese company.

esp8089
Module source is available from linux-rockchip repository.