SparkLAN WPET-236ACN mPCIe 2.4/5Ghz WiFi Card Setup

This section covers the configuration needed to use the SparkLAN WPET-236ACN mPCIe card (featuring Realtek RTL8822BU chipset) which has both dual band 2.4 and 5Ghz WiFi compatibility as well as integrated BlueTooth adapter

Here's the procedure we used to configure the WiFi card, this process was fairly straight-forward thanks to a open source git-hub page maintaining support for the chipset.

root@raspberrypi:~# apt-get update
root@raspberrypi:~# apt-get install build-essential libncurses5-dev bc python git
root@raspberrypi:~# wget
root@raspberrypi:~# chmod +x rpi-source
root@raspberrypi:~# ./rpi-source

That last step may argue a few times you haven't installed something, if so run the prompted command to install the missing component and re-run rpi-source. When that's finished complete do :

root@raspberrypi:~# git clone
root@raspberrypi:~# cd rtl8822bu

We need to change the target platform from  to ARM for the Raspberry Pi so edit the make file and make below on line 969

root@raspberrypi:~/rtl8822bu# vim Makefile




ARCH := arm

Then we can start the installer that will compile and install the kernel module for the WiFi card :

root@raspberrypi:~/rtl8812au# make
root@raspberrypi:~/rtl8812au# make install
root@raspberrypi:~/rtl8812au# reboot

A sample log of the compile procedure can be seen HERE

After compilation, instalation and rebooting check the output of dmesg to verify the card has been detected:

root@raspberrypi:~/rtl8812au# dmesg
[    4.127278] usb 1-1.4: new high-speed USB device number 7 using dwc_otg
[    4.268026] usb 1-1.4: New USB device found, idVendor=0bda, idProduct=b82c
[    4.283312] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.298932] usb 1-1.4: Product: 802.11ac NIC
[    4.311416] usb 1-1.4: Manufacturer: Realtek
[    4.323942] usb 1-1.4: SerialNumber: 123456

[    6.516110] Bluetooth: Core ver 2.22
[    6.516241] NET: Registered protocol family 31
[    6.516248] Bluetooth: HCI device and connection manager initialized
[    6.516275] Bluetooth: HCI socket layer initialized
[    6.516290] Bluetooth: L2CAP socket layer initialized
[    6.516327] Bluetooth: SCO socket layer initialized
[    6.598596] usbcore: registered new interface driver btusb
[    6.617966] Bluetooth: hci0: rtl: examining hci_ver=07 hci_rev=ab5c lmp_ver=07 lmp_subver=313a
[    6.617983] Bluetooth: rtl: assuming no firmware upload needed.
[    6.745243] 88x2bu: loading out-of-tree module taints kernel.

[    7.056191] random: crng init done
[    7.056203] random: 7 urandom warning(s) missed due to ratelimiting
[    7.345302] usbcore: registered new interface driver rtl88x2bu
[    7.473406] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    7.473420] Bluetooth: BNEP filters: protocol multicast
[    7.473452] Bluetooth: BNEP socket layer initialized

Next let's find the local 5Ghz network :

root@raspberrypi:~# iwlist wlan0 scanning
wlan0     Scan completed :
          Cell 01 - Address: E0:28:6D:B8:79:1E
                    Protocol:IEEE 802.11AC
                    Frequency:5.26 GHz (Channel 52)
                    Encryption key:on
                    Bit Rates:1.3 Gb/s
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: DD1D0050F204104A0001101044000102103C0001031049000600372A000120
                    Quality=79/100  Signal level=50/100
          Cell 02 - Address: E0:28:6D:B8:79:1D
                    Protocol:IEEE 802.11bgn
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:144 Mb/s
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: DD6F0050F204104A0001101044000102103B000103104700109280DAACF0B7FE867067E0286DB8791D1021000341564D1023000446426F78102400043030303010420004303030301054000800060050F20400011011000446426F78100800022388103C0001031049000600372A000120
                    Quality=48/100  Signal level=61/100

There are two criticial settings needed in in wpa_supplicant.conf file before we can sucessfully bring up the network interface, these must be correctly set or the system will fail to respond when asking for the interfaces to be enabled.

1. WiFi Config

Enter the target network ESSID (and password when prompted) to generate the wpa authentication details for connecting :

root@raspberrypi:~# wpa_passphrase EMT5

Add these generated details to the bottom of the file below


2. Reglatory domain setting (Country code)

Add the line below to wpa_supplicant.conf


Where ?? is your country code (dictating your WiFi power/range)

Note : This setting MUST be present when system is booted or WiFi will be disabled and you will be unable to bring up the interface.

A sample config file is shown here

root@raspberrypi:~# cat /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

After this is done you'll need to reboot the system

Note that the network interface commands from Raspbian Stretch onwards have changed

ifdown wlan0   =>  ifconfig wlan0 down  
ifup wlan0     =>  ifconfig wlan0 up  

Once rebooted you can check connectivity as below :

root@raspberrypi:~# iwconfig
wlan0     IEEE 802.11AC  ESSID:"EMT5"  Nickname:""
          Mode:Managed  Frequency:5.26 GHz  Access Point: E0:28:6D:B8:79:1E
          Bit Rate:867 Mb/s   Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:****-****-****-****-****-****-****-****   Security mode:open
          Power Management:off
          Link Quality=78/100  Signal level=52/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.

eth0      no wireless extensions.

root@raspberrypi:~# ifconfig wlan0
wlan0: flags=4163  mtu 1500
        inet  netmask  broadcast
        inet6 fe80::f47f:4f32:2a75:91a7  prefixlen 64  scopeid 0x20
        ether 00:0e:8e:8c:ed:85  txqueuelen 1000  (Ethernet)
        RX packets 3858  bytes 601742 (587.6 KiB)
        RX errors 0  dropped 21  overruns 0  frame 0
        TX packets 70  bytes 11489 (11.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

We can test the bluetooth interface has been detected using the standard hci tools

root@raspberrypi:~# hciconfig
hci0:   Type: Primary  Bus: USB
        BD Address: 00:05:44:33:22:11  ACL MTU: 1021:8  SCO MTU: 255:16
        UP RUNNING
        RX bytes:688 acl:0 sco:0 events:46 errors:0
        TX bytes:2675 acl:0 sco:0 commands:46 errors:


We suspect that once the module (88x2bu.ko) has been built just this file can be copied over to the second unit (assuming that is running the exact same kernel version) ala the output of the make install command :

install -p -m 644 88x2bu.ko  /lib/modules/4.14.94-v7+/kernel/drivers/net/wireless/
/sbin/depmod -a 4.14.94-v7+

We haven't gone as far as to test out DKMS (see example ) but expect that would also work.

EDIMAX RTL8822BU Install Guide

RTL8822BU Github Page

RTl8812AU Github Page

Contact us now to discuss your project

Ready to order, contact us today for pricing or samples

Contact Us