The Qualcomm Linux Bluetooth solution includes the BlueZ stack and sample test applications. These applications interact with the Bluetooth daemon of the BlueZ stack to run different Bluetooth functions. Use them to verify the functionality of the BlueZ stack.
Qualcomm Linux supports the following sample applications that demonstrate Bluetooth profile use cases and test procedures. Each application has profile-specific functions through menu-driven options.
| Sample application | Profile |
|---|
| bluetoothctl | GAP, GATT, A2DP |
| evtool | HOGP |
| obexctl | OPP, FTP, PBAP, MAP |
| ofono | HFP |
The following workflow shows how to get started with verifying the Bluetooth functionality using a sample application.
The sequence to complete the workflow is as follows:
-
Set up your infrastructure as described in the Build Qualcomm Linux using Yocto.
-
Set up the device and run the sample application of a profile.
-
Verify the functionality of a Bluetooth profile.
-
If any issues occur, log and debug them as described in Debug Bluetooth issues.
Set the Bluetooth MAC address
By default, the factory sets the Bluetooth MAC address in the one-time programmable memory. If you want to set the Bluetooth MAC address manually, complete the following procedure.
A manually set Bluetooth MAC address doesn’t persist across device reboots.
Prerequisites
Procedure
-
Run the SSH in command prompt using the following command:
ssh root@<device_IP_address>
Example
If the IP address of the device is 10.92.160.222, run the following command:
-
Connect to the SSH by entering the following password:
-
Open the Bluetooth management tool and set the Bluetooth address by running the following command:
btmgmt public-addr <bt_address>
For example, to set the Bluetooth address of the device as 22:22:9B:2C:79:1E, run the following command:
btmgmt public-addr 22:22:9B:2C:79:1E
Sample output
sh-5.1# btmgmt public-addr 22:22:9B:2C:79:1E
hci0 Set Public Address complete, options:
sh-5.1# hciconfig
hci0: Type: Primary Bus: UART
BD Address: 22:22:9B:2C:79:1E ACL MTU: 1024:7 SCO MTU: 240:8
DOWN
RX bytes: 7763 acl:0 sco:0 events:364 errors:0
TX bytes: 938685 acl:0 sco:0 commands:4004 errors:0
Source code location
The following table lists the source code location of Bluetooth components such as the stack, sample test applications, and drivers.
Next steps