Fail on to build AW697 kernel module

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fail on to build AW697 kernel module

6,296 Views
ChChang
Contributor II

I am currently trying to build the AW697 driver into a kernel module for use on Android 13 running on an i.mx8mp-evk.
However, as I am not yet familiar with Android, it seems that my execution method is incorrect and I am encountering the following error messages. Could you advise on the correct way to build this kernel module?

aher2600@aher2600-VMware:~/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src$ make -C /home/aher2600/android_build/out/target/product/evk_8mp/obj/KERNEL_OBJ M=/home/aher2600/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src ARCH=arm64 CROSS_COMPILE=/opt/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- modules
make: Entering directory '/home/aher2600/android_build/out/target/product/evk_8mp/obj/KERNEL_OBJ'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: Android (8508608, based on r450784e) clang version 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)
You are using: aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025
CC [M] /home/aher2600/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src/mlan/mlan_shim.o
aarch64-none-linux-gnu-gcc: error: unrecognized argument to ‘-fsanitize=’ option: ‘shadow-call-stack’
aarch64-none-linux-gnu-gcc: error: unrecognized argument to ‘-fsanitize=’ option: ‘cfi’
aarch64-none-linux-gnu-gcc: error: unrecognized argument to ‘-fsanitize=’ option: ‘array-bounds’
aarch64-none-linux-gnu-gcc: error: unrecognized argument to ‘-fsanitize=’ option: ‘local-bounds’
aarch64-none-linux-gnu-gcc: error: unrecognized command line option ‘-Qunused-arguments’
aarch64-none-linux-gnu-gcc: error: unrecognized command line option ‘-mno-global-merge’
aarch64-none-linux-gnu-gcc: error: unrecognized command line option ‘-ftrivial-auto-var-init=zero’
aarch64-none-linux-gnu-gcc: error: unrecognized command line option ‘-fsplit-lto-unit’
aarch64-none-linux-gnu-gcc: error: unrecognized command line option ‘-fsanitize-cfi-cross-dso’
aarch64-none-linux-gnu-gcc: error: unrecognized command line option ‘-fno-sanitize-cfi-canonical-jump-tables’
aarch64-none-linux-gnu-gcc: error: unrecognized command line option ‘-fno-sanitize-trap=cfi’; did you mean ‘-fno-sanitize-recover’?
aarch64-none-linux-gnu-gcc: error: unrecognized command line option ‘-fno-sanitize-blacklist’; did you mean ‘-fno-sanitize-recover’?
make[1]: *** [/home/aher2600/android_build/vendor/nxp-opensource/kernel_imx/scripts/Makefile.build:287: /home/aher2600/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src/mlan/mlan_shim.o] Error 1
make: *** [/home/aher2600/android_build/vendor/nxp-opensource/kernel_imx/Makefile:1944: /home/aher2600/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src] Error 2
make: Leaving directory '/home/aher2600/android_build/out/target/product/evk_8mp/obj/KERNEL_OBJ'
aher2600@aher2600-VMware:~/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src$ make -C /home/aher2600/android_build/out/target/product/evk_8mp/obj/KERNEL_OBJ M=/home/aher2600/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src ARCH=arm64 CC=/opt/prebuilt-android-clang/clang-r450784e/bin/clang modules
make: Entering directory '/home/aher2600/android_build/out/target/product/evk_8mp/obj/KERNEL_OBJ'
CC [M] /home/aher2600/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src/mlan/mlan_shim.o
error: unknown warning option '-Wimplicit-fallthrough=3'; did you mean '-Wimplicit-fallthrough'? [-Werror,-Wunknown-warning-option]
make[1]: *** [/home/aher2600/android_build/vendor/nxp-opensource/kernel_imx/scripts/Makefile.build:287: /home/aher2600/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src/mlan/mlan_shim.o] Error 1
make: *** [/home/aher2600/android_build/vendor/nxp-opensource/kernel_imx/Makefile:1944: /home/aher2600/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src] Error 2
make: Leaving directory '/home/aher2600/android_build/out/target/product/evk_8mp/obj/KERNEL_OBJ'

