This is an example for user to transfer files between i.MX8MP Linux platform and other devices via Bluetooth.
Environment :
Hardware : i.MX8MP LPDDR4 EVK Board, Android Phone
Software : L6.6.23-2.0.0
Step1 : Build Yocto image and burnt to the SD card or EMMC
- repo init -u https://github.com/nxp-imx/imx-manifest.git -b imx-linux-scarthgap -m imx-6.6.23-2.0.0.xml
- repo sync
- DISTRO=fsl-imx-xwayland MACHINE=imx8mp-lpddr4-evk source imx-setup-release.sh -b build-xwayland
- Add the following code to "conf/local.conf"
IMAGE_INSTALL:append = " glibc-gconv-utf-16"
- bitbake imx-image-full
- uuu -b emmc_all imx-image-full-imx8mp-lpddr4-evk.rootfs-20240919015845.wic
Step2 : Test steps
- Boot board with "imx8mp-evk-usdhc1-m2.dtb" file.
- load Wi-Fi Firmware
root@imx8mp-lpddr4-evk:~# modprobe moal mod_para=nxp/wifi_mod_para.conf
- Load BT firmware and enable BT
root@imx8mp-lpddr4-evk:~# modprobe btnxpuart
root@imx8mp-lpddr4-evk:~# hciconfig

root@imx8mp-lpddr4-evk:~# hciconfig hci0 up
- connect the BT of Android Phone
root@imx8mp-lpddr4-evk:~# bluetoothctl
[bluetooth]# default-agent
[bluetooth]# agent on
[bluetooth]# discoverable on
[bluetooth]# scan on
[bluetooth]# scan off

[bluetooth]# pair 90:F0:52:92:A6:6C
we need to type Yes on board and click 配对 on phone.


[bluetooth]# connect 90:F0:52:92:A6:6C

[Meizu16m]# quit

- Transfer file
1). Android Phone-> i.MX8MP EVK Board
root@imx8mp-lpddr4-evk:~# /usr/libexec/bluetooth/obexd -a -n -r /root/ & obexctl

Then select a file on your phone ad choose transfer by Bluetooth.

2).i.MX8MP EVK Board -> Android Phone
[obex]# connect 90:F0:52:92:A6:6C

[90:F0:52:92:A6:6C]# send /home/root/test.txt

Note :
1. Do not suggestion use IOS phone.
2. If your i.MX8MP board can not scan your BT device, Suggest change the device BT name and run on "scan on" command again.