Skip to content

i.MX 93 Evaluation Kit๐Ÿ”—

Introduction๐Ÿ”—

The PAN9019A requires a fairly powerful host processor that executes the low-level Wi-Fiยฎ and Bluetoothยฎ drivers as well as some high-level Wi-Fi application software and a Bluetooth stack.

As an evaluation platform you can use the NXPยฎ i.MX 93 Evaluation Kit (i.MX93EVK), which is based on the i.MX 93 application processor with two Armยฎ Cortexยฎ-A55 cores and a Cortex-M33 core. It features a 2 GB LPDDR4 RAM, a 16 GB eMMC, two Gigabit Ethernet ports and two USB 2.0 ports.

The i.MX 93 supports the SDIO 3.0 specification, which is required for operation of the PAN9019A.

For the i.MX 93 Evaluation Kit a Linuxยฎ Board Support Package (BSP) is available from NXP. The Linux BSP provides everything that is needed to build a Linux-based image for the i.MX 93 Evaluation Kit using the Yocto Projectยฎ.

Yocto Project

The Yocto Project is an open source project that provides templates, tools and methods for creating custom Linux images for embedded systems.

Board Overview๐Ÿ”—

1 USB Type-C power connector
You can use the USB Type-C power connector to supply power the i.MX 93 Evaluation Kit.

2 Ethernet ports - ENET1 and ENET2
You can use the Ethernet ports to connect the i.MX 93 Evaluation Kit to wired networks.

3 Boot mode switch - SW1301
You can use the boot mode switch to select the boot mode. Also see Writing to the eMMC and Booting from the eMMC

4 Reset button
You can use the reset button to reset the i.MX 93 Evaluation Kit to a known-good state.

5 USB Type-C port - USB1
You can use the USB Type-C port to write images to the eMMC. Also see Writing to the eMMC

6 USB Debug port
You can use the USB debug port to interact with the operating system.

7 M.2 Key E socket
You can mount the PAN9019(A) M.2 device in the M.2 Key E socket.

Host System Setup๐Ÿ”—

You have two options for setting up your i.MX 93 Evaluation Kit host system, both are using the NXP Linux BSP and the Yocto Project:

  1. Build a custom image, see Building the Yocto Image.

  2. Use a precompiled image, see Downloading the Precompiled Image.

NXP Linux Board Support Package๐Ÿ”—

NXP provides a so-called Linux board support package (BSP) for their i.MX application processor portfolio. The BSP offers a quick way to build images using the Yocto Project for boards based on i.MX processors.

You can find an overview of the Linux BSP releases on the Embedded Linux for i.MX Application Processors page.

Under the section Linux Current Release you can find information and documentation regarding the latest BSP release. Including the following:

  • The name of the release 1. In this case, Linux 6.1.55_2.2.0 with 6.1.55 being the Linux kernel version that is used.

  • The i.MX Yocto Project User's Guide 2 documenting the build process of the Linux image with Yocto.

  • The NXP Wi-Fi Driver Features and Release Notes 3.

  • A list of the supported evaluation kits 4 based on processors from the i.MX application processor family and downloads of precompiled images for the supported evaluation kits.

Note

Please note that you need an account for the NXP Homepage to be able to access the mentioned documents.

The Linux BSP consists of a number of so-called Yocto meta layers that are maintained by the FSL Community. These layers provide recipes for building packages that in sum make up an image for an evaluation kit, for example the i.MX 93 Evaluation Kit. Such an image includes the Linux kernel, a root filesystem and a bootloader.

A manifest file specifies the Yocto meta layers that the BSP is based on. NXP hosts their manifest files in the imx-manifest repository. The repo tool works with these manifest files and manages the Git repositories of the different Yocto meta layers.

The additional meta-imx Yocto layer from NXP comes with recipes that integrate the necessary drivers with just a few additional adjustments needed to bring up the PAN9019A. The Wi-Fi drivers are currently built as kernel modules. The layer is also used to release updated and new recipes and machine configurations that are eventually upstreamed to the community layers maintained by the community.

Downloading the Precompiled Image๐Ÿ”—

NXP provides precompiled images of their Linux BSP releases for their portfolio of MPU evaluation kits including the i.MX 93 Evaluation Kit.

