|
Veethree D7 SDK
|
Official Linux Bluetooth protocol stack- BlueZ supports Bluetooth communication on the D7. BlueZ includes tools like bluetoothctl, btmgmt, hciconfig, btmon, sdptool, rfcomm, obexctl, etc.
Note: This document provides basic usage commands. Although Arch Linux is not used on the D7, ArchWiki Bluetooth provides more details on BlueZ usage and troubleshooting.
To get started with using Bluetooth on the D7, run the following commands on the shell.
To check if BlueZ daemon (bluetoothd) is running:
If Bluetooth daemon is not running, start service:
To get Bluetooth adapter status and configuration information:
If the device status is DOWN, Bluetooth adapter is powered off, to power on:
Or using bluetoothctl:
If powered on, the command hciconfig should show UP RUNNING and BD Address should not be empty.
To get more information like device name, profile UUIDs, public MAC etc:
bluetoothctl interactive command line tool is used to scan and pair Bluetooth devices. To pair with a remote device, start the interactive tool:
Before pairing, register an agent to handle PIN codes, passkey confirmations, or authorization prompts when pairing:
To initiate a pairing request to another device, the remote device's public MAC address should be on D7's scan/cache list. To scan for devices:
To get a list of devices scanned:
From this list, select the remote device MAC address you want to pair with as:
If the device requires authorization, registered agent will handle it.
To stop scanning:
To allow a remote device to initiate pairing, register the agent and make the D7 discoverable:
To remove a paired device:
Note: QML Bluetooth application included in ~/d7-sdk/examples/gui/qml-bluetooth/ provides an equivalent GUI app to enable bluetooth, scan/pair and make device discoverable.