sdptool
Browse Bluetooth SDP services
SYNOPSIS
sdptool [options] [command] [arguments]
PARAMETERS
browse
Browse all services offered by the Bluetooth device at the given address.
search
Search for a specific service (identified by its UUID) on a device (or all devices if no address is given).
records
Display all SDP records for the specified device. Similar to browse but shows the raw records.
add
Add a local SDP record from the specified file. Useful for advertising services from your local Bluetooth adapter.
del
Delete a local SDP record identified by its handle.
create
Create a new local SDP record. profile refers to the name of the profile
info
Get information about the bluetooth address. Returns device name, address, link key, and supported features.
-i
Specify the HCI device (Bluetooth adapter) to use. Defaults to hci0 if not specified.
-d
Increase debugging output.
-h
Show help message and exit.
DESCRIPTION
The sdptool command is a utility for interacting with Bluetooth devices via the Service Discovery Protocol (SDP). It allows you to browse the services offered by a remote Bluetooth device, search for specific services based on UUIDs, and perform other Bluetooth-related tasks.
Primarily, sdptool is used to query Bluetooth devices for information about the services they provide. Each service is associated with a Universally Unique Identifier (UUID). You can use sdptool to discover the UUIDs and associated information provided by Bluetooth devices, assisting in configuring and troubleshooting Bluetooth connections. Common use cases involve checking service availability, identifying supported profiles (like audio streaming, hands-free, etc.), and obtaining connection parameters. While sdptool is powerful, it's often used in conjunction with other Bluetooth tools for a more comprehensive Bluetooth management workflow.
CAVEATS
sdptool requires root privileges for some operations, particularly adding or deleting SDP records. Ensure the Bluetooth device is discoverable for it to be found by sdptool. Some Bluetooth devices may not fully implement SDP, leading to incomplete or inaccurate results.
UUIDS
UUIDs (Universally Unique Identifiers) are used to identify Bluetooth services. Standard services have well-known UUIDs. sdptool relies on accurate UUIDs to find the services you are searching for. Incorrect UUIDs will lead to no results.
HISTORY
sdptool has been a part of the BlueZ Bluetooth stack for Linux since its early versions. It's development has been closely tied to the evolution of Bluetooth standards and the BlueZ project itself. Initially, it provided basic service discovery capabilities, and it has been extended to support more features, such as SDP record management. Its usage has decreased as higher-level Bluetooth management tools, like bluetoothctl, have become more prevalent, but sdptool remains a useful command-line tool for specific SDP-related tasks.
SEE ALSO
bluetoothctl(1), hciconfig(8), hcitool(1)