You can use the precompiled image to evaluate the PAN9019A M.2 device in conjunction with the i.MX 93 Evaluation Kit in case you don't want to setup a Yocto build environment right away.

The following requirements must be met:

  • You have a valid user account for nxp.com.

To download a precompiled image execute the following steps.

  1. Use your browser to open the Embedded Linux for i.MX Application Processors page.

  2. Scroll down to the Linux Current Release section or scroll further down to see the table of past releases. Please note, the PAN9019A is only supported from the lf-6.1.55_2.2.0 release and newer.

  3. In the Supported Platforms/Binary Demo Files column click on i.MX 93 EVK, QSB to start the download of the precompiled i.MX 93 Evaluation Kit image.

    In case you are not already logged in you are prompted to do so.

  4. Before the image download starts you are prompted to read and accept an EULA.

    After you have accepted the EULA the LF_v6.1.55.-2.2.0_images_IMX93EVK.zip archive is downloaded.

Building the Yocto Image๐Ÿ”—

In case you don't want to use a precompiled image to evaluate the PAN9019A M.2 device in conjunction with the i.MX 93 Evaluation Kit you can setup a Yocto build environment that uses the Linux BSP.

The following requirements must be met:

  1. Create a new folder imx-yocto-bsp for the Linux BSP data.

    mkdir imx-yocto-bsp
    cd imx-yocto-bsp
    
  2. Initialize the current directory as a repo client directory.

    repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-mickeldore -m imx-6.1.55_2.2.0.xml
    

    The .repo folder is created.

  3. Synchronize the local directory with the remote repositories.

    repo sync
    

    The meta layers are downloaded from the respective repositories and stored in the sources directory.

  4. Execute the following command to setup the build directory and configuration files.

    DISTRO=fsl-imx-wayland MACHINE=imx93evk source imx-setup-release.sh -b build
    
  5. You are prompted to read and accept an EULA by NXP. To continue to use the i.MX proprietary software, you must agree to the conditions of this license. Press Space to page through the EULA. At the end press Y to accept.

    In case you accepted the EULA, the build directory is created and set as the current working directory.

  6. Start the Yocto build.

    bitbake imx-image-multimedia
    

    Once the build is done the compressed Linux image imx-image-multimedia-imx93evk.wic.zst and the bootloader used for writing to the eMMC imx-boot-imx93evk-sd.bin-flash_singleboot are available in tmp/deploy/images/imx93evk.

Linux BSP Releases

The Linux BSP is released for a specific Yocto Project Release (in this case release 4.2 with the codename Mickeldore) and a specific kernel version (in this case 6.1.55) used by that Yocto Release.

The releases of the drivers for the PAN9019A follow the release schedule of the Linux BSP.

To get an overview of the available releases you can check out Embedded Linux for i.MX Application Processors.

Note

The Linux BSP lets you choose from a number of distros, images and target machines.

For further information on the Linux BSP and the Yocto build process please refer to the i.MX Yocto Project User's Guide.

Writing to the eMMC๐Ÿ”—

The following requirements must be met:

Note

Please note that you need an account for the NXP Homepage to be able to access the mentioned documents.

Switch Setting
1 (BM1) ON
2 (BM0) ON
3 (BM2) OFF
4 (BM3) OFF
Serial download SW13013 setting

Execute the following steps to write the self-built image to the eMMC.

  1. Set the boot mode switch SW1301 3 to the serial download configuration as listed in the table above.

  2. Connect the USB Type-C port USB1 5 to your computer.

  3. Power on the i.MX 93 Evaluation Kit by inserting a USB Type-C power supply cable into the USB Type-C power connector 1 or press the reset button 4 if the board is already powered.

  4. Execute the following command.

    uuu -b emmc_all imx-boot-imx93evk-sd.bin-flash_singleboot imx-image-multimedia-imx93evk.wic.zst
    

    The Universal Update Utility first downloads the bootloader and afterwards decompresses and writes the image to the eMMC.

Execute the following steps to write the precompiled image to the eMMC.

  1. Set the boot mode switch SW1301 3 to the serial download configuration as listed in the table above.

  2. Connect the USB Type-C port USB1 5 to your computer.

  3. Power on the i.MX 93 Evaluation Kit by inserting a USB Type-C power supply cable into the USB Type-C power connector 1 or press the reset button 4 if the board is already powered.

  4. Execute the following command.

    uuu LF_v6.1.55_2.2.0_images_IMX93EVK.zip/uuu.auto-imx93evk
    

    The Universal Update Utility decompresses and writes the image to the eMMC.

