Sonoff NSPanel Pro 120: WiFi/BT [Part 1]
![Sonoff NSPanel Pro 120: WiFi/BT [Part 1]](/content/images/size/w1200/2025/03/H1b02010384ca42ae9e22684408c56e89Q.jpg)
In previous articles, we already identified that the WiFi/BT combo chip used is the RTL8723DS. This chip supports Wi-Fi 2.4GHz (802.11b/g/n) and Bluetooth 2.1/4.2. While it doesn’t offer the best performance available on the market, it is still a solid and convenient feature to have. To keep things organized and easier to follow, I decided to make a seperate sections for Wi-Fi and Bluetooth.
WiFi
Lets look at the module typical reference design:

The Wi-Fi part is connected through the SDIO 2.0 interface, along with the WL_WAKE_HOST and WL_EN pins. Essentially, the WL_EN pin is used to toggle the power of the chip. It also plays a role in waking the host (RK3326) when certain events occur, such as Wake-on-WLAN (WoWLAN) .
The DTS (Device Tree Source) for wifi part can be a bit tricky. Instead of keeping all the settings in a single node (wireless-wlan
), we move the WL_EN
pin to a separate mmc-pwrseq-simple
node. The purpose of this approach is to support a set of common properties across various SoC (System on Chip) designs. By doing so, it allows us to use the same provider for multiple SoC designs.
In this configuration, the MMC driver can power the Wi-Fi module on/off to initialize the SDIO interface. This also enables the driver to configure parameters such as clock speed and other settings at a very early stage. Let’s now examine the DTS nodes related to Wi-Fi.
sdio_pwrseq: sdio-pwrseq {
compatible = "mmc-pwrseq-simple";
pinctrl-names = "default";
pinctrl-0 = <&wifi_enable_h>;
reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
}
/* Related to reset-gpio above */
&pinctrl {
sdio-pwrseq {
wifi_enable_h: wifi-enable-h {
rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};
&sdio {
compatible = "rockchip,px30-dw-mshc", "rockchip,rk3288-dw-mshc";
reg = <0x0 0xff380000 0x0 0x4000>;
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>,
<&cru SCLK_SDIO_DRV>, <&cru SCLK_SDIO_SAMPLE>;
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
fifo-depth = <0x100>;
max-frequency = <150000000>;
pinctrl-names = "default";
pinctrl-0 = <&sdio_bus4 &sdio_cmd &sdio_clk>;
power-domains = <&power PX30_PD_MMC_NAND>;
bus-width = <4>;
cap-sd-highspeed;
no-sd;
no-mmc;
ignore-pm-notify;
keep-power-in-suspend;
non-removable;
mmc-pwrseq = <&sdio_pwrseq>;
sd-uhs-sdr104;
status = "okay";
};
wireless-wlan {
compatible = "wlan-platdata";
wifi_chip_type = "RTL8723DS";
WIFI,host_wake_irq = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
status = "okay";
};
Great! The next step is to specify the Wi-Fi chip in the SDK so that the Realtek driver (rtl8723ds.ko
) can be compiled and then copied to Buildroot under /lib/modules
. To do this, add the following configuration to device/rockchip/rk3326/device/rockchip/rk3326/sonoff_nspanel_pro_120_defconfig
RK_WIFIBT=y
RK_WIFIBT_CHIP="RTL8723DS"
The compiled .ko
driver needs to be inserted (insmod
) from the user space since the kernel only initializes the SDIO 2.0 interface. Therefore, this process must be handled manually. Fortunately, the Rockchip SDK manages the insertion of the driver and even adds the appropriate scripts or services to the corresponding folders. This is a great feature as it significantly reduces development time. Wifi init script should look similar to:

So after the firmware compilation and upload we have folowing in boot log:

During boot, the kernel MMC driver initializes the SDIO card by first parsing the reset-gpios
attribute in the sdio_pwrseq
node of the DTS. This GPIO, WL_REG_ON
, is pulled high to power on the Wi-Fi module. Then it then sends initialization commands via SDIO_CLK
, SDIO_CMD
, and SDIO_DATA
. Initially, SDIO_CLK
operates at a low frequency (400/300/200 kHz) to detect basic module details, such as whether it supports SDIO 2.0 (max 50 MHz) or SDIO 3.0 (max 208 MHz), and whether it uses 4-bit or 1-bit data transfer. Once identified, the clock frequency increases to the supported high frequency (e.g., 50/150 MHz), completing initialization.
During rootfs bootup, our Wi-Fi init script gets executed, and we see the following log:
Handling start for Wi-Fi/BT chip:
Realtek RTL8723DS sdio 024c:d723 RTL8723DS.ko
Starting Wi-Fi/BT...
Wi-Fi/BT module: RTL8723DS.ko
Starting input-event-daemon: Installing RTL8723DS.ko ...
done
[ 5.508970] RTL8723DS: loading out-of-tree module taints kernel.
[ 5.542113] RTW: module init start
[ 5.542487] RTW: rtl8723ds v5.13.5-34-gf315764ad.20220118_COEX20210106-3b3b
[ 5.543113] RTW: build time: Mar 5 2025 17:46:30
[ 5.543617] RTW: rtl8723ds BT-Coex version = COEX20210106-3b3b
[ 5.544166] [WLAN_RFKILL]: rockchip_wifi_get_oob_irq: Enter
[ 5.545747] RTW: == SDIO Card Info ==
[ 5.546118] RTW: card: 00000000cf664ffa
[ 5.546537] RTW: clock: 50000000 Hz
[ 5.546883] RTW: timing spec: sd high-speed
[ 5.547320] RTW: sd3_bus_mode: FALSE
[ 5.547674] RTW: func num: 1
[ 5.547960] RTW: func1: 00000000648c4a03 (*)
[ 5.548418] RTW: ================
[ 5.590796] RTW: HW EFUSE
[ 5.591085] RTW: 0x000: 29 81 40 7C E1 88 07 00 A0 04 EC 35 12 C0 A2 D8
...
[ 5.614594] RTW: 0x1F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 5.617488] RTW: hal_com_config_channel_plan chplan:0x20
...
Successfully initialized wpa_supplicant
Successfully init Wi-Fi for RTL8723DS!
Great! Let’s change the ssid
and psk
fields in /etc/wpa_supplicant.conf
and connect to our home Wi-Fi using the following command:
# Reload the above configuration for the wpa_supplicant process with the
following command:
wpa_cli -i wlan0 -p /var/run/wpa_supplicant reconfigure
# Initiate connection:
wpa_cli -i wlan0 -p /var/run/wpa_supplicant reconnect
From now on, we should create an STA connection to our home router. Let’s check the interfaces using ifconfig
.

Let’s perform a Wi-Fi scan to check the access points (APs) in range on the 2.4 GHz band.
wpa_cli -i wlan0 -p /var/run/wpa_supplicant scan
wpa_cli -i wlan0 -p /var/run/wpa_supplicant scan_results

Nice! Let’s run an iperf
test between the computer and the NSPanel to check the performance. The PC and NSPanel are 10–15 meters away from the router and behind a wall, so we should take that into consideration when evaluating the results.

I would say that’s not a bad result for a $3–$5 module. I’d like to add that since Realtek provides the source code for their drivers, they are highly flexible in terms of modifications/support. Currently, these drivers can be configured through the Realtek driver Makefile to enable or adjust various functions, such as Monitor mode, WoWLAN (Wake on Wireless LAN), Wi-Fi country code, TX power strength, coexistence mode, and more. For that price, it offers a really flexible setup. Personally, I decreased the driver debug level so that it doesn’t flood the boot log with excessive messages.

Okay, let’s wrap up the article at this point. Next, we’ll dive into Bluetooth—should be interesting!