The Linux kernel will automatically load the Wi-Fi and Bluetooth drivers when they are using the PCIe, SDIO or USB interfaces. These are client drivers and the corresponding bus driver on the host will enumerate the interface and load the proper client driver. Bluetooth will also load automatically on a UART interface if serdev is used and the interface is properly configured in the device tree.

The Bluetooth interface on the Sona IF573 and Sterling LWBx requires support from a user mode application if serdev is not used. The UART must be attached to the Bluetooth stack HCI interface with the correct parameters to communicate with the radio and allow the Bluetooth firmware to be downloaded.

Ezurio recommends the BlueZ Bluetooth stack which includes the user mode helper applications needed for initialization. The ‘btattach’ command can be used to start the Bluetooth serial interface. The correct port must be identified and used in the command, as well as the ‘bcm’ protocol as shown in the following example:

/usr/bin/btattach -B /dev/ttyS1 -P bcm &

Note: The Sterling LWB5+ DVKs expose the Bluetooth serial uart over USB via an FTDI USB/UART bridge chip. The host platform must include the ftdi_sio driver if this interface is used. The corresponding port in this case will typically be /dev/ttyUSB0.

Note: There is much documentation online referencing the legacy hciattach and hciconfig utilities that were used with the legacy BlueZ stack (version 4). These utilities are not compatible with the Bluetooth core in modern kernels and can not be used with Ezurio software. The BlueZ5 stack must be used, along with the btattach and bluetoothctl utilities that it provides.

Note: The secure firmware download mechanism in the Sona IF573 is not compatible with the btattach utility. Designs using the Sona IF573 that require Bluetooth should use serdev to manage the Bluetooth UART interface. It is possible to use the brcm_patchram_plus utility available from Ezurio together with a platform specific script if serdev can not be used. This should be limited to platforms using kernels prior to v4.12. Contact Ezurio for details if this is needed.

Platform integration can be validated by checking to see if the Wi-Fi and Bluetooth interfaces are available. Low level Wi-Fi interface management is best done using the ‘iw’ tool. All wireless devices known to the platform can be shown with the ‘iw dev’ command. If the wireless device appears in the list then it has been properly integrated:

# iw dev
phy#0
    Unnamed/non-netdev interface
        wdev 0x2
        addr b2:fb:15:81:7f:d2
        type P2P-device
        txpower 31.00 dBm
    Interface wlan0
        ifindex 5
        wdev 0x1
        addr b0:fb:15:81:7f:d2
        type managed
        channel 1 (2412 MHz), width: 20 MHz, center1: 2412 MHz
        txpower 31.00 dBm

Low level Bluetooth interface management can be done using the ‘bluetoothctl’ command. All Bluetooth devices known to the platform can be listed with the ‘bluetoothctl list’ command. If the Bluetooth device appears in the list then it has been properly integrated:

# bluetoothctl list
Controller B0:FB:15:81:7F:D3 summit [default]