Booting from the eMMC๐Ÿ”—

The following requirements must be met:

Switch Setting
1 (BM1) OFF
2 (BM0) OFF
3 (BM2) OFF
4 (BM3) OFF
eMMC boot SW13013 setting

Execute the following steps to boot the i.MX 93 Evaluation Kit from the eMMC.

  1. Configure the eMMC as the boot device by setting the boot mode switch SW1301 3 to the configuration listed in the table above.

  2. Power on the i.MX 93 Evaluation Kit by inserting a USB Type-C power supply cable into the USB Type-C power connector 1 or press the reset button 4 if the board is already powered.

    You can interact with the system using the USB Debug port 6 via a serial console or using the SSH protocol if the i.MX 93 Evaluation Kit is connected to a network via one of the Ethernet ports ENET1 and ENET2 2.

Default User

The default user is called root. The system requires no password for this user.

Serial Console / SSH protocol

If you do not have any application for the SSH protocol yet, you can try the OpenSSH protocol suite.

It also includes tools for remote file operations like scp.

Connectivity๐Ÿ”—

In later steps you may have to communicate from your development system with your i.MX 93 Evaluation Kit, so it needs access to your local network.

Or you may have to download some software components directly onto the host system, in which case your i.MX 93 Evaluation Kit needs Internet connectivity.

The following requirements must be met:

To check if your i.MX 93 Evaluation Kit has access to your local network execute the following steps.

  1. Connect the i.MX 93 Evaluation Kit to your network using one of the Ethernet ports ENET1 and ENET2 2 to the configuration listed in the table above

  2. On the i.MX 93 Evaluation Kit use the ip addr command to check the IP address that got assigned to the Ethernet port in use.

    ip addr
    

    The output should look something like this:

    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
        link/ether 00:04:9f:08:78:a8 brd ff:ff:ff:ff:ff:ff
        inet 192.168.0.10/24 scope global dynamic eth0
          valid_lft 86336sec preferred_lft 86336sec
    3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
        link/ether 00:04:9f:08:78:a7 brd ff:ff:ff:ff:ff:ff
    

    In this case the ENET2 port got assigned the IPv4 address 192.168.0.10.

To check if your i.MX 93 Evaluation Kit has Internet connectivity execute the following additional step.

  1. Use the ping command to check Internet connectivity.

    ping -n 2 8.8.8.8
    

    The output should look something like this:

    Pinging 8.8.8.8 with 32 bytes of data:
    Reply from 8.8.8.8: bytes=32 time=19ms TTL=116
    Reply from 8.8.8.8: bytes=32 time=17ms TTL=116
    [...]
    

    Your i.MX 93 Evaluation Kit has Internet connectivity.

rgpower Files๐Ÿ”—

The image which you wrote to the i.MX 93 Evaluation Kit in step Writing to the eMMC already includes the Wi-Fi and Bluetooth drivers and the basic device tree integration for the PAN9019A M.2 device.

But before you can fully operate the PAN9019A, a set of so-called rgpower files is required. Since these files are provided by Panasonic they are not included in the image you built and you need to transfer them to the system manually.

For further information on this topic refer to rgpower Files in the Software Guide.

To gain access to the rgpower files you have to go through an uncomplicated approval process that you can find directly on the following pages.

Warning

The PAN9019A is a radio certified module. There are conditions on hardware and software which must be met for the modular approval to be valid.

For detailed information please refer to the PAN9019A Module Integration Guide at

However, if you want to continue right away you can also start with the single world-wide (WW) rgpower file, which is the fall-back regulatory file for all regions the module is certified for.

The world-wide rgpower file has a couple restrictions compared to the region-specific rgpower files:

  • Support for channels 1 to 11 in 2.4 GHz band only

  • No support for 5 GHz band

  • Overall reduced output power

For the initial evaluation of the PAN9019A M.2 device you can download the world-wide rgpower file from the Downloads section.

But note that in any case you have to use the official regulatory files in your end product.

File Transfer๐Ÿ”—