0 Kudos
Reply
20 Replies

3,570 Views
javadR3
Contributor III

Hi @ChChang 

Where can I find PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL package. I don't see any package in the page of AW693 chip.

Regards,

Javad

0 Kudos
Reply

6,265 Views
ChChang
Contributor II

My make command is below:
$make CC=/opt/prebuilt-android-clang/clang-r450784e/bin/clang -C /home/aher2600/android_build/out/target/product/evk_8mp/obj/KERNEL_OBJ M=$(pwd) module

Now, the error log is 

CC [M] /home/aher2600/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src/mlinux/moal_main.o /home/aher2600/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src/mlinux/moal_main.c:286:20: error: no member named 'current_bss' in 'struct wireless_dev' priv->wdev->current_bss) { ~~~~~~~~~~ ^ /home/aher2600/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src/mlinux/moal_main.c:384:20: error: no member named 'current_bss' in 'struct wireless_dev' priv->wdev->current_bss) { ~~~~~~~~~~ ^ /home/aher2600/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src/mlinux/moal_main.c:4964:18: error: no member named 'current_bss' in 'struct wireless_dev' priv->wdev->current_bss) { ~~~~~~~~~~ ^ /home/aher2600/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src/mlinux/moal_main.c:7859:19: error: no member named 'current_bss' in 'struct wireless_dev' priv->wdev->current_bss) { ~~~~~~~~~~ ^ 4 errors generated. make[1]: *** [/home/aher2600/android_build/vendor/nxp-opensource/kernel_imx/scripts/Makefile.build:287: /home/aher2600/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src/mlinux/moal_main.o] Error 1 make: *** [/home/aher2600/android_build/vendor/nxp-opensource/kernel_imx/Makefile:1944: /home/aher2600/AW693/PCIE-WLAN-UART-BT-AW693-18.99.2.p61.5-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/Drivers/PCIE-UAPSTA-AW693-LNX_6_1_0_RC4-IMX8-18.99.2.p61.5-MXM6X18418_P3_V0-MGPL/wlan_src] Error 2 make: Leaving directory '/home/aher2600/android_build/out/target/product/evk_8mp/obj/KERNEL_OBJ' #### failed to build some targets (6 seconds) ####

Please help, thanks!

0 Kudos
Reply

6,254 Views
cdoumenc
NXP Employee
NXP Employee

Did you check page https://www.nxp.com/design/design-center/software/embedded-software/i-mx-software/android-os-for-i-m... ?

Ex for "Android 13.0.0_1.2.0 (L5.15.71_2.2.0 BSP)" : see doc NXP Wi-Fi Driver Features and Release Notes for Android, in chapter "2 Getting Latest Wireless Driver and Firmware Fixes" : "For downloading the Wi-Fi driver...."

0 Kudos
Reply

6,207 Views
ChChang
Contributor II

Hi 

I referred to /vendor/nxp-opensource/nxp-mwifiex and similarly added the AW693 driver to /nxp-opensource/.
Now, the Wi-Fi functionality is working normally on the i.mx8mp evk with Android 13.
However, the Bluetooth functionality is not responding at all.
What else do I need to modify? Thanks!

[ 10.494112][ T8] PCIEAW693: init module param from usr cfg
[ 10.515053][ T8] card_type: PCIEAW693, config block: 0
[ 10.520541][ T8] fw_name=pcieuartaw693_combo.bin.se
[ 10.526014][ T8] cfg80211_wext=0xf
[ 10.530117][ T8] sta_name=wlan
[ 10.533484][ T8] uap_name=wlan
[ 10.536839][ T8] wfd_name=p2p
[ 10.540103][ T8] max_vir_bss=1
[ 10.543455][ T8] cal_data_cfg=none
[ 10.547141][ T8] ps_mode = 1
[ 10.550318][ T8] auto_ds = 1
[ 10.553541][ T8] host_mlme=enable
[ 10.557180][ T8] rx_work=1 cpu_num=4
[ 10.561109][ T8] Enable moal_recv_amsdu_packet
[ 10.565896][ T8] Attach mlan adapter operations.card_type is 0x20c.
[ 10.578133][ T8] Request firmware: pcieuartaw693_combo.bin.se
[ 10.617378][ T204] make_f2fs:
[ 10.620594][ T204] make_f2fs: F2FS-tools: mkfs.f2fs Ver: 1.14.0 (2020-08-24)
[ 10.628148][ T204] make_f2fs:
[ 10.631321][ T204] make_f2fs: Info: Disable heap-based policy
[ 10.637180][ T204] make_f2fs: Info: Debug level = 1
[ 10.642170][ T204] make_f2fs: Info: Trim is enabled
[ 10.647164][ T204] make_f2fs: Info: Set conf for android
[ 10.652582][ T204] make_f2fs: Info: Enable utf8 with casefolding
[ 10.658698][ T204] make_f2fs: Info: Enable Project quota
[ 10.664119][ T204] make_f2fs: Info: Enable Compression
[ 10.757871][ T8] FW download over, size 693352 bytes
[ 12.242438][ T8] WLAN FW is active
[ 12.266329][ T57] VDLL image: len=120600
[ 12.270579][ T57] fw_cap_info=0x48fcaf03, dev_cap_mask=0xffffffff
[ 12.277013][ T57] uuid: 0b71a3b3267f58709a37924763495d3a
[ 12.282584][ T57] max_p2p_conn = 8, max_sta_conn = 64
[ 12.307478][ T8] Register NXP 802.11 Adapter wlan0
[ 12.312677][ T8] wlan: wlan%d set max_mtu 2000
[ 12.321164][ T8] Register NXP 802.11 Adapter wlan1
[ 12.332649][ T8] Register NXP 802.11 Adapter p2p0
[ 12.337743][ T8] wlan: version = PCIEAW693-18.99.2.p61.5-MX6X18418.p3-GPL-(FP99)
[ 12.346535][ T8] wlan_pcie 0000:01:00.1: enabling device (0000 -> 0002)
[ 12.353551][ T8] PCI memory map Virt0: 000000006352312e PCI memory map Virt2: 000000004a82f853
[ 12.362471][ T8] Attach moal handle ops, card interface type: 0x20c
[ 12.369048][ T8] rps set to 0 from module param
[ 12.373867][ T204] F2FS-fs (dm-37): Using encoding defined by superblock: utf8-12.1.0 with flags 0x0
[ 12.373999][ T8] PCIEAW693: init module param from usr cfg
[ 12.389026][ T8] Configuration block, fallback processing
[ 12.393482][ T204] F2FS-fs (dm-37): Found nat_bits in checkpoint
[ 12.394740][ T8] Configuration fallback to, card_type: 0x20c, blk_id: 0x0
[ 12.407906][ T8] rps set to 0 from module param
[ 12.412736][ T8] rx_work=1 cpu_num=4
[ 12.416584][ T8] Enable moal_recv_amsdu_packet
[ 12.421324][ T8] Attach mlan adapter operations.card_type is 0x20c.
[ 12.434146][ T8] Request firmware: pcieuartaw693_combo.bin.se
[ 12.441084][ T8] WLAN FW already running! Skip FW download
[ 12.446918][ T8] WLAN FW is active
[ 12.451182][ T258] VDLL image: len=120600
[ 12.455985][ T258] fw_cap_info=0x68fc8b03, dev_cap_mask=0xffffffff
[ 12.462319][ T258] uuid: 0b71a3b3267f58709a37924763495d3a
[ 12.467851][ T258] max_p2p_conn = 8, max_sta_conn = 64
[ 12.468880][ T204] F2FS-fs (dm-37): Start checkpoint disabled!
[ 12.481880][ T204] F2FS-fs (dm-37): Mounted with checkpoint version = 25265e1b
[ 12.488314][ T258] CMD_RESP: cmd 0x4d error, result=0x1
[ 12.494554][ T258] IOCTL failed: 00000000460d4626 id=0x20000, sub_id=0x20006 action=1, status_code=0x3
[ 12.504284][ T8] set mac address failed! status=-1, error_code=0x3
[ 12.510794][ T8] woal_init_priv: set mac address failed
[ 12.517822][ T8] Register NXP 802.11 Adapter wlan2
[ 12.523049][ T8] wlan: wlan%d set max_mtu 2000
[ 12.532126][ T8] Register NXP 802.11 Adapter wlan3
[ 12.542616][ T258] CMD_RESP: cmd 0x4d error, result=0x1
[ 12.548025][ T258] IOCTL failed: 000000005c6b57d3 id=0x20000, sub_id=0x20006 action=1, status_code=0x3
[ 12.557495][ T8] set mac address failed! status=-1, error_code=0x3
[ 12.564055][ T8] woal_init_priv: set mac address failed
[ 12.570818][ T8] Register NXP 802.11 Adapter p2p1
[ 12.575563][ T204] vold: keystore2 Keystore generateKey returned service specific error: -67
[ 12.575866][ T8] wlan: version = PCIEAW693-18.99.2.p61.5-MX6X18418.p3-GPL-(FP99)

Regards,

CH

0 Kudos
Reply

6,204 Views
ChChang
Contributor II

Hi 

Attachment is my complete booting log,

Do I need to change the UART name?
If so, what should be the name for the AW693 Bluetooth to use?
And what files need to be modified ?
Thanks!

S__20586502.jpg

Regards,
CH

0 Kudos
Reply

6,197 Views
cdoumenc
NXP Employee
NXP Employee

I think you need to follow doc https://www.nxp.com/webapp/sps/download/license.jsp?colCode=Android_Vendor_HAL_V009_Integration_Guid... to integrate properly wifi and bluetooth BSP and device drivers.

0 Kudos
Reply

6,170 Views
ChChang
Contributor II

Hi

When I connect the AW693 EVB to the i.mx8mp-evk (Android 13),
/dev/ttyUSB0 is not generated. I checked the imx_v8_android_defconfig,
and it contains:

CONFIG_USB_SERIAL=y CONFIG_USB_SERIAL_CONSOLE=y CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_SIMPLE=y CONFIG_USB_SERIAL_CP210X=m CONFIG_USB_SERIAL_FTDI_SIO=y

So, the driver should also be enabled in the kernel. Am I missing any steps?

P.S. When connecting the AW693 to the i.mx8mp-evk (Linux),
/dev/ttyUSB0 is generated as expected.

Regards,

CH

0 Kudos
Reply

6,163 Views
cdoumenc
NXP Employee
NXP Employee

In your case i.mx8mp, using Android, I think that you should see /dev/ttymxc0 according to conf/nxp/evk_8mp/bt_vendor.conf content :

mchar_port = /dev/ttymxc0

As doc "AN - 88Q9098-88W9098 - Android Vendor HAL v009 Integration Guide" I previously mentioned says, you can also change conf/nxp/evk_8mp/bt_vendor.conf to get :

mchar_port = /dev/ttyUSB

if you want.

0 Kudos
Reply

6,012 Views
ChChang
Contributor II

Thank you for your reply.
I have modified the contents of bt_vendor.conf as follows:
mchar_port = /dev/ttyUSB0
pFileName_image = /vendor/firmware/uartaw693_bt.bin.se
baudrate_dl_helper = 115200
baudrate_dl_image = 3000000
iSecondBaudrate = 0
baudrate_fw_init = 115200
baudrate_bt = 3000000
enable_download_fw=0

During the boot process,
I can see that the loading of AW693 fw pcieuartaw693_combo.bin.se is successful, and it shows WLAN active.

However, in Android, only WiFi is working, while Bluetooth is OFF, and even if enabled, there is no response.

CH

0 Kudos
Reply

6,002 Views
cdoumenc
NXP Employee
NXP Employee

Could you provide logs please ? Especially showing what you observed ("loading of AW693 fw pcieuartaw693_combo.bin.se is successful", "WLAN active").

For BT : can you show how you see that "Bluetooth is OFF"  and also that "there is no response".

Did you follow the integration guide chapter "2.1.1 Configurations Detail" ?
How did you set is_uart_port ?

Could you also check doc Getting Started with NXP-based Wireless Modules on i.MX 8M Quad EVK Running Android 13 OS – User man..., please ? Especially chapter "11 Debug of Bluetooth" to figure out what is happening.

Could you also check driver and fw versions in the output of command "adb logcat" ?
ex :
1 Wi-Fi HAL version: WifiHAL : Wifi HAL version : 009.002
2 BT HAL version: bt-vnd-nxp: bt_vnd_init --- BT Vendor HAL Ver: 009.005 ---
3 Wi-Fi Firmware version: wlan: version = PCIE9098--17.68.1.p109.5-MXM5X17312.p6-GPL-(FP68)
4 BT Firmware version: hardware_nxp: FW version: 17.26.1.p109.5

0 Kudos
Reply

5,943 Views
ChChang
Contributor II

Hi 

Attachment is my i.mx8mp (Android13 ) log file when device boot up,
We can log as below :
[ 15.027039][ T10] wlan_pcie 0000:01:00.0: enabling device (0000 -> 0002)
[ 15.036120][ T293] loop11: detected capacity change from 0 to 16240
[ 15.041252][ T10] PCI memory map Virt0: 00000000ad29984b PCI memory map Virt2: 00000000935efdc2
[ 15.056517][ T10] Attach moal handle ops, card interface type: 0x20c
[ 15.063087][ T10] rps set to 0 from module param
[ 15.069799][ T10] PCIEAW693: init module param from usr cfg
[ 15.075630][ T10] card_type: PCIEAW693, config block: 0
[ 15.081058][ T10] cfg80211_wext=0xf
[ 15.084745][ T10] sta_name=wlan
[ 15.086424][ T294] EXT4-fs (loop10): mounted filesystem without journal. Quota mode: none.
[ 15.088079][ T10] uap_name=wlan
[ 15.088083][ T10] wfd_name=p2p
[ 15.098232][ T294] loop12: detected capacity change from 0 to 536
[ 15.099764][ T10] max_vir_bss=1
[ 15.099770][ T10] cal_data_cfg=none
[ 15.099772][ T10] ps_mode = 1
[ 15.099774][ T10] auto_ds = 1
[ 15.099780][ T10] host_mlme=enable
[ 15.126110][ T10] fw_name=pcieuartaw693_combo.bin.se
[ 15.131316][ T10] rx_work=1 cpu_num=4
[ 15.135192][ T10] Attach mlan adapter operations.card_type is 0x20c.
[ 15.146679][ T10] Request firmware: pcieuartaw693_combo.bin.se
[ 15.327674][ T10] FW download over, size 693352 bytes
[ 16.814736][ T10] WLAN FW is active


In the Android settings page, I can see that Bluetooth (BT) is off.

Bluetooth off 

I clicked on the Bluetooth button to try and enable BT, but the status remains continuously in 'Turning on'.

Try to enable BT 

I followed your instructions to check the logcat and found 'open uart port /dev/ttyUSB0 failed'. I think this should be the main reason.

01-23 22:38:11.602 1339 1781 I android.hardware.bluetooth@1.0-impl: BluetoothHci::initialize() 01-23 22:38:11.609 1339 1781 I bt-vnd-nxp: bt_vnd_init --- BT Vendor HAL Ver: 009.020 --- 01-23 22:38:11.609 1339 1781 I bt-vnd-nxp: set_mchar_port(L201): the mchar_port is /dev/ttyUSB0 01-23 22:38:11.609 1339 1781 I bt-vnd-nxp: bt_vnd_init(L1586): Max supported Log Level: 5 01-23 22:38:11.609 1339 1781 I bt-vnd-nxp: bt_vnd_init(L1587): Selected Log Level:3 01-23 22:38:11.609 1339 1781 I bt-vnd-nxp: BT_VHAL Log Level:3 01-23 22:38:11.609 1339 1781 D android.hardware.bluetooth@1.0-impl: Open vendor library loaded 01-23 22:38:11.609 1339 1781 E bt-vnd-nxp: init_uart(L1101): Can't open serial port 01-23 22:38:11.609 1339 1781 E bt-vnd-nxp: init_uart(L1102): Error: Permission denied (13) 01-23 22:38:11.610 1339 1781 W bt-vnd-nxp: uart_init_open(L1178): open uart port /dev/ttyUSB0 failed fd: -1, retrying 01-23 22:38:11.610 1339 1781 W bt-vnd-nxp: uart_init_open(L1179): Error: Permission denied (13) 01-23 22:38:11.632 420 443 E display : updateScreen failed because not power on:3

How should I modify it to make it work properly with ttyUSB0?
evk_8mp:/ $ ls /dev/tty* -al
crw-rw-rw- 1 root root 5, 0 1970-01-01 00:00 /dev/tty
crw------- 1 root root 188, 0 1970-01-01 00:00 /dev/ttyUSB0
crw-rw---- 1 bluetooth bluetooth 207, 16 1970-01-01 00:00 /dev/ttymxc0
crw------- 1 root root 207, 17 2024-01-23 22:54 /dev/ttymxc1
crw------- 1 root root 207, 18 1970-01-01 00:00 /dev/ttymxc2
crw------- 1 root root 235, 0 1970-01-01 00:00 /dev/ttynull

Regards,

CH

0 Kudos
Reply

5,934 Views
cdoumenc
NXP Employee
NXP Employee

I understand that, in file bt_vendor.conf, you didn't set is_uart_port, so, according to doc  "AN - 88Q9098-88W9098 - Android Vendor HAL v009 Integration Guide", it is set to defaut value 0, ie "Use SD or USB interface".
Could you set it to 1, ie "Use UART interface", please ?

0 Kudos
Reply

5,924 Views
ChChang
Contributor II

Hi

Thanks for your reply!

In the previous log,
when the i.mx8mp shows the error message "open uart port /dev/ttyUSB0 failed",
I have already set "is_uart_port = 1" in the bt_vendor.conf .
The complete content of the file is as below:

mchar_port = /dev/ttyUSB0
is_uart_port = 1

pFileName_helper = /vendor/firmware/mrvl/helper_uart_3000000.bin
pFileName_image = /vendor/firmware/uart8997_bt_v4.bin
baudrate_dl_helper = 115200
baudrate_bt = 300000
baudrate_dl_image = 300000
iSecondBaudrate = 0
baudrate_fw_init = 115200
enable_download_fw=0

Are there any other part that need to be modified?

Regards,

CH

0 Kudos
Reply

5,880 Views
cdoumenc
NXP Employee
NXP Employee

Why

pFileName_image = /vendor/firmware/uart8997_bt_v4.bin
and not

pFileName_image = /vendor/firmware/uartaw693_bt.bin.se

anymore ?

I see in your last log 20240129-aw693.txt :

[ 0.000000][ T0] Linux version 6.1.25-android14-11-gaa4fe52ab59e-ab10687853 (build-user@build-host) (Android (10087095, +pgo, +bolt, +lto, -mlgo, based on r487747c) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362), LLD 17.0.2) #1 SMP PREEMPT Mon Aug 21 11:40:17 UTC 2023

