Wifi

From linux-sunxi.org
Jump to navigation Jump to search

Driver specific information

Allwinner

Device Type sdio id sunxi-3.4 kernel mainline kernel 4.9.170-sun50iw9 kernel
XR819 SDIO 0020:2281 xradio_wlan
AW859A SDIO 8800:1 sunxi-wlan

XR819

For XR819 driver source was included in Allwinner H2 BSP.

Firmware firmware blobs can be found from Armbian firmware repository.

Also some documentation is available now:

May be related to ST cw1XX0 [1].

Initial comparison between cw1200 (drivers/net/wireless/st/cw1200) and xradio driver shows that the source code for two drivers are really similar and the st1200 driver could be improved to support both devices.

A working out-of-tree driver for mainline kernels is at [2].

AW859A

For AW859A driver source was include in Allwinner H616 Orange Pi Zero2 BSP, you can get it from orangepi-build repository.

Firmware firmware blobs can be found from orangepi firmware respository.

Ampak

Ampak combines broadcom wifi and bluetooth chips in single modules.

Ampak Devices

Device Type usb/sdio id module sunxi-3.4 kernel mainline kernel
AP6181 SDIO/UART 02d0:a962 See right bcmdhd brcmfmac
AP6210 SDIO/UART 02d0:a962 See right bcmdhd brcmfmac
AP6212 SDIO/UART 02d0:a9a6 See right brcmfmac
AP6330 SDIO/UART 02d0:4330 See right brcmfmac
AP6335 SDIO/UART 02d0:4335 See right brcmfmac

Broadcom

Broadcom Devices

Device Type usb/sdio id module sunxi-3.4 kernel mainline kernel
BCM4334 0x4334 brcmfmac brcmfmac since 3.6+

Espressif

Espressif is a fairly young Chinese company.

Espressif Devices

Device Type sdio id module sunxi-3.4 kernel mainline kernel
ESP8089 SDIO 6666:1111 out-of-tree driver exists

ESP8089

Firstly, you should use Hans de Goede's sunxi-wip kernel branch containing various bits and pieces needed to make things work.

Driver itself is currently in its own repository:

git clone https://github.com/jwrdegoede/esp8089.git
cd esp8089
git checkout -B cleanup origin/cleanup
cd ../linux
make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnu- modules M=../esp8089 CONFIG_ESP8089=m

Do not forget to copy firmware/*.bin to /lib/firmware/ on the target system.

iNet

iNet Devices

Device Type usb id module sunxi-3.4 kernel mainline kernel
iNet i10

RDA

RDA Microelectronics is a relatively unknown and new chinese chipmaker.

Device Type usb id / sdio id module sunxi-3.4 kernel mainline kernel
RDA5990P
RDA5991 SDIO 5449:0145

The RDA5990P is a single chip solution which includes Wifi, Bluetooth and an FM radio. Some code for this wifi chip is available in a Rockchip RK3188 kernel tree, but nobody has tested or ported this code yet.

Datasheets: RDA5990P RDA5990

Realtek

USB-based

MBOX icon important.png Best up-to-date information about Realtek driver in mainline Linux is available from Linux Wireless Project's Realtek drivers page.
Device Type USB id mainline kernel legacy (sunxi-3.4)
RTL8188CTV USB 0bda:8176 rtl8xxxu / rtl8192cu 8192cu
RTL8188CUS USB 0bda:8176 rtl8xxxu / rtl8192cu 8192cu
RTL8188ETV USB 0bda:0179 rtl8188eu (staging) 8188eu (see below)
RTL8188EUS USB 0bda:8179 rtl8188eu (staging) 8188eu (see below)
RTL8192CU USB 0bda:018a rtl8192cu 8192cu
RTL8723AU USB 0bda:0724 rtl8xxxu / rtl8723au (staging) 8723au

SDIO-based

MBOX icon important.png Best up-to-date information about Realtek driver in mainline Linux is available from Linux Wireless Project's Realtek drivers page.
Device Type SDIO id mainline kernel legacy (sunxi-3.4)
RTL8189ES SDIO ?? out-of-tree driver (see below) ??
RTL8189FTV SDIO 024c:f179 out-of-tree driver (see below) ??
RTL8723BS
RTL8703AS
SDIO

024c:0523
024c:0623
024c:0626
024c:b723

rtl8723bs (staging) 8723bs
RTL8821CS SDIO 024c:c821 rtw88 (since v6.4) ??
RTL8822BS SDIO 024c:b822 rtw88 (since v6.4) vendor driver ??
RTL8822CS SDIO 024c:c822 rtw88 (since v6.4) vendor driver ??


RTL8189ES / RTL8189ETV

Driver has its own repository:

git clone https://github.com/jwrdegoede/rtl8189ES_linux.git
cd rtl8189ES_linux
make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnu- KSRC=../linux


RTL8189FTV

Driver has its own repository:

git clone https://github.com/jwrdegoede/rtl8189ES_linux.git
cd rtl8189ES_linux
git checkout -B rtl8189fs origin/rtl8189fs
make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnu- KSRC=../linux

Legacy sunxi-3.4 kernel support

Driver refusing to load (rt5370sta/8188eu/8189es/8192cu)

Please note that sunxi-3.4 kernel is not supported and has been deprecated...

8188eu driver on sunxi-3.4

Please note that sunxi-3.4 kernel is not supported and has been deprecated...

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.

Debian/ubuntu without NetworkManager

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.

Devices

The following devices all come with an built-in wifi chip.

  A70x
  T95
  T95H