The following requirements must be met:

  • You have started the i.MX 93 Evaluation Kit and checked for connectivity as described in Connectivity.

  • You have obtained or downloaded the rgpower file(s) and they are available in a directory on your development system.

  • You have scp installed on your development system.

rgpower Files

This documentation uses the US rgpower file (rgpower_US.bin) to showcase how to configure the PAN9019A for use in a specific region.

You can use the files for other regions (EU, CA, JP, NZ, AU) similarly.

To transfer the rgpower files with scp execute the following steps.

  1. On your development system navigate to the directory that contains the rgpower files.

  2. On your development system use the scp command to transfer the two rgpower files to the i.MX 93 Evaluation Kit.

    scp rgpower_WW.bin rgpower_US.bin root@192.168.0.10:/lib/firmware/nxp
    

    The output should look something like this:

    rgpower_WW.bin                                      100%  800   284.0KB/s   00:00    
    rgpower_US.bin                                      100% 1338   572.1KB/s   00:00
    

    If the two systems are in the same network the files are transferred.

Note

If you do not have a region-specific rgpower file yet or if you want to evaluate with the world-wide rgpower file only, then simply ignore the US rgpower file in the instructions for now.

  1. To verify that the files were transferred list the contents of the /lib/firmware/nxp directory on the i.MX 93 Evaluation Kit.

    ls -l /lib/firmware/nxp
    

    The output should look something like this:

    [...]
    -rwxr-x--- 1 root root   1338 Mar  3 17:56 rgpower_US.bin
    -rwxr-x--- 1 root root    800 Mar  3 17:56 rgpower_WW.bin
    [...]
    

Driver Configuration๐Ÿ”—

The following requirements must be met:

You have to do the following steps in order to configure the driver.

  1. Edit the SDIW612 section in the file wifi_mod_para.conf using the nano editor to contain the following settings.

    nano /lib/firmware/nxp/wifi_mod_para.conf
    
    wifi_mod_para.conf
    SDIW612 = {
        cal_data_cfg=none
        fw_name=nxp/sduart_nw61x_v1.bin.se
        cntry_txpwr=2
    }
    

For further information on this topic refer to Driver Configuration in the Software Guide.

Wi-Fi Operation๐Ÿ”—

Bring Up๐Ÿ”—

After booting the Linux system the Wi-Fi driver modules are not loaded into the kernel yet. Since the Wi-Fi drivers are built as out-of-tree modules, you have to manually load them into the kernel prior to operation.

For further information on this topic refer to Wi-Fi Driver in the Software Guide.

The following requirements must be met:

  • You have placed the rgpower_WW.bin and rgpower_US.bin in /lib/firmware/nxp as described in File Transfer.

  • You have adapted the SDIW612 section in the wifi_mod_para.conf file as described in Driver Configuration.