So you are trying to use Android 14 which NXP doesn't officially support. Could you use one of the officially supported Android releases for i.MX8MPlus please (ex : Android 13.0.0_2.0.0 (L6.1.22_2.0.0 BSP)) ?
You will find it on dedicated page https://www.nxp.com/design/design-center/software/embedded-software/i-mx-software/android-os-for-i-m...

0 Kudos
Reply

5,835 Views
ChChang
Contributor II

Hi

I have downloaded  imx-android-13.0.0_2.0.0.tar.gz and comiler again ,

But the version still is Android14 not Android 13:
[ 0.000000][ T0] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000][ T0] Linux version 6.1.25-android14-11-maybe-dirty (build-user@build-host) (Android (10087095, +pgo, +bolt, +lto, -mlgo, based on r487747c) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362), LLD 17.0.2) #1 SMP PREEMPT Thu Jan 1 00:00:00 UTC 1970

I followed the "Android User's Guide Rev. android-13.0.0_2.0.0 — 31 July 2023" to execute.
Could you please tell me which step I did wrong?
Thank you!

Regards,

CH

0 Kudos
Reply

5,592 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Dear @ChChang ,

 

I noticed the original question in the post is "Failed to build AW693 driver ", According to discussions from context, the question has been solved. And your another questions is on Bluetooth, so would you please help to create a new case or post for it?  

