# Getting started

Source: [https://docs.qualcomm.com/doc/80-70017-13/topic/get-started.html](https://docs.qualcomm.com/doc/80-70017-13/topic/get-started.html)

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 Bluetooth functions.

Qualcomm Linux supports the following sample applications for the BlueZ stack:

- bluetoothctl
- obexctl
- ofono
- evtool

The following workflow shows how to get started with verifying the Bluetooth
                functionality using a sample application.

![](data:image/png;base64,UklGRroLAABXRUJQVlA4TK0LAAAvQ0QtAB/kKJJt1enPGFgxCoj4yIgM3jOTDTeSbKvKfHeJPy4Zm2c5ZE7m/vw7jmRbVc6Xe/7HHbIgGCIlB9bkoFt3zoV35z+A/z5AIA9RivzKS4a3vbk+AwxIDzxKop/b++/6Sa7v5PpOqlsGBBoCZgCBDGkzAch+AhC4PQCxBxDMnieIPYBAWwACgdgSCDR2wJe3MG8VyksFNARASx7g8PD+U3ImmDEA2m5kg4NAVgAcAg+iIBN4EPqZKMiEYYj8zOnR8HVHv/4rK57y+qluXzpdSbV2fF4dHhcP8fEQH4fHxUN8PL7mJZPnP9w/JqLjqg5+0cZHh4/9ard9eVrL01qe1oLbQhLnIjfSqmaq1RwINAP0jhciP/N1X5YAWgEQtM3mD/N+JU9reVrL01qe1tptX57W8rS2WC/Bw7ZdalvZ2pYhNzPFvaKVuANTi6JmmOi2lOVVi5t5MaOaA0uL1/rnqjHuUZbKVdZsqIj+u0JotW5OYRAp40Zt14dm//S5kC35T/Kf5D/Jf5L/JP9J/vNFae59JiLb/QNzX0wCcO/APBCTANw2MA9GxP9P3eo5z3zXxGO7PjDXI+L/7z4zMB99Jx4B+P6DA/PjiATgB/f7jhmhmMEx8eCHg2PiwY+S/yT/Sf6T/Cf5T/Kf5D/Jf5L/JP/5Qj4LofLO0xWpv3JhltuzxgeY/ADx0s6sEV6ZXDi76gWi/cYtaIenwp3uIVs5mAFiMbkYNq/2dR1KgPdHLLRqui4mscMsqATHlisVdahBAzH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ete the workflow is as follows:

1. Set up your infrastructure as described in the *[Qualcomm Linux Build Guide](https://docs.qualcomm.com/bundle/publicresource/topics/80-70017-254)* and
                            *[Qualcomm Linux Yocto Guide](https://docs.qualcomm.com/bundle/publicresource/topics/80-70017-27)*.
                    The *[Qualcomm Linux Build Guide](https://docs.qualcomm.com/bundle/publicresource/topics/80-70017-254)*
                    also provides information about the common build workflows.
2. Run the sample application and verify the Bluetooth functionality as described
                    in [Verify functionality of BlueZ stack](https://docs.qualcomm.com/doc/80-70017-13/topic/verify-bluetooth-functionality-of-bluez-stack.html).
3. If any issues occur, log and debug them as described in [Debug](https://docs.qualcomm.com/doc/80-70017-13/topic/bt_debugging.html).

## 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.

Note: A manually set Bluetooth MAC
                address does not persist across device reboots.

**Prerequisites**

- Enable SSH to access your host device. For instructions, see [Log in using SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70017-254/how_to.html#use-ssh).
- [Switch off Bluetooth on the device.](https://docs.qualcomm.com/doc/80-70017-13/topic/bluez-perform-bluetooth-gap-functions.html#bluez-perform-bluetooth-gap-functions__section_s3x_z1s_lcc_navyanka_08-21-24-1205-42-982)

**Procedure**

1. Run the SSH in command prompt using the following command: 

        ssh root@<device_IP_address>Copy to clipboard

    **Example**

If the IP address of the device is `10.92.160.222`, run
                            the following command:

        ssh root@10.92.160.222Copy to clipboard
2. Connect to the SSH by entering the following password: 

        oelinux123Copy to clipboard
3. Open the Bluetooth management tool and set the Bluetooth address by running the
                    following command:

        btmgmt public-addr <bt_address>Copy to clipboard

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:1ECopy to clipboard

    **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:0Copy to clipboard

## Source code location

The following table lists the source code location of Bluetooth components such as
                the stack, sample test applications, and drivers.

| Component | Source code location |
| --- | --- |
| bluetoothctl | [https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/tools](https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/tools) |
| obexctl | [https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/tools](https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/tools) |
| ofono | [https://git.kernel.org/pub/scm/network/ofono/ofono.git](https://git.kernel.org/pub/scm/network/ofono/ofono.git) |
| BlueZ stack | <ul class="ul" id="get-started__ul_sh3_4zf_ncc_navyanka_08-26-24-2355-37-544"><br>                                    <li class="li"><br>                                        <p class="p">The git repository for BlueZ is at: <a href="https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/" target="_blank" class="xref cursorpointer" onclick="Window.BookmapComponent.navigateExternalFile('https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/')">https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/</a></p><br><br>                                    </li><br><br>                                    <li class="li">You can download the stack at: <a href="https://mirrors.edge.kernel.org/pub/linux/bluetooth/bluez-5.65.tar.gz" target="_blank" class="xref cursorpointer" onclick="Window.BookmapComponent.navigateExternalFile('https://mirrors.edge.kernel.org/pub/linux/bluetooth/bluez-5.65.tar.gz')">https://mirrors.edge.kernel.org/pub/linux/bluetooth/bluez-5.65.tar.gz</a></li><br><br>                                    <li class="li">The git repository for the Bluetooth kernel subsystem is at:<ul class="ul" id="get-started__ul_zpf_rzf_ncc_navyanka_08-26-24-2356-28-459"><br>                                            <li class="li"><a href="https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git/tree/" target="_blank" class="xref cursorpointer" onclick="Window.BookmapComponent.navigateExternalFile('https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git/tree/')">https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git/tree/</a></li><br><br>                                            <li class="li"><a href="https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/tree/" target="_blank" class="xref cursorpointer" onclick="Window.BookmapComponent.navigateExternalFile('https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/tree/')">https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/tree/</a></li><br><br>                                        </ul><br></li><br><br>                                </ul> |
| Bluetooth driver | You can download the Bluetooth driver from the following<br>                                    locations:<br><ul class="ul" id="get-started__ul_hkl_thq_mcc_navyanka_08-24-24-2009-41-311"><br>                                    <li class="li"><a href="https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/tree/drivers/bluetooth/hci_qca.c" target="_blank" class="xref cursorpointer" onclick="Window.BookmapComponent.navigateExternalFile('https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/tree/drivers/bluetooth/hci_qca.c')">https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/tree/drivers/bluetooth/hci_qca.c</a></li><br><br>                                    <li class="li"><a href="https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/tree/drivers/bluetooth/btqca.c" target="_blank" class="xref cursorpointer" onclick="Window.BookmapComponent.navigateExternalFile('https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/tree/drivers/bluetooth/btqca.c')">https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/tree/drivers/bluetooth/btqca.c</a></li><br><br>                                </ul> |

Last Published: Dec 26, 2024

[Previous Topic
Overview](https://docs.qualcomm.com/bundle/publicresource/80-70017-13/topics/introduction.md) [Next Topic
Features](https://docs.qualcomm.com/bundle/publicresource/80-70017-13/topics/bt_ft_overview.md)