To load the required kernel modules execute the following instructions.

  1. Load the mlan and moal kernel modules.

    insmod /lib/modules/$(uname -r)/extra/mlan.ko
    insmod /lib/modules/$(uname -r)/extra/moal.ko mod_para=nxp/wifi_mod_para.conf
    
  2. Check the kernel messages from the Linux kernel ring buffer.

    dmesg
    

    The output should look something like this:

    wlan: Loading MWLAN driver
    wlan: Register to Bus Driver...
    vendor=0x0471 device=0x0205 class=0 function=1
    Attach moal handle ops, card interface type: 0x109
    rps set to 0 from module param
    SDIW612: init module param from usr cfg
    card_type: SDIW612, config block: 0
    cal_data_cfg=none
    fw_name=nxp/sduart_nw61x_v1.bin.se
    cntry_txpwr = 2
    SDIO: max_segs=128 max_seg_size=65535
    rx_work=1 cpu_num=4
    Enable moal_recv_amsdu_packet
    Attach mlan adapter operations.card_type is 0x109.
    wlan: Enable TX SG mode
    wlan: Enable RX SG mode
    Request firmware: nxp/sduart_nw61x_v1.bin.se
    Wlan: FW download over, firmwarelen=1004248 downloaded 916048
    WLAN FW is active
    on_time is 17142553331228
    VDLL image: len=88200
    fw_cap_info=0x487cff03, dev_cap_mask=0xffffffff
    uuid: 5f8a2a30c9205a90968ea595f001b00e
    max_p2p_conn = 8, max_sta_conn = 16
    Trying download country_power_tble: nxp/rgpower_WW.bin
    Request firmware: nxp/rgpower_WW.bin
    call regulatory_set_wiphy_regd WW
    call regulatory_set_wiphy_regd WW
    Register NXP 802.11 Adapter mlan0
    wlan: uap%d set max_mtu 2000
    Register NXP 802.11 Adapter uap0
    call regulatory_set_wiphy_regd WW
    Register NXP 802.11 Adapter wfd0
    wlan: version = SDIW612---18.99.2.p66.17-MM6X18437.p3-GPL-(FP92) 
    wlan: Register to Bus Driver Done
    wlan: Driver loaded successfully
    

    As indicated by the line Request firmware: nxp/rgpower_WW.bin the world wide rgpower file is loaded.

  3. Execute the following command to check if the Wi-Fi interfaces have been created.

    ip addr list
    

    The output should look something like this:

    [...]
    4: mlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
        link/ether 34:32:e6:34:41:30 brd ff:ff:ff:ff:ff:ff
    5: uap0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
        link/ether 36:32:e6:34:42:30 brd ff:ff:ff:ff:ff:ff
    6: wfd0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
        link/ether 36:32:e6:34:41:30 brd ff:ff:ff:ff:ff:ff
    

    The mlan0 (station), uap0 (access point) and wfd0 (Wi-Fi Direct) interfaces are now available.

Note

For further information please refer to the user manual UM11483 - Getting Started with NXP-based Wireless Modules on i.MX 8M Quad EVK Running Linux OS, which is available under the Documentation section on the IW612 product page.

Please note that you need an account for the NXP Homepage to be able to access this document.

Setting the Country Code๐Ÿ”—

By default the driver uses the rgpower_WW.bin regulatory file, which is valid for all regions the module is certified for.

For optimal performance in a certified region you have to set the country code accordingly.

The following requirements must be met:

  • You have placed the rgpower_WW.bin and rgpower_US.bin in /lib/firmware/nxp.

  • You have loaded the Wi-Fi driver modules as described in Bring Up.

To set the country code for a region (in this case the US) and enable the region-specific configuration execute the following steps.

  1. Set the country code to US.

    iw reg set US
    
  2. The following messages indicate that the according rgpower_US.bin file is downloaded by the driver.

    The output should look something like this:

    Trying download country_power_tble: nxp/rgpower_US.bin
    Request firmware: nxp/rgpower_US.bin
    call regulatory_set_wiphy_regd US
    

    The driver discloses the updated set of regulatory rules that is derived from the settings in rgpower_US.bin to the host.

  3. To check whether the download of rgpower_US.bin worked execute the command iw reg get.

    iw reg get
    

    The output should look something like this:

    [...]
    phy#0 (self-managed)
    country US: DFS-FCC
            (2402 - 2427 @ 20), (N/A, 19), (N/A)
            (2412 - 2462 @ 40), (N/A, 19), (N/A)
            (2447 - 2472 @ 20), (N/A, 19), (N/A)
            (5170 - 5250 @ 80), (N/A, 19), (N/A)
            (5250 - 5330 @ 80), (N/A, 19), (0 ms), DFS, PASSIVE-SCAN
            (5490 - 5730 @ 80), (N/A, 19), (0 ms), DFS, PASSIVE-SCAN
            (5735 - 5815 @ 80), (N/A, 19), (N/A)
            (5815 - 5835 @ 20), (N/A, 19), (N/A)
    

    The PAN9019A is listed second as a self-managed device with the correct country code set.

Connecting to an Access Point๐Ÿ”—

The following requirements must be met:

  • You have loaded the Wi-Fi kernel modules as described in section Bring Up.

