Some wireless variants of the ConnectCore 6 system-on-module assemble the Atheros AR6233 chip, which is Bluetooth-capable. These modules are built with coexistence in mind and handle the Bluetooth coexistence internally.

The Bluetooth interface is connected to the i.MX6 via the UART2 port and GPIOs for some pins specific to the Atheros AR6233.

Features

The Atheros AR6233 chip supports the following Bluetooth features:

  • Classic Bluetooth:

    • GAP: Generic Access Profile; discovery and pairing

    • HDP: Health Device Profile

    • SPP: Serial Port Profile

    • PAN: Personal Area Networking

    • HSP: Headset

    • HFP: Hands-Free Profile, specifically for cars

    • FTP (OBEX): File Transfer Profile

    • OPP (OBEX): Object Push Profile

    • HID: Human Interface Device (mouse, keyboard, joystick)

    • A2DP: Advanced Audio Distribution Profile

    • AVRCP: Audio/Video Remote Control Profile

    • Bluetooth Low Energy (BLE)

    • GAP: Generic Access Profile

  • The following profiles have been validated in Digi Embedded Yocto:

    • Classic Bluetooth:

    • GAP: Generic Access Profile; discovery and pairing

    • HDP: Health Device Profile

    • Bluetooth Low Energy (BLE)

    • GAP: Generic Access Profile

The following profiles have been validated in Digi Embedded Yocto:

  • Classic Bluetooth:

    • GAP: Generic Access Profile; discovery and pairing

    • HDP: Health Device Profile

  • Bluetooth Low Energy (BLE)

    • GAP: Generic Access Profile

Kernel configuration

You can manage the Bluetooth driver support through the kernel configuration option:

  • Atheros AR300x serial support (CONFIG_BT_HCIUART_ATH3K)

This option is enabled as built-in on the default ConnectCore 6 SBC kernel configuration file.

Kernel driver

The Atheros AR300x Bluetooth driver is located at:

File Description

drivers/bluetooth/hci_ath.c

Atheros AR300x serial support

Device tree bindings and customization

Although there are no generic device tree bindings for the Bluetooth driver itself, there is a bluetooth node on the ConnectCore 6 device tree file that contains the following properties:

  • digi,pwrdown-gpios: a GPIO connected to the PWD_L pin of the Atheros AR6233 chip. When driven low, it turns off all the core voltages of the Bluetooth block and all state information is lost.

  • digi,disable-gpios: a GPIO connected to the BT_DISABLE pin of the Atheros AR6233 chip. When active, it disables the Bluetooth block (the radio and the UART interface) and places it into sleep state.

This node is also used as a placeholder for containing Digi’s MAC address for the Bluetooth chip.

ConnectCore 6 SoC variant specific device tree

i.MX6 device tree
bluetooth {
	digi,pwrdown-gpios = <&gpio_extender 4 0>;
	digi,disable-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
	/* U-Boot will fill in the MAC address here */
};

MAC address

The MAC address of the ConnectCore 6 Bluetooth interface is stored in the ConnectCore 6 eMMC as part of the U-Boot bootloader environment (variable btaddr).

Before launching the operating system, U-Boot writes the MAC address into the device tree bluetooth node as property local-mac-address.

Bluetooth SIG certification

Digi has qualified the Digi Embedded Yocto software as Host Subsystem on the Bluetooth SIG and the ConnectCore 6 hardware platform as Controller Subsystem. This qualification was done using BlueZ version 5.41. By default, Digi Embedded Yocto-4.0 builds a more recent version of the BlueZ stack. To benefit from Digi’s Bluetooth SIG Qualified Subsystem, your Digi Embedded Yocto project must specifically build BlueZ version 5.41. This modular qualification strategy enables end products to inherit a portion of Digi’s certifications, potentially reducing validation time.

Digi also recommends you include bluez5-testtools, which is not included by default. To do so, add the following lines to your project’s conf/local.conf:

conf/local.conf
PREFERRED_VERSION_bluez5 = "5.41"
IMAGE_INSTALL:append = " bluez5-testtools"
Note the required white space when appending a value to an array variable using the :append override syntax.

Known issues and limitations

  • Using Bluetooth in parallel with wireless (coexistence mode) can affect your Bluetooth performance.

  • The driver only supports up to 10 simultaneous BLE connections.

Disable Bluetooth

Bluetooth is enabled by default on the ConnectCore 6 variants that support it. To disable the Bluetooth interface, add the following lines to your platform device tree:

/* Disable Bluetooth */
&bluetooth {
	status = "disabled";
};

&uart2 {
	/* Drive BT_PWD# low to disable Bluetooth */
	pinctrl-assert-gpios = <&gpio_extender 4 GPIO_ACTIVE_LOW>;
};

This patch:

  • disables the bluetooth node of the device tree. The status of this node triggers the initialization scripts that bring up the Bluetooth interface, so these won’t start when the node is disabled.

  • makes use of the UART node (the UART connected to the Bluetooth chip), to drive the BT_PWD# line low, thus disabling the Bluetooth chip.

With Bluetooth disabled, you may use that UART for other purposes, or its lines as GPIOs (this requires disabling the UART and redefining the IOMUX of the pads).