Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common:configurations:bluetooth

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:common:configurations:bluetooth [2022/07/06 00:02]
nick
products:sbc:common:configurations:bluetooth [2026/02/02 22:31] (current)
gray update by using AI
Line 1: Line 1:
 ====== Bluetooth ====== ====== Bluetooth ======
 +
 +/*
 +===== Introduction =====
 +
 +This document mainly introduces Bluetooth from two parts. The first one is about how to use Bluetooth under Ubuntu, and the second one is how to use Bluetooth under Android.
 +
 +*/
 +
 +====== Linux ======
 +
 +Bluetooth configuration examples for Ubuntu Desktop and Server variants.
 +
 +===== Ubuntu Desktop ======
 +
 +Bluetooth settings are located in the system menu at the upper-right corner. Click the menu and select ''Devices...''.
 +
 +{{/products:sbc:common:configurations:gnome-bluetooth1.png?500|gnome-bluetooth1}}
 +
 +Click ''Search'' to scan for nearby Bluetooth devices.
 +
 +{{/products:sbc:common:configurations:gnome-bluetooth2.png?500|gnome-bluetooth2}}
 +
 +Select the device you want to pair with from the list.
 +
 +{{/products:sbc:common:configurations:gnome-bluetooth3.png?500|gnome-bluetooth3}}
 +
 +===== Ubuntu Server ======
 +
 +Bluetooth can be configured via command-line utilities.
 +
 +Enable Bluetooth Service
 +
 +Enable and start the Bluetooth service, then bring up the interface:
 +
 +===== Ubuntu Server =====
 +
 +Bluetooth configuration via console bluetooth utils. 
 +
 +  * Enable Bluetooth:
 +
 +```shell
 +sudo rfkill unblock bluetooth
 +sudo hciconfig hci0 up
 +```
 +
 +  * Launch the Bluetooth control tool:
 +
 +```shell
 +$ sudo bluetoothctl
 +```
 +
 +You will see a prompt similar to:
 +```shell
 +[NEW] Controller 43:54:A2:00:1F:AC Khadas [default]
 +Agent registered
 +[bluetooth]#
 +```
 +
 +Within ''bluetoothctl'', run the following setup commands:
 +
 +```shell
 +[bluetooth]# agent on
 +[bluetooth]# default-agent
 +[bluetooth]# power on
 +[bluetooth]# discoverable on
 +[bluetooth]# pairable on
 +[bluetooth]# scan on
 +```
 +
 +  * Scan for Devices:
 +
 +```shell
 +[bluetooth]# scan on
 +```
 +Example output:
 +```shell
 +Discovery started
 +[CHG] Controller 43:54:A2:00:1F:AC Discovering: yes
 +[NEW] Device 46:04:25:5F:1E:8D 46-04-25-5F-1E-8D
 +[NEW] Device 8C:EB:C6:E7:2E:33 Khadas
 +```
 +  * List Discovered Devices
 +Show all discovered devices:
 +
 +```shell
 +[bluetooth]# devices
 +```
 +
 +Example output:
 +```shell
 +Device 46:04:25:5F:1E:8D 46-04-25-5F-1E-8D
 +Device 8C:EB:C6:E7:2E:33 Khadas
 +Device 9C:FB:D5:0D:91:47 9C-FB-D5-0D-91-47
 +```
 +
 +  * Pair and Connect
 +To pair and connect with a device, use its MAC address:
 +
 +```shell
 +[bluetooth]# connect <device_addr>
 +```
 +Replace <device_mac_address> with the actual address (e.g., 8C:EB:C6:E7:2E:33).
 +
 +<WRAP info >
 +The ''device_mac_address'' is the unique hardware address of the Bluetooth device you want to connect to, shown in the ''devices'' list.
 +</WRAP>
 +
 +  * Exit
 +To exit ''bluetoothctl'':
 +
 +```shell
 +[bluetooth]# quit
 +```
 +
 +====== Android ======
 +
 +Please goto System Settings.
  
Last modified: 2022/07/06 00:02 by nick