Expand description

Management

For managing the Bluetooth controllers on your device (pairing, discovery, broadcasting, etc.), you can use the management API. This is contained inside of the management module, where the central type is management::ManagementStream.

Communication

For communicating with other bluetooth devices, you have a couple of options. You can use L2CAP streams or RFCOMM streams, both of which are exposed through BluetoothStream.

This library also contains an implementation of Service Discovery Protocol (SDP) which operates over L2CAP and is availabile in the communication::discovery module.

Permissions

Commands that just query information, such as get_controller_info, will usually work. However, commands that try to change any settings, such as set_powered will fail with ‘permission denied’ errors if your process does not have the CAP_NET_ADMIN capability.

Modules

Utilities and structures used in communicating with other Bluetooth devices. This includes using L2CAP/RFCOMM directly via stream::BluetoothStream, or performing service discovery using discovery::ServiceDiscoveryClient.

Structs

Enums