When connecting the PAN9019A to an access point the module acts as a so-called Wi-Fi station. To connect the station to an access point with WPA2 security you have to execute the following steps.

  1. Create the file /etc/wpa_supplicant.conf using the nano editor with the following configuration. Adjust the ssid and psk settings to match your Wi-Fi network settings.

    nano /etc/wpa_supplicant.conf
    
    wpa_supplicant.conf
    ctrl_interface=/var/run/wpa_supplicant
    ctrl_interface_group=0
    update_config=1
    
    ap_scan=1
    network={
        ssid="Demo_AP"
        psk="123456789"
        key_mgmt=WPA-PSK
        proto=RSN
        pairwise=CCMP
        group=CCMP
    }
    
  2. Start the wpa_supplicant with the previously created configuration.

    wpa_supplicant -i mlan0 -Dnl80211 -c /etc/wpa_supplicant.conf -B
    
  3. To check the connection status execute the following command.

    wpa_cli status
    

    The output should look something like this:

    Selected interface 'mlan0'
    bssid=xx:xx:xx:xx:xx:xx
    freq=2437
    ssid=Demo_AP
    id=0
    mode=station
    pairwise_cipher=CCMP
    group_cipher=CCMP
    key_mgmt=WPA2-PSK
    wpa_state=COMPLETED
    p2p_device_address=34:32:e6:34:41:30
    address=34:32:e6:34:41:30
    uuid=3444e0ea-b920-5afb-94ec-7f32301f4771
    

    If the wpa_state is COMPLETED the connection to the network was successfully established.

  4. Start the DHCP client to automatically obtain an IP address.

    udhcpc -i mlan0
    

    The output should look something like this:

    udhcpc: started, v1.36.1
    udhcpc: broadcasting discover
    udhcpc: broadcasting select for 192.168.187.129, server 192.168.187.1
    udhcpc: lease of 192.168.187.129 obtained from 192.168.187.1, lease time 86400
    /etc/udhcpc.d/50default: Adding DNS 192.168.187.1  
    

Note

For further information please refer to the user manual UM11490 - Feature Configuration Guide for NXP-based Wireless Modules on i.MX 8M Quad EVK, which is available under the Documentation section on the IW612 product page.

Please note that you need an account for the NXP Homepage to be able to access this document.

Starting an Access Point๐Ÿ”—

The following requirements must be met:

  • You have loaded the Wi-Fi kernel modules as described in section Bring Up.

To configure and start an access point with WPA2 in the 2.4 GHz band you have to execute the following steps.

  1. Create the file /etc/hostapd.conf with the nano editor and add the following content.

    nano /etc/hostapd.conf
    
    hostapd.conf
    interface=uap0
    hw_mode=g
    channel=6
    ssid=Demo_uAP
    ieee80211n=1
    auth_algs=1
    wpa=2
    wpa_key_mgmt=WPA-PSK
    rsn_pairwise=CCMP
    wpa_passphrase=123456789
    
  2. Create the file /etc/udhcpd.conf with the nano editor and add the following content.

    nano /etc/udhcpd.conf
    
    udhcpd.conf
    start 192.168.1.10
    end 192.168.1.10
    interface uap0
    
  3. Make sure the file for tracking DHCP leases exists.

    touch /var/lib/misc/udhcpd.leases
    
  4. Bring up the uap0 interface.

    ip link set dev uap0 up
    
  5. Assign an IP address and netmask to the uap0 interface.

    ip addr add 192.168.1.1/24 dev uap0
    
  6. Start the DHCP server with the previously created configuration.

    udhcpd /etc/udhcpd.conf
    
  7. Start hostapd with the previously created configuration.

    hostapd /etc/hostapd.conf -B
    

    The output should look something like this:

    rfkill: Cannot open RFKILL control device
    Using interface uap0 with hwaddr 34:32:e6:34:41:30 and ssid "Demo_uAP"
    uap0: interface state UNINITIALIZED->ENABLED
    uap0: AP-ENABLED
    

    As indicated by the messages the access point has been initialized and is up and running.

Note

For further information please refer to the user manual UM11490 - Feature Configuration Guide for NXP-based Wireless Modules on i.MX 8M Quad EVK, which is available under the Documentation section on the IW612 product page.

Please note that you need an account for the NXP Homepage to be able to access this document.

Bluetooth Operation๐Ÿ”—

Bring Up๐Ÿ”—

After you have loaded the Wi-Fi driver modules, the Bluetooth subsystem requires the btnxpuart driver to be loaded manually into the kernel prior to operation as well.

For further information on this topic refer to Bluetooth Driver in the Software Guide.

The following requirements must be met:

  • You have loaded the Wi-Fi kernel modules as described in section Bring Up.

