Expansion Board 24PIN - Wi-Fi / Bluetooth Debugging (RV1126)

This page covers driver matching, configuration, and verification for CAM126 (RV1126) + CAM126B-P-24 expansion board (AIC8800D80, SDIO Wi-Fi + UART Bluetooth).
Unlike CAM126B-P, the RV1126 SDK (rv1126-repo-v20230717-dev, Linux 4.19.111) does not include the AIC8800 driver. There is no aic8800 directory under drivers/net/wireless/rockchip_wlan, and neither wlan0 nor hci0 appears after boot.
You need to match it yourself. The AIC official SDIO driver package aic8800d_linux_sdk_V5.0_2026_0509_2195ae36 contains the D80 driver and firmware; integrate it as described in Section 2. See Downloads for the download link (RV1126 and RV1126B-P use the same file).
1. Hardware and Pins
| Item | Description |
|---|---|
| Wireless module | AIC8800D80, SDIO for Wi-Fi and UART for BT |
| SDIO | RV1126 sdio@ffc70000 (mmc1), 4-bit, 1.8V |
| BT serial port | RV1126 uart0 → /dev/ttyS0, 1500000 baud, hardware flow control |
| Wi-Fi power enable | GPIO1_D0 (24PIN-14) |
| Wi-Fi wake host | GPIO1_D1 (24PIN-10) |
| BT reset / wake / wake host | GPIO3_A5 / GPIO3_A6 / GPIO3_A4 (24PIN-11/12/13) |
| DIP switch S01 | 1 / 3 for Wi-Fi / BT, 2 / 4 for TTL debugging |
For the complete 24PIN definition, see 24PIN Expansion Board; for the dts configuration, see RV1126 24PIN Configuration.
SDIO is 1.8V. Make sure the VCCIO domain feeding GPIO1 on the RV1126 side is also 1.8V, otherwise do not connect it directly.
2. Driver Matching (Integrate It Yourself)
2.1 Driver Package Contents
| Item | Path (after extraction) | Description |
|---|---|---|
| SDIO driver source | SDIO/driver_fw/driver/aic8800 | aic8800_bsp / aic8800_fdrv / aic8800_btlpm |
| D80 firmware | SDIO/driver_fw/fw/aic8800D80 | fmacfw_8800d80_u02.bin, fw_patch_8800d80_u02_ext0.bin, aic_userconfig_8800d80.txt, etc. |
| Porting guide | AIC_Docs/AIC8800_SDIO_porting_guide_v1_1_20220526.pdf | Official SDIO porting manual |
Matching points: the driver supports SDIO vendor 0xc8a1 / device 0x0082 (function2 0x0182), which matches AIC8800D80, and the firmware directory contains the full D80 set.
Items you need to handle yourself:
| Item | Current State | What To Do |
|---|---|---|
| Build platform | Top-level Makefile defaults to CONFIG_PLATFORM_UBUNTU=y; the Rockchip template uses arm64 + a fixed KDIR | Set ARCH=arm, point KDIR to the RV1126 SDK kernel, and use gcc-linaro 6.3.1 as CROSS_COMPILE |
| Kernel version | The driver contains 4.19 branches, but AIC provides no RV1126 platform patch | If the first build reports 4.19 API differences, add compatibility macros based on LINUX_VERSION_CODE |
| Firmware path | Defaults to /vendor/etc/firmware | Change to /lib/firmware, or place the firmware under /vendor/etc/firmware |
| Device tree | Not provided | Add sdio_pwrseq / &sdio / wireless-wlan / wireless-bluetooth / &uart0 as described in RV1126 24PIN Configuration |
| Auto-load | Not provided | Create your own S36wifibt-init.sh that loads the three modules in order and starts hciattach |
SDIO/patch/for_Rockchipin the AIC package only contains Android framework patches for 3566 / 3128 / 3326. It does not contain 4.19 kernel patches and is not used on Buildroot/Linux.
2.2 Kernel Configuration
The RV1126 rv1126_defconfig already enables MMC / RFKILL. Confirm the following options:
CONFIG_CFG80211=y
CONFIG_CFG80211_WEXT=y
CONFIG_MAC80211=m
CONFIG_RFKILL=y
CONFIG_MMC=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MODULES=y
Board config fragments (such as rv1126-emmc-drivers-modules.config) already set CONFIG_CFG80211=m and CONFIG_MAC80211=m; you can keep them as they are.
2.3 Building the Driver
cd aic8800d_linux_sdk_V5.0_2026_0509_2195ae36/SDIO/driver_fw/driver/aic8800
Disable all platform templates in the top-level Makefile (or keep only a custom block), then pass KDIR / ARCH / CROSS_COMPILE explicitly:
export CONFIG_PLATFORM_ROCKCHIP = n
export CONFIG_PLATFORM_ROCKCHIP2 = n
export CONFIG_PLATFORM_ALLWINNER = n
export CONFIG_PLATFORM_AMLOGIC = n
export CONFIG_PLATFORM_UBUNTU = n
make -C <driver-dir> modules \
KDIR=<SDK>/kernel \
ARCH=arm \
CROSS_COMPILE=<SDK>/prebuilts/gcc/linux-x86/arm/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
Output:
aic8800_bsp/aic8800_bsp.ko
aic8800_fdrv/aic8800_fdrv.ko
aic8800_btlpm/aic8800_btlpm.ko
You can also use
make -C <SDK>/kernel M=<driver-dir> ARCH=arm CROSS_COMPILE=... modules; the result is the same.
2.4 Installing Firmware and Modules
# Firmware
cp SDIO/driver_fw/fw/aic8800D80/* <rootfs>/lib/firmware/
# Modules
cp aic8800_bsp/aic8800_bsp.ko <rootfs>/lib/modules/4.19.111/
cp aic8800_fdrv/aic8800_fdrv.ko <rootfs>/lib/modules/4.19.111/
cp aic8800_btlpm/aic8800_btlpm.ko <rootfs>/lib/modules/4.19.111/
The firmware path must be consistent. Add it to the top-level Makefile and export it (the aic8800_bsp and aic8800_fdrv subdirectories inherit it):
CONFIG_AIC_FW_PATH = "/lib/firmware"
export CONFIG_AIC_FW_PATH
Also set CONFIG_AIC_FW_PATH in aic8800_bsp/Makefile to the same value. If you do not use /lib/firmware, you can also place the firmware under /vendor/etc/firmware (the driver default).
2.5 Boot Script
#!/bin/sh
insmod /lib/modules/4.19.111/aic8800_bsp.ko
insmod /lib/modules/4.19.111/aic8800_fdrv.ko
insmod /lib/modules/4.19.111/aic8800_btlpm.ko
# BT: AIC8800D80 uses uart0
hciattach -s 1500000 /dev/ttyS0 any 1500000 flow
The order must be bsp → fdrv → btlpm; fdrv registers wlan0, and btlpm handles BT low power.
3. Verification
3.1 Wi-Fi
ifconfig -a # wlan0 should be present
lsmod | grep aic8800 # all three modules
dmesg | grep -iE 'aic|wlan0|sdio' | tail -50
wpa_cli -i wlan0 scan
wpa_cli -i wlan0 scan_results
Connect:
vi /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
update_config=1
network={
ssid="ORBI60"
psk="fanconn123"
key_mgmt=WPA-PSK
}
wpa_cli -i wlan0 reconfigure
sleep 8
wpa_cli -i wlan0 status # wpa_state=COMPLETED
udhcpc -i wlan0 -q
ping -c 4 www.baidu.com
3.2 Bluetooth
ps | grep hciattach
hciconfig -a # hci0: Bus: UART, UP RUNNING
bluetoothctl
[bluetooth]# power on
[bluetooth]# scan on
Manual attach:
killall hciattach
hciattach -s 1500000 /dev/ttyS0 any 1500000 flow
Power state:
for r in /sys/class/rfkill/rfkill*; do echo "$r $(cat $r/name) state=$(cat $r/state)"; done
cat /sys/kernel/debug/gpio | grep -iE 'bt|wifi'
4. Troubleshooting
| Symptom | Cause / Fix |
|---|---|
No wlan0 in ifconfig -a | Driver not loaded / &sdio not enabled in dts; check lsmod and dmesg | grep aic |
mmc1: new SDIO card in the log but no wlan0 | The card is detected, but aic8800_fdrv is not loaded or the firmware path is wrong |
aic8800_bsp: probe failed | WIFI_REG_ON (GPIO1_D0) timing or SDIO 1.8V power issue |
| No AP found in scan | Antenna not connected, S01 not at 1 / 3, or wlan0 is down |
Connection stuck at 4WAY_HANDSHAKE | Wrong password or router in WPA3 mode; check the encryption type with scan_results |
| Connected but no IP | Run udhcpc -i wlan0 -q manually |
No output from hciconfig -a | hciattach not running; verify /dev/ttyS0, S01 at 1 / 3, and that BT_RST is released |
hci0: Opcode 0x0c03 failed: -110 | Chip not powered or UART not connected to the module; check rfkill and BT,power_gpio |
| Bluetooth scans but throughput is low | Make sure RTS/CTS on 24PIN-21/24 are connected and hciattach ... flow enables flow control |
5. Test Reference
For comparison, the same module on RV1126B (kernel 6.1) tested as follows: wlan0 present, 2.4G / 5G visible in scans, connected at 5200MHz / 40MHz, RSSI=-40, BT HCI 5.4. RV1126 uses a 4.19 kernel, so the driver result on this platform prevails.