View Source BlueHeron.Peripheral (blue_heron v0.5.0)
Handles management of advertising and GATT server
Summary
Functions
Register a new service in the GATT.
Returns a specification to start this module under a supervisor.
Delete a service by it's ID.
Exchange MTU with a connected central.
Send a notification to a connected central.
Functions
@spec add_service(BlueHeron.GATT.Service.t()) :: :ok
Register a new service in the GATT.
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec delete_service(BlueHeron.GATT.Service.id()) :: :ok
Delete a service by it's ID.
@spec exchange_mtu(non_neg_integer()) :: :ok | {:error, term()}
Exchange MTU with a connected central.
@spec notify( BlueHeron.GATT.Service.id(), BlueHeron.GATT.Characteristic.id(), binary() ) :: :ok | {:error, term()}
Send a notification to a connected central.