[Note]

In order to avoid being confused, we usually discuss only one question in a case or post.

 

Thanks for your understanding!

Regards,

weidong

 

0 Kudos
Reply

5,828 Views
cdoumenc
NXP Employee
NXP Employee

Hi,

It seems that you didn't flash the built images to the target. Did you follow doc chapter "5 Programming Images" ?

Regards,

cdoumenc

0 Kudos
Reply

5,824 Views
ChChang
Contributor II

Hi

I did a testing, I downloaded the i.mx8mp-evk demo images from the NXP official website, specifically android-12.0.0_1.0.0_image_8mpevk.tar.gz and android-13.0.0_2.0.0_image_8mpevk.tar.gz.
I then flashed them onto the eMMC in turn. For the complete log, please refer to the attachment.
It was observed that after successfully flashing the android-12.0.0_1.0.0_image_8mpevk.tar.gz, the version was as follows:

evk_8mp:/ $ cat /proc/version
Linux version 5.10.66-android12-9-00021-g2c152aa32942-ab8087165 (build-user@build-host) (Android (7284624, based on r416183b) clang version 12.0.5 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee), LLD 12.0.5 (/buildbot/src/android/llvm-toolchain/out/llvm-project/lld c935d99d7cf2016289302412d708641d52d2f7ee)) #1 SMP PREEMPT Fri Jan 14 17:35:16 UTC 2022

