|
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.
Check if BlueZ daemon (bluetoothd) is running:
Get Bluetooth adapter status and configuration information:
Power on Bluetooth: If powered on, the command hciconfig should show UP RUNNING and BD Address should not be empty. If the device status is DOWN, Bluetooth adapter is powered off, to power on:
Or using bluetoothctl:
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 using bluetoothctl
To initiate a pairing request:
Start the interactive tool and register an agent to handle PIN codes, passkey confirmations, or authorization prompts when pairing:
Scan for devices:
Scanning is required to initiate a pairing request to another device. To pair a remote device, its public MAC address should be on D7's scan/cache list
List scanned devices
Verify your remote device's MAC address is present in the list
Initiate pairing with your remote device using its MAC
If the device requires authorization or PIN requests, registered agent will handle it and show required prompts. If the authentication is successful, devices will be paired.
To accept a pairing request from a remote device,
Start the interactive command line tool and register the agent
Make the device device discoverable
When a remote device initiates pairing, the registered agent will show authentication prompts as required. If the authentication is successful, devices will be paired.
List all available devices
Add a filter to list paired devices
Get information from a paired device
Unpair
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.