BlueZ Porting and User Guide
1. BlueZ Porting¶
BlueZ has many dependent libraries. The dependencies of each open source library are as follows:
graph LR zlib[zlib] libffi[libffi] gettext[gettext] glib[glib] zlib --> glib libffi --> glib gettext --> glib expat[expat] dbus[dbus] glib --> dbus expat -->dbus libical[libical] ncurses[ncurses] readline[readline] ncurses --> readline BlueZ[BlueZ] glib --> BlueZ dbus --> BlueZ libical --> BlueZ readline --> BlueZ
The program versions used in this transplantation are:
zlib-1.2.11 libffi-3.3 gettext-0.20.2 glib-2.52.3 expat-2.2.9 dbus-1.13.18 libical-1.0 ncurses-6.2 readline-8.0 bluez-5.54
The configuration file path of some programs (DBus) when running is related to the installation path specified during compilation. The simplest way is to compile directly in the virtual machine with the root account and install it to the / directory. It is not possible to compile and install to the root directory when compiling on the server, so we do not specify the installation path when compiling, but specify the installation path by temporarily adding the DESTDIR variable in the environment variable (or specify the installation path by a method like make DESTDIR=/home/tianhui.he/codes/bluez/out install). One problem this brings is that when compiling the source code, the dependent library may not be found, and the ".la" and ".pc" files of the dependent library need to be manually modified. The transplantation process is recorded here for subsequent reference.
The compilation environment used in this article
tianhui.he@xmbc6401:~/codes/bluez/code/bluez-5.54$ uname -a Linux xmbc6401 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux tianhui.he@xmbc6401:~/codes/bluez/code/bluez-5.54$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.4 LTS Release: 16.04 Codename: xenial tianhui.he@xmbc6401:~/codes/bluez/code/bluez-5.54$ arm-linux-gnueabihf-gcc -v Using built-in specs. COLLECT_GCC=arm-linux-gnueabihf-gcc COLLECT_LTO_WRAPPER=/tools/gcc-arm-9.1-2019.11-x86_64-arm-linux-gnueabihf/bin/../libexec/gcc/arm-linux-gnueabihf/9.1.0/lto-wrapper Target: arm-linux-gnueabihf Configured with: '/home/meng/build_toolchain/linaro_linux_9_1_0/build/snapshots/gcc.git~gcc-9_1_0-release/configure' SHELL=/bin/bash --with-mpc=/home/meng/build_toolchain/linaro_linux_9_1_0/build/builds/destdir/x86_64-unknown-linux-gnu --with-mpfr=/home/meng/build_toolchain/linaro_linux_9_1_0/build/builds/destdir/x86_64-unknown-linux-gnu --with-gmp=/home/meng/build_toolchain/linaro_linux_9_1_0/build/builds/destdir/x86_64-unknown-linux-gnu --with-gnu-as --with-gnu-ld --disable-libmudflap --enable-lto --enable-shared --without-included-gettext --enable-nls --with-system-zlib --disable-sjlj-exceptions --enable-gnu-unique-object --enable-linker-build-id --disable-libstdcxx-pch --enable-c99 --enable-clocale=gnu --enable-libstdcxx-debug --enable-long-long --with-cloog=no --with-ppl=no --with-isl=no --disable-multilib --with-float=hard --with-fpu=vfpv3-d16 --with-mode=thumb --with-tune=cortex-a9 --with-arch=armv7-a --enable-threads=posix --enable-multiarch --enable-libstdcxx-time=yes --enable-gnu-indirect-function --with-build-sysroot=/home/meng/build_toolchain/linaro_linux_9_1_0/build/sysroots/arm-linux-gnueabihf --with-sysroot=/home/meng/build_toolchain/linaro_linux_9_1_0/build/builds/destdir/x86_64-unknown-linux-gnu/arm-linux-gnueabihf/libc --enable-checking=yes --disable-bootstrap --enable-languages=c,c++,fortran,lto --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=arm-linux-gnueabihf --prefix=/home/meng/build_toolchain/linaro_linux_9_1_0/build/builds/destdir/x86_64-unknown-linux-gnu Thread model: posix gcc version 9.1.0 (GCC)
The source code directory is organized as follows. The source compressed package is stored in the tarball folder, code is the directory where the decompressed source code is stored, and out is the directory where the target file is output.
tianhui.he@xmbc6401:~/codes/bluez$ ls code out tarball # Will be added to the current shell's environment variables!!! export DESTDIR=/home/tianhui.he/codes/bluez/out
1.1. zlib-1.2.11¶
cd zlib-1.2.11 export CC=arm-linux-gnueabihf-gcc export AR=arm-linux-gnueabihf-ar export RANLIB=arm-linux-gnueabihf-ranlib ./configure make -j32 make install
1.2. libffi-3.3¶
cd libffi-3.3 ./configure --host=arm-linux --target=arm-linux CC=arm-linux-gnueabihf-gcc make -j32 make install
1.3. gettext-0.20.2¶
cd gettext-0.20.2 ./configure --host=arm-linux --target=arm-linux CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ make -j32 make install
1.4. glib-2.52.3¶
cd glib-2.52.3 echo ac_cv_type_long_long=yes>arm-linux-gnueabihf.cache echo glib_cv_stack_grows=no>>arm-linux-gnueabihf.cache echo glib_cv_uscore=no>>arm-linux-gnueabihf.cache echo ac_cv_func_posix_getpwuid_r=yes>>arm-linux-gnueabihf.cache echo ac_cv_func_posix_getgrgid_r=yes>>arm-linux-gnueabihf.cache ./configure --host=arm-linux --target=arm-linux LIBFFI_CFLAGS='-I/home/tianhui.he/codes/bluez/out/usr/local/include' LIBFFI_LIBS='/home/tianhui.he /codes/bluez/out/usr/local/lib/libffi.so' ZLIB_CFLAGS='-I/home/tianhui.he/codes/bluez/out/usr/local/include' ZLIB_LIBS='/home/tianhui.he /codes/bluez/out/usr/local/lib/libz.so' CC="arm-linux-gnueabihf-gcc -I/home/tianhui.he/codes/bluez/out/usr/local/include -L/ home/tianhui.he/codes/bluez/out/usr/local/lib -lz -lffi " enable_libmount=no --with-pcre=internal --cache-file=arm-linux-gnueabihf.cache
Run make directly will cause an error. You need to modify the two printf %s errors in gio/gdbusauth.c and gio/gdbusmessage.c that are NULL.
tianhui.he@xmbc6401:~/codes/bluez/code/glib-2.52.3/gio$ git diff gdbusauth.c
diff --git a/gdbusauth.c b/gdbusauth.c
index a4458b2..2b8c83c 100644
--- a/gdbusauth.c
+++ b/gdbusauth.c
@@ -1302,9 +1302,9 @@ _g_dbus_auth_run_server (GDBusAuth *auth,
&line_length,
cancellable,
error);
- debug_print ("SERVER: WaitingForBegin, read '%s'", line);
if (line == NULL)
goto out;
+ debug_print ("SERVER: WaitingForBegin, read '%s'", line);
if (g_strcmp0 (line, "BEGIN") == 0)
{
/* YAY, done! */
tianhui.he@xmbc6401:~/codes/bluez/code/glib-2.52.3/gio$ git diff gdbusmessage.c
diff --git a/gdbusmessage.c b/gdbusmessage.c
old mode 100644
new mode 100755
index 94b75ff..37af66e
--- a/gdbusmessage.c
+++ b/gdbusmessage.c
@@ -2695,7 +2695,8 @@ g_dbus_message_to_blob (GDBusMessage *message,
if (message->body != NULL)
{
gchar *tupled_signature_str;
- tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
+ if(signature_str)
+ tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
if (signature == NULL)
{
g_set_error (error,
Recompile and install:
make -j32 make install
1.5. expat-2.2.9¶
cd expat-2.2.9 ./configure --host=arm-linux --target=arm-linux CC=arm-linux-gnueabihf-gcc make -j32 make install
1.6. dbus-1.13.18¶
cd dbus-1.13.18 echo ac_cv_have_abstract_sockets=yes>arm-linux-gnueabihf.cache ./configure --host=arm-linux --target=arm-linux CC="arm-linux-gnueabihf-gcc -lz -lffi -lgmodule-2.0 -lglib-2.0 -I/home/tianhui.he/codes/bluez/out/usr/local/include -I/home/tianhui.he/codes/bluez/out/usr/local/include/glib-2.0 -I/home/tianhui.he/codes/bluez/out/usr/local/lib/glib-2.0/include -L/home/tianhui.he/codes/bluez/out/usr/local/lib -L/home/tianhui.he/codes/bluez/out/usr/local/lib/glib-2.0" --cache-file=arm-linux-gnueabihf.cache --with-x=no
After the configuration is complete, you need to modify the library files and dependent library file paths specified in all ".la" files in the ./out/usr/local /lib/ directory, mainly involving the two parameters dependency_libs and libdir. For example, the libglib-2.0.la file, modify
# Libraries that this one depends upon. dependency_libs=' -L/home/tianhui.he/codes/bluez/out/usr/local/lib -lz /usr/local/lib/libffi.la -lpthread' # Directory that this library needs to be installed in: libdir='/usr/local/lib'
to
# Libraries that this one depends upon. dependency_libs=' -L/home/tianhui.he/codes/bluez/out/usr/local/lib -lz /home/tianhui.he/codes/bluez/out/usr/local/lib/libffi.la -lpthread' # Directory that this library needs to be installed in: libdir='/home/tianhui.he/codes/bluez/out/usr/local/lib'
and the prefix parameter in all .pc files in the ./out/usr/local/lib/pkgconfig directory, such as the glib-2.0.pc file,
prefix=/usr/local
Modified to
prefix=/home/tianhui.he/codes/bluez/out/usr/local
Recompile and install after modification
make -j32 make install
1.7. libical-1.0¶
cd libical-1.0 export CC=arm-linux-gnueabihf-gcc export CXX=arm-linux-gnueabihf-g++ cmake -DCMAKE_INSTALL_PREFIX=/usr/local make -j32 make install
1.8. ncurses-6.2¶
cd ncurses-6.2 export CPPFLAGS="-P" ./configure --host=arm-linux --target=arm-linux CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ AR=arm-linux-gnueabihf-ar STRIP=arm-linux-gnueabihf-strip --enable-widec --with-shared --with-progs=no make -j32 make install # make install will fail, but it will not affect # ncurses uses DESTDIR differently, so you need to manually move the files in lib and include to out/usr/local mv ../../out/usr/lib/* ../../out/usr/local/lib/ mv ../../out/usr/include/* ../../out/usr/local/include/
1.9. readline-8.0¶
cd readline-8.0/ ./configure --host=arm-linux --target=arm-linux CC=arm-linux-gnueabihf-gcc AR=arm-linux-gnueabihf-ar RANLIB=arm-linux-gnueabihf-ranlib enable_static=no make -j32 # readline's compilation script does not read environment variables, so DESTDIR needs to be configured manually make DESTDIR=/home/tianhui.he/codes/bluez/out install
1.10. bluez-5.54¶
cd bluez-5.54 ./configure --mandir=/home/tianhui.he/codes/bluez/out/usr/local/man --sysconfdir=/etc --localstatedir=/var --host=arm-linux DBUS_LIBS='/home/tianhui.he/codes/bluez/out/usr/local/lib/libdbus-1.so' DBUS_CFLAGS='-I/home/tianhui.he/codes/bluez/out/usr/local/include/dbus-1.0/ -I/home/tianhui.he/codes/bluez/out/usr/local/lib/dbus-1.0/include' DBUS_CONFDIR= CC="arm-linux-gnueabihf-gcc -I/home/tianhui.he/codes/bluez/out/usr/local/include -I/home/tianhui.he/codes/bluez/out/usr/local/include/glib-2.0/ -I/home/tianhui.he/codes/bluez/out/usr/local/lib/glib-2.0/include/ -L/home/tianhui.he/codes/bluez/out/usr/local/lib -L/home/tianhui.he/codes/bluez/out/usr/local/lib/glib-2.0/ -lz -lffi -lgmodule-2.0 -lglib-2.0 -ldbus-1 -lreadline -lncursesw" --enable-debug --enable-test --enable-shared --enable-testing --disable-udev --disable-systemd --disable-cups --disable-obex --enable-library --enable-tools --enable-deprecated PKG_CONFIG_PATH=/home/tianhui.he/codes/bluez/out/usr/local/lib/pkgconfig
Similar to compiling dbus-1.13.18, after configuration, you need to modify the ".la" and ".pc" files of several newly added libraries, and recompile and install after the modification is completed
make -j32 make install
2. kernel configuration¶
The test module is aic8800d40. This module needs to load firmware externally, so the kernel's FW_LOADER function needs to be enabled.
CONFIG_BT=y CONFIG_BT_HCIUART=y CONFIG_BT_HCIUART_H4=y CONFIG_BT_HCIUART_3WIRE=y CONFIG_AIC_WLAN_SUPPORT=y CONFIG_AIC_FW_PATH="/customer/vendor/etc/firmware" CONFIG_AIC8800_WLAN_SUPPORT=m CONFIG_AIC8800_BTLPM_SUPPORT=m CONFIG_SERIAL_DEV_BUS=y CONFIG_FW_LOADER=
The modification of dts:
fuart2: fuart2@1F221400 {
compatible = "sstar,uart";
reg = <0x00 0x1F221400 0x00 0x100>, <0x00 0x1F221E00 0x00 0x100>;
interrupts= <GIC_SPI INT_IRQ_FUART_2 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI INT_IRQ_UART2_MERGE IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI INT_IRQ_UART2_MERGE IRQ_TYPE_LEVEL_HIGH>;
dma-enable;
sctp_enable = <1>; // 0 modify to 1
rx_fifo_level = <0>;
tx_fifo_level = <0>;
digmux = <4>;
clocks = <&CLK_fuart2>;
status = "ok";
};
The modification of padmux:
// Add uart pin configuration <PAD_SAR_ADC0_05 PINMUX_FOR_FUART2_MODE_1 MDRV_PUSE_FUART_TX>, <PAD_SAR_ADC0_04 PINMUX_FOR_FUART2_MODE_1 MDRV_PUSE_FUART_RX>, <PAD_SAR_ADC0_06 PINMUX_FOR_FUART2_MODE_1 MDRV_PUSE_FUART_CTS>, <PAD_SAR_ADC0_07 PINMUX_FOR_FUART2_MODE_1 MDRV_PUSE_FUART_RTS>,
3. Runtime environment configuration¶
3.1. Copy the executable program and required dynamic libraries¶
After compiling bluez and its dependent libraries, you can find the bin and lib folders in the specified installation directory. Copy the required files to the corresponding directories on the motherboard according to the actual situation. Here we copy the following resource files:
bin files: hciconfig hciattach dbus-daemon bluetoothd bluetoothctl Configuration files: main.conf dbus-1 Shell files: bt_demo.sh lib files: libasound.so libasound.so.2 libasound.so.2.0.0 libdbus-1.so libdbus-1.so.3 libdbus-1.so.3.19.13 libexpat.so libexpat.so.1 libexpat.so.1.6.12 libglib-2.0.so libglib-2.0.so.0 libglib-2.0.so.0.6600.3 libncurses.so libncurses.so.6 libncurses.so.6.1 libpcre.so libpcre.so.1 libpcre.so.1.2.12 libreadline.so libreadline.so.8 libreadline.so.8.1 libselinux.so libselinux.so.1
3.2. dbus-daemon operation configuration¶
-
Copy the required bin files from the compilation and installation directory to the mainboard's
/customer/bt/directory -
Copy
dbus-1to the/customer/bt/directory of the motherboard -
dbus uses the
messagebususer by default, and the motherboard needs to add this user -
If you are using the
dbususer, you need to add this user to the motherboard (you can add it via echo or adduser)
echo "messagebus:x:500:500::/home/messagebus:/bin/sh" >> /etc/passwd echo "dbus:x:1000:1000:Linux User,,,:/home/dbus:/bin/sh" >> /etc/passwd
3.3. bluetoothd run configuration¶
Copy the main.conf file to the /customer/bt/ directory of the motherboard. The content of main.conf is as follows:
[General] Name = BlueZ Class = 0x000100 DiscoverableTimeout = 0 PairableTimeout = 0 NameResolving = true ControllerMode = dual MultiProfile = off FastConnectable = false Privacy = device [GATT] Cache = always [Policy] AutoEnable = true
3.4. Test¶
As mentioned above, the aic8800d40 module needs to load firmware externally. The directory where the driver searches for firmware is /customer/lib/firmware/. Therefore, in addition to loading the correct driver, you also need to put its firmware in the specified directory. This part of the operation is performed in wifi_demo.sh. The path of wifi_demo.sh is in /customer/wifi/BGAXX/ or /customer/wifi/QFNXX/. Please choose according to the actual package. The content of the file is as follows:
#!/bin/sh # aic8800 sdio wifi bt firmware path mkdir -p /customer/vendor/etc cp -r /customer/wifi/firmware /customer/vendor/etc/ # insmod aic8800 sdio wifi driver insmod cfg80211.ko insmod aic8800_bsp.ko insmod aic8800_fdrv.ko # export bin and so path export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/customer/wifi export PATH=$PATH:/customer/wifi # wpa_supplicant.conf ctrl_interface path mkdir -p /tmp/wifi/run/wpa_supplicant ./wpa_supplicant -Dnl80211 -i wlan0 -c ./wpa_supplicant.conf &
After running wifi_demo.sh, you can run bt_demo.sh. The content of bt_demo.sh is as follows:
Note: ttyS2 in the following content may need to be modified according to the actual fuart used
#!/bin/sh export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/customer/bt export PATH=$PATH:/customer/bt path # system_bus_socket path mkdir -p /var/run/dbus # bind system_bus_socket path to /var/run/dbus mount --bind /var/run/dbus /run/dbus ./hciattach -s 1500000 /dev/ttyS2 any 1500000 flow nosleep sleep 0.5 ./hciconfig hci0 up sleep 0.5 ./dbus-daemon --config-file=/customer/bt/dbus-1/system.conf --print-address & sleep 0.5 ./bluetoothd -E -f /customer/bt/main.conf &
Normal running log:
/ # cd customer/wifi/ /customer/wifi # /customer/wifi # /customer/wifi # ./wifi_demo.sh aicbsp_init RELEASE_DATE:2024_0327_3561b08f aicbsp_resv_mem_init AICWFDBG(LOGINFO) rwnx v6.4.3.0 - - 241c091M (master) AICWFDBG(LOGINFO) RELEASE_DATE:2024_0327_3561b08f aicbsp: aicbsp_set_subsys, subsys: AIC_WIFI, state to: 1 aicbsp: aicbsp_set_subsys, power state change to 1 dure to AIC_WIFI aicbsp: aicbsp_platform_power_on aicbsp: aicbsp_sdio_probe:1 vid:0xC8A1 did:0x0082 aicbsp: aicbsp_sdio_probe:2 vid:0xC8A1 did:0x0182 aicbsp: aicbsp_sdio_probe after replace:1 AICWFDBG(LOGINFO) aicwf_sdio_chipmatch USE AIC8800D80 aicbsp: aicbsp_get_feature, set FEATURE_SDIO_CLOCK 150 MHz aicbsp: aicwf_sdio_reg_init AICWFDBG(LOGINFO) aicbsp: aicbsp_driver_fw_init, chip rev: 3 rwnx_load_firmware :firmware path = /customer/vendor/etc/firmware/fw_patch_table_8800d80_u02.bin file md5:0c9bf9c9c10f7a90a22a4c35fa58c967 rwnx_plat_bin_fw_upload_android rwnx_load_firmware :firmware path = /customer/vendor/etc/firmware/fw_adid_8800d80_u02.bin file md5:f546881a81b960d89a672578eb45a809 rwnx_plat_bin_fw_upload_android rwnx_load_firmware :firmware path = /customer/vendor/etc/firmware/fw_patch_8800d80_u02.bin file md5:35d137b8a76daaeb4f5034df8e15bcde aicbt_patch_table_load bt btmode[3]:5 aicbt_patch_table_load bt uart_baud[3]:1500000 aicbt_patch_table_load bt uart_flowctrl[3]:1 aicbt_patch_table_load bt lpm_enable[3]:0 aicbt_patch_table_load bt tx_pwr[3]:28463 aicbsp: bt patch version: - Mar 07 2024 14:29:05 - git f94a3e4 rwnx_plat_bin_fw_upload_android rwnx_load_firmware :firmware path = /customer/vendor/etc/firmware/fmacfw_8800d80_u02.bin file md5:13e6f0e58aae342d260d8672ab61c31f rd_version_val=06090101 AICWFDBG(LOGINFO) aicwf_sdio_chipmatch USE AIC8800D80 aicbsp: aicbsp_get_feature, set FEATURE_SDIO_CLOCK 150 MHz aicsdio: aicwf_sdio_reg_init AICWFDBG(LOGINFO) sdio ready aicbsp: aicbsp_resv_mem_alloc_skb, alloc resv_mem_txdata succuss, id: 0, size: 98304 AICWFDBG(LOGINFO) sdio_bustx_thread the policy of current thread is:1 AICWFDBG(LOGINFO) sdio_busrx_thread the policy of current thread is:1 AICWFDBG(LOGINFO) sdio_bustx_thread the rt_priority of current thread is:1 AICWFDBG(LOGINFO) sdio_bustx_thread the current pid is:987 aicbsp: sdio_err:<aicwf_sdio_bus_pwrctl,1385>: bus down AICWFDBG(LOGINFO) sdio_busrx_thread the rt_priority of current thread is:1 aicbsp: aicbsp_get_feature, set FEATURE_SDIO_CLOCK 150 MHz AICWFDBG(LOGINFO) rwnx_cfg80211_init sizeof(struct rwnx_hw):14264 AICWFDBG(LOGINFO) aicwf_prealloc_txq_alloc size is diff will to be kzalloc AICWFDBG(LOGINFO) aicwf_prealloc_txq_alloc txq kzalloc successful AICWFDBG(LOGINFO) sdio_busrx_thread the current pid is:988 AICWFDBG(LOGINFO) FDRV chip_id=3, chip_sub_id=0!! AICWFDBG(LOGINFO) userconfig file path:aic_userconfig_8800d80.txt AICWFDBG(LOGINFO) ### Load file aic_userconfig_8800d80.txt AICWFDBG(LOGINFO) rwnx_load_firmware :firmware path = /customer/vendor/etc/firmware/aic_userconfig_8800d80.txt AICWFDBG(LOGINFO) file md5:35c8e99f3edd34d2a39bc9920e1da494 AICWFDBG(LOGINFO) ### Load file done: aic_userconfig_8800d80.txt, size=2683 AICWFDBG(LOGINFO) rwnx_plat_userconfig_parsing3: AIC USERCONFIG 2022/0803/1707 AICWFDBG(LOGINFO) rwnx_plat_userconfig_parsing3: txpwr_lvl AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=enable value=1 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11b_11ag_1m_2g4 value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11b_11ag_2m_2g4 value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11b_11ag_5m5_2g4 value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11b_11ag_11m_2g4 value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11b_11ag_6m_2g4 value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11b_11ag_9m_2g4 value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11b_11ag_12m_2g4 value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11b_11ag_18m_2g4 value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11b_11ag_24m_2g4 value=16 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11b_11ag_36m_2g4 value=16 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11b_11ag_48m_2g4 value=15 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11b_11ag_54m_2g4 value=15 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs0_2g4 value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs1_2g4 value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs2_2g4 value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs3_2g4 value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs4_2g4 value=16 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs5_2g4 value=16 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs6_2g4 value=15 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs7_2g4 value=15 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs8_2g4 value=14 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs9_2g4 value=14 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs0_2g4 value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs1_2g4 value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs2_2g4 value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs3_2g4 value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs4_2g4 value=16 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs5_2g4 value=16 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs6_2g4 value=15 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs7_2g4 value=15 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs8_2g4 value=14 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs9_2g4 value=14 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs10_2g4 value=13 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs11_2g4 value=13 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11a_6m_5g value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11a_9m_5g value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11a_12m_5g value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11a_18m_5g value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11a_24m_5g value=16 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11a_36m_5g value=16 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11a_48m_5g value=15 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11a_54m_5g value=15 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs0_5g value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs1_5g value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs2_5g value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs3_5g value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs4_5g value=16 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs5_5g value=16 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs6_5g value=15 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs7_5g value=15 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs8_5g value=14 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11n_11ac_mcs9_5g value=14 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs0_5g value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs1_5g value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs2_5g value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs3_5g value=18 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs4_5g value=16 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs5_5g value=16 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs6_5g value=14 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs7_5g value=14 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs8_5g value=13 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs9_5g value=13 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs10_5g value=12 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_11ax_mcs11_5g value=12 AICWFDBG(LOGINFO) rwnx_plat_userconfig_parsing3: txpwr_lvl_adj AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_adj_enable value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_adj_2g4_chan_1_4 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_adj_2g4_chan_5_9 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_adj_2g4_chan_10_13 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_adj_5g_chan_42 value=0 AICWFDBG(LOGERROR) invalid cmd: lvl_adj_5g_chan_42 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_adj_5g_chan_58 value=0 AICWFDBG(LOGERROR) invalid cmd: lvl_adj_5g_chan_58 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_adj_5g_chan_106 value=0 AICWFDBG(LOGERROR) invalid cmd: lvl_adj_5g_chan_106 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_adj_5g_chan_122 value=0 AICWFDBG(LOGERROR) invalid cmd: lvl_adj_5g_chan_122 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_adj_5g_chan_138 value=0 AICWFDBG(LOGERROR) invalid cmd: lvl_adj_5g_chan_138 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=lvl_adj_5g_chan_155 value=0 AICWFDBG(LOGERROR) invalid cmd: lvl_adj_5g_chan_155 AICWFDBG(LOGINFO) rwnx_plat_userconfig_parsing3: txpwr_loss AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=loss_enable value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=loss_value value=2 AICWFDBG(LOGINFO) rwnx_plat_userconfig_parsing3: txpwr_ofst AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_enable value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_2g4_11b_chan_1_4 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_2g4_11b_chan_5_9 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_2g4_11b_chan_10_13 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_2g4_ofdm_highrate_chan_1_4 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_2g4_ofdm_highrate_chan_5_9 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_2g4_ofdm_highrate_chan_10_13 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_2g4_ofdm_lowrate_chan_1_4 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_2g4_ofdm_lowrate_chan_5_9 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_2g4_ofdm_lowrate_chan_10_13 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_lowrate_chan_42 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_lowrate_chan_58 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_lowrate_chan_106 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_lowrate_chan_122 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_lowrate_chan_138 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_lowrate_chan_155 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_highrate_chan_42 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_highrate_chan_58 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_highrate_chan_106 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_highrate_chan_122 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_highrate_chan_138 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_highrate_chan_155 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_midrate_chan_42 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_midrate_chan_58 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_midrate_chan_106 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_midrate_chan_122 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_midrate_chan_138 value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=ofst_5g_ofdm_midrate_chan_155 value=0 AICWFDBG(LOGINFO) rwnx_plat_userconfig_parsing3: xtal cap AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=xtal_enable value=0 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=xtal_cap value=24 AICWFDBG(LOGINFO) rwnx_plat_nvram_set_value_v3:command=xtal_cap_fine value=31 AICWFDBG(LOGINFO) userconfig download complete AICWFDBG(LOGINFO) is 5g support = 1, vendor_info = 0x00 AICWFDBG(LOGINFO) Firmware Version: zh Mar 07 2024 15:00:09 - ga004cf5 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:enable:1 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11b_11ag_1m_2g4:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11b_11ag_2m_2g4:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11b_11ag_5m5_2g4:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11b_11ag_11m_2g4:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11b_11ag_6m_2g4:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11b_11ag_9m_2g4:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11b_11ag_12m_2g4:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11b_11ag_18m_2g4:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11b_11ag_24m_2g4:16 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11b_11ag_36m_2g4:16 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11b_11ag_48m_2g4:15 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11b_11ag_54m_2g4:15 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs0_2g4:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs1_2g4:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs2_2g4:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs3_2g4:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs4_2g4:16 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs5_2g4:16 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs6_2g4:15 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs7_2g4:15 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs8_2g4:14 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs9_2g4:14 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs0_2g4:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs1_2g4:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs2_2g4:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs3_2g4:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs4_2g4:16 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs5_2g4:16 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs6_2g4:15 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs7_2g4:15 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs8_2g4:14 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs9_2g4:14 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs10_2g4:13 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs11_2g4:13 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11a_1m_5g:-128 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11a_2m_5g:-128 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11a_5m5_5g:-128 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11a_11m_5g:-128 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11a_6m_5g:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11a_9m_5g:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11a_12m_5g:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11a_18m_5g:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11a_24m_5g:16 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11a_36m_5g:16 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11a_48m_5g:15 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11a_54m_5g:15 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs0_5g:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs1_5g:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs2_5g:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs3_5g:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs4_5g:16 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs5_5g:16 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs6_5g:15 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs7_5g:15 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs8_5g:14 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11n_11ac_mcs9_5g:14 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs0_5g:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs1_5g:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs2_5g:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs3_5g:18 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs4_5g:16 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs5_5g:16 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs6_5g:14 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs7_5g:14 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs8_5g:13 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs9_5g:13 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs10_5g:12 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_v3_in_fdrv:lvl_11ax_mcs11_5g:12 AICWFDBG(LOGINFO) get_userconfig_txpwr_loss:loss_enable:0 AICWFDBG(LOGINFO) get_userconfig_txpwr_loss:loss_value:2 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:enable:1 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11b_11ag_1m_2g4:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11b_11ag_2m_2g4:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11b_11ag_5m5_2g4:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11b_11ag_11m_2g4:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11b_11ag_6m_2g4:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11b_11ag_9m_2g4:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11b_11ag_12m_2g4:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11b_11ag_18m_2g4:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11b_11ag_24m_2g4:16 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11b_11ag_36m_2g4:16 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11b_11ag_48m_2g4:15 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11b_11ag_54m_2g4:15 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs0_2g4:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs1_2g4:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs2_2g4:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs3_2g4:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs4_2g4:16 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs5_2g4:16 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs6_2g4:15 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs7_2g4:15 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs8_2g4:14 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs9_2g4:14 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs0_2g4:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs1_2g4:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs2_2g4:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs3_2g4:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs4_2g4:16 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs5_2g4:16 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs6_2g4:15 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs7_2g4:15 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs8_2g4:14 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs9_2g4:14 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs10_2g4:13 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs11_2g4:13 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11a_1m_5g:-128 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11a_2m_5g:-128 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11a_5m5_5g:-128 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11a_11m_5g:-128 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11a_6m_5g:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11a_9m_5g:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11a_12m_5g:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11a_18m_5g:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11a_24m_5g:16 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11a_36m_5g:16 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11a_48m_5g:15 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11a_54m_5g:15 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs0_5g:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs1_5g:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs2_5g:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs3_5g:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs4_5g:16 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs5_5g:16 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs6_5g:15 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs7_5g:15 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs8_5g:14 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11n_11ac_mcs9_5g:14 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs0_5g:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs1_5g:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs2_5g:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs3_5g:18 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs4_5g:16 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs5_5g:16 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs6_5g:14 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs7_5g:14 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs8_5g:13 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs9_5g:13 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs10_5g:12 AICWFDBG(LOGINFO) rwnx_send_txpwr_lvl_v3_req:lvl_11ax_mcs11_5g:12 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_adj_in_fdrv:enable:0 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_adj_in_fdrv:lvl_adj_2g4_chan_1_4:0 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_adj_in_fdrv:lvl_adj_2g4_chan_5_9:0 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_adj_in_fdrv:lvl_adj_2g4_chan_10_13:0 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_adj_in_fdrv:lvl_adj_5g_chan_42:0 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_adj_in_fdrv:lvl_adj_5g_chan_58:0 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_adj_in_fdrv:lvl_adj_5g_chan_106:0 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_adj_in_fdrv:lvl_adj_5g_chan_122:0 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_adj_in_fdrv:lvl_adj_5g_chan_138:0 AICWFDBG(LOGINFO) get_userconfig_txpwr_lvl_adj_in_fdrv:lvl_adj_5g_chan_155:0 AICWFDBG(LOGINFO) get_userconfig_txpwr_ofst2x_in_fdrv:enable :0 AICWFDBG(LOGINFO) pwrofst2x 2.4g: [0]:11b, [1]:ofdm_highrate, [2]:ofdm_lowrate chan= 1-4 5-9 10-13 AICWFDBG(LOGINFO) [0] = AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) [1] = AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) [2] = AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) pwrofst2x 5g: [0]:ofdm_lowrate, [1]:ofdm_highrate, [2]:ofdm_midrate chan= 36-50 51-64 98-114 115-130 131-146 147-166 AICWFDBG(LOGINFO) [0] = AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) [1] = AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) [2] = AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) 0 AICWFDBG(LOGINFO) AICWFDBG(LOGINFO) rwnx_send_txpwr_ofst2x_req:Do not use txpwr_ofst2x AICWFDBG(LOGINFO) get_userconfig_xtal_cap:enable :0 AICWFDBG(LOGINFO) get_userconfig_xtal_cap:xtal_cap :0 AICWFDBG(LOGINFO) get_userconfig_xtal_cap:xtal_cap_fine:0 AICWFDBG(LOGINFO) get macaddr: 5c:8e:8b:54:db:93 AICWFDBG(LOGINFO) getRegdomainFromRwnxDB set ccode:00 AICWFDBG(LOGINFO) rwnx_get_countrycode_channels support channel:1 2 3 4 5 6 7 8 9 10 11 12 13 14 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 144 149 153 157 161 165 ieee80211 phy0: ******************************************************* ** CAUTION: USING PERMISSIVE CUSTOM REGULATORY RULES ** ******************************************************* AICWFDBG(LOGINFO) fw_log_init: ffffff8003628000, ffffff800362a800 AICWFDBG(LOGINFO) rwnx_interface_add: wlan%d, 2, 10 AICWFDBG(LOGINFO) interface add:5c 8e 8b 54 db 93 AICWFDBG(LOGINFO) New interface create wlan0 /customer/wifi # Successfully initialized wpa_supplicant nl80211: kernel reports: Authentication algorithm number required rfkill: Cannot open RFKILL control device rwnx_virtual_interface_add: 10, p2p-dev-wlan0 rwnx_virtual_interface_add, ifname=p2p-dev-wlan0, wdev=0000000039d3acfa, vif_idx=1 p2p dev addr=5c 8e 8b 54 db 92 nl80211: kernel reportP2P interface started s: Registration to specific type not supported rfkill: Cannot get wiphy information /customer/wifi # /customer/wifi # /customer/wifi # cd ../bt/ /customer/bt # ./bt_demo.sh Device setup complete unix:path=/var/run/dbus/system_bus_socket,guid=bae36beab28e58e759dc9ef90000002a /customer/bt # /customer/bt # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/customer/bt /customer/bt # /customer/bt # ./bluetoothctl Agent registered [CHG] Controller 5C:8E:8B:54:DB:94 Pairable: yes [bluetooth]# scan on Discovery started [CHG] Controller 5C:8E:8B:54:DB:94 Discovering: yes [NEW] Device 48:D8:45:02:BB:54 JEET AIR PLUS L [NEW] Device 48:D8:45:02:FB:1F JEET AIR PLUS R [NEW] Device 56:45:B4:B0:CA:49 56-45-B4-B0-CA-49 [NEW] Device 48:F5:8D:BE:E9:1C 48-F5-8D-BE-E9-1C [bluetooth]# scan off Discovery stopped [CHG] Device 48:F5:8D:BE:E9:1C RSSI is nil [CHG] Device 56:45:B4:B0:CA:49 TxPower is nil [CHG] Device 56:45:B4:B0:CA:49 RSSI is nil [CHG] Device 48:D8:45:02:FB:1F RSSI is nil [CHG] Device 48:D8:45:02:BB:54 RSSI is nil [CHG] Controller 5C:8E:8B:54:DB:94 Discovering: no [bluetooth]#
Introduction to running commands:
1) If the module is powered on and the driver is loaded normally, you should be able to see the hci0 device using the hciconfig -a command . Enable the device and put it into the UP RUNNING state.
/customer/bt # ./hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: 5C:8E:8B:54:DB:94 ACL MTU: 1021:9 SCO MTU: 255:4
UP RUNNING
RX bytes:1096 acl:0 sco:0 events:63 errors:0
TX bytes:1358 acl:0 sco:0 commands:53 errors:0
Features: 0xbf 0x2e 0x4d 0xfe 0xd8 0x3f 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV3
Link policy: RSWITCH SNIFF
Link mode: SLAVE ACCEPT
Name: 'BlueZ'
Class: 0x000100
Service Classes: Unspecified
Device Class: Computer, Uncategorized
HCI Version: (0xd) Revision: 0xb
LMP Version: (0xd) Subversion: 0xb
Manufacturer: not assigned (2875)
/customer/bt #
2) Start dbus
./dbus-daemon --config-file=/customer/bt/dbus-1/system.conf --print-address &
3) Enable bluetoothd. If AutoEnable=true in main.conf according to the previous configuration is enabled, bluetoothd will automatically enable the hci device, so you can skip the first step
./bluetoothd -E -f /customer/bt/main.conf &
4) Use bluetoothctl to test Bluetooth functions, such as scan on/off switch scanning
/customer/bt # ./bluetoothctl Agent registered [CHG] Controller 5C:8E:8B:54:DB:94 Pairable: yes [bluetooth]# scan on Discovery started [CHG] Controller 5C:8E:8B:54:DB:94 Discovering: yes [NEW] Device 48:D8:45:02:BB:54 JEET AIR PLUS L [NEW] Device 48:D8:45:02:FB:1F JEET AIR PLUS R [NEW] Device 56:45:B4:B0:CA:49 56-45-B4-B0-CA-49 [NEW] Device 48:F5:8D:BE:E9:1C 48-F5-8D-BE-E9-1C [bluetooth]# scan off Discovery stopped [CHG] Device 48:F5:8D:BE:E9:1C RSSI is nil [CHG] Device 56:45:B4:B0:CA:49 TxPower is nil [CHG] Device 56:45:B4:B0:CA:49 RSSI is nil [CHG] Device 48:D8:45:02:FB:1F RSSI is nil [CHG] Device 48:D8:45:02:BB:54 RSSI is nil [CHG] Controller 5C:8E:8B:54:DB:94 Discovering: no [bluetooth]#
4. Debug methods¶
1) Use the hcitool tool to send commands directly, such as
hciconfig hci0 up # 0x0006 command sets broadcast parameters, broadcast interval (as follows: between 0x0020 ~ 0x0040, unit is 0.625ms) etc... hcitool -i hci0 cmd 0x08 0x0006 0x0020 0x0040 0x00 0x00 0x00 00 00 00 00 00 00 0x07 0x00 # 0x0008 command sets the broadcast content. The data format is total length (1 Byte): ltv (1+1+len Byte): ltv ... hcitool -i hci0 cmd 0x08 0x0008 16 02 01 06 03 02 80 ff 0e 09 62 6c 65 5f 6e 61 6d 65 5f 31 # 0x000A command enables broadcasting hcitool cmd 0x08 0x000A 0x01
2) Use the -d option of bluetoothd to enable debugging information;
3) Use hcidump -w xxx.cfa to capture the HCI data packet and put it on the PC for analysis with wireshark.