[][src]Crate rustable

rustable

rustable is yet another library for interfacing Bluez over DBus. Its objective is to be a comprehensive tool for creating Bluetooth Low Energy enabled applications in Rust on Linux. It will supports to interacting with remote devices as a GATT client, and creating local services as a GATT Server. It currently allows the creation of advertisements/broadcasts as a Bluetooth peripherial.

Supported Features

GAP Peripheral

  • Advertisements
  • Broadcasts

GATT Server

  • Creating local services
  • Reading local characteristics from remote devices.
  • Writing to local characteristics from remote devices.
  • Write-without-response via sockets from remote devices (AcquireWrite).
  • Notifying/Indicating local characteristics with sockets (AcquireNotify).
  • Reading local descriptors from remote devices.

To Do:

  • Writable descriptors.

GATT Client

  • Retreiving attribute metadata (Flags, UUIDs...).
  • Reading from remote characteristics.
  • Writing to remote characteristics.
  • Write-without-response via sockets to remote devices (AcquireWrite).
  • Receiving remote notification/indications with sockets.

To Do:

  • Descriptors as a client.

Development status

This library is unstable in alpha. There are planned functions in the API that have yet to be implemented. Unimplemented function are noted. The API is subject to breaking changes.

Modules

gatt

Module containing structures and traits for interacting with remote GATT services/characteristics/descriptors and creating local GATT services.

interfaces

A series of constant strings used to communicate with DBus and Bluez.

path

Structs

Advertisement

See the Advertising API for more details about what each field does.

Bluetooth

Bluetooth is created to interact with Bluez over DBus and file descriptors.

Pending

A struct representing pending Dbus Method-calls.

RemoteDevice

Enums

AdType
AddrType
Error
ResolveError

Returned by Bluetooth::try_resolve() to distinguish between Errors, and results that didn't finish.

Constants

MAX_APP_MTU
MAX_CHAR_LEN

Traits

Device
ToMAC
ToUUID

This trait creates a UUID from the implementing Type. This trait can panic if the given type doesn't represent a valid uuid. Only 128-bit uuids are supported at the moment.

Functions

devmac_to_mac
mac_to_devmac
validate_devmac
validate_uuid

Type Definitions

MAC
UUID