🔵Bluetooth
Launch bluetoothctl: Type
bluetoothctland press Enter. This will open the Bluetooth control prompt, indicated by[bluetooth]#.Turn on Bluetooth: To ensure Bluetooth is powered on, type:
power onMake the Device Discoverable: If you want to make your Raspberry Pi discoverable by other devices, type:
discoverable onScan for Devices: To start scanning for nearby Bluetooth devices, type:
scan onYou will see a list of available devices and their MAC addresses.
Pair a Device: Once you find the device you want to pair with (for example, your Bluetooth mouse), pair it using its MAC address:
pair [DEVICE MAC ADDRESS]Replace
[DEVICE MAC ADDRESS]with the actual address of the device.Connect to the Device: After pairing, you’ll need to connect to the device:
connect [DEVICE MAC ADDRESS]Trust the Device (Optional): To automatically connect to the device in the future, you might want to trust it:
trust [DEVICE MAC ADDRESS]Stop Scanning: Once you're done, you can turn off scanning:
scan offExit bluetoothctl: Type
exitto leave the bluetoothctl prompt.
Additional Commands:
Show Devices: To list all known devices, use:
devicesShow Paired Devices: To list paired devices, use:
paired-devicesRemove a Device: To remove/unpair a device, use:
remove [DEVICE MAC ADDRESS]Show Info: For information about a specific device, use:
info [DEVICE MAC ADDRESS]
This should cover most of the basic usage scenarios for bluetoothctl. Remember, for specific devices (like some headphones or speakers), additional steps might be required for full functionality.
Last updated