To bring up the Bluetooth interface you have to execute the following steps.

  1. Load the btnxpuart module by executing the following command.

    modprobe btnxpuart
    
  2. Bring up the hci0 interface.

    hciconfig hci0 up
    
  3. To check the status of the hci0 interface execute the following command.

    hciconfig
    

    The output should look something like this:

    hci0:   Type: Primary  Bus: UART
          BD Address: 34:32:e6:34:41:31  ACL MTU: 1016:5  SCO MTU: 60:12
          UP RUNNING 
          RX bytes:1456 acl:0 sco:0 events:86 errors:0
          TX bytes:1238 acl:0 sco:0 commands:86 errors:0
    

    The hci0 device is ready for operation.

Note

For further information please refer to the user manual UM11490 - Feature Configuration Guide for NXP-based Wireless Modules on i.MX 8M Quad EVK, which is available under the Documentation section on the IW612 product page.

Please note that you need an account for the NXP Homepage to be able to access this document.

Running a Scan๐Ÿ”—

The following requirements must be met:

  • You have brought up the hci0 interface as described in Bring Up.

To run a Bluetooth scan for Low Energy devices execute the following steps.

  1. Start the interactive bluetoothctl tool by executing the following command.

    bluetoothctl
    

    The output should look something like this:

    Agent registered
    [CHG] Controller 34:32:e6:34:41:31 Pairable: yes
    

  2. Start the Bluetooth scan by entering the following command.

    [bluetooth]# scan on
    
  3. The tool outputs any discovered devices.

    Discovery started
    [CHG] Controller 34:32:e6:34:41:31 Discovering: yes
    [NEW] Device 00:13:43:C0:FF:EE test_device
    
  4. To stop the scan enter the following command.

    [bluetooth]# scan off
    
  5. You can list all discovered and previously connected devices enter the following command.

    [bluetooth]# devices
    Device 00:13:43:C0:FF:EE test_device
    

Note

For further information please refer to the user manual UM11490 - Feature Configuration Guide for NXP-based Wireless Modules on i.MX 8M Quad EVK, which is available under the Documentation section on the IW612 product page.

Please note that you need an account for the NXP Homepage to be able to access this document.

Connecting to a Device๐Ÿ”—

The following requirements must be met:

  • You have run a Bluetooth Low Energy scan as described in Running a Scan.

To pair and connect to a Low Energy device execute the following steps.

  1. Register an agent by entering the following command.

    [bluetooth]# agent on
    Agent registered
    [CHG] Controller 34:32:e6:34:41:31 Pairable: yes
    
  2. Choose the default-agent by entering the following command.

    [bluetooth]# default-agent
    Default agent request successful
    

    The agent is responsible for handling the pairing procedure.

  3. Start the pairing procedure.

    [bluetooth]# pair 00:13:43:C0:FF:EE
    Attempting to pair with 00:13:43:C0:FF:EE
    [CHG] Device 00:13:43:C0:FF:EE Connected: yes
    
  4. Type yes to confirm the passkey if the the agent prompts you to do so.

    Request confirmation
    [agent] Confirm passkey 123456 (yes/no): yes
    

    The pairing is completed once you have confirmed the pairing request on the other device as well.

  5. Add the device to the trusted devices.

    [bluetooth]# trust 00:13:43:C0:FF:EE
    Changing 00:13:43:C0:FF:EE trust succeeded
    

    Trusting the device speeds up future connection attempts.

  6. Connect to the device with the following command.

    [bluetooth]# connect 00:13:43:C0:FF:EE
    
  7. You can disconnect from the device by entering the following command.

    [test_device]# disconnect 00:13:43:C0:FF:EE
    
  8. You can remove the device from the list of paired devices enter the following command.

    [bluetooth]# remove 00:13:43:C0:FF:EE
    
  9. To exit bluetoothctl enter the following command.

    [bluetooth]# quit
    

Pairing Procedure

Depending on the configuration and capabilities of the Bluetooth Low Energy device that you are using to connect to, the pairing procedure may differ from the one described above.

Note

For further information please refer to the user manual UM11490 - Feature Configuration Guide for NXP-based Wireless Modules on i.MX 8M Quad EVK, which is available under the Documentation section on the IW612 product page.

Please note that you need an account for the NXP Homepage to be able to access this document.