After successfully flashing the android-13.0.0_2.0.0_image_8mpevk.tar.gz, the version was:
evk_8mp:/ $ cat /proc/version
Linux version 6.1.25-android14-11-maybe-dirty (build-user@build-host) (Android (10087095, +pgo, +bolt, +lto, -mlgo, based on r487747c) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362), LLD 17.0.2) #1 SMP PREEMPT Thu Jan 1 00:00:00 UTC 1970

Please assist in confirming this. Thank you!

Regards,

CH

0 Kudos
Reply

5,724 Views
cdoumenc
NXP Employee
NXP Employee

Hi,

Do you see BT working on your i.Mx 8M Plus after having flashed prebuilt images as explained in "Android 13.0.0_2.0.0 (L6.1.22_2.0.0 BSP)" doc ANDROID_QUICK_START_GUIDE.pdf at chapter "5.3 Flashing board images" ?

Regards,

cdoumenc

0 Kudos
Reply

5,877 Views
ChChang
Contributor II

Hi

I once set pFileName_image to /vendor/firmware/uartaw693_bt.bin.se, but it did not successfully enable BT, and since enable_download_fw=0, I thought the setting of pFileName_image was not important. I will correct it back to /vendor/firmware/uartaw693_bt.bin.se and try again.

Additionally, I downloaded the Android source from the NXP official website:
imx-android-13.0.0_2.2.0.tar.gz.
I don't know why the compiled Android version is
Linux version 6.1.25-android14-11-gaa4fe52ab59e-ab10687853 (build-user@build-host) (Android (10087095, +pgo, +bolt, +lto, -mlgo, based on r487747c) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362), LLD 17.0.2) #1 SMP PREEMPT Mon Aug 21 11:40:17 UTC 2023.

I will download imx-android-13.0.0_2.0.0.tar.gz again and re-execute it to see what happens.
Thanks.

Regards,

CH

0 Kudos
Reply