Bt v0.2.8 Bt.Bluetoothctl

GenServer wrapper around bluetoothctl

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Connects a device

Check if any device is connected

Check if device is connected

Disconnects a device

Callback implementation for GenServer.init/1.

Power off an adapter

Power on an adapter

Check if adapter is powered

Select an adapter

Link to this section Functions

Link to this function

adapters_data()

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

connect(device)

connect(String.t()) :: term()

Connects a device

Link to this function

connected?()

connected?() :: bool()

Check if any device is connected

Link to this function

connected?(device)

connected?(String.t()) :: bool()

Check if device is connected

Link to this function

disconnect(device)

disconnect(String.t()) :: term()

Disconnects a device

Link to this function

handle_info_line(data, arg2, from, arg4)

handle_info_line(String.t(), String.t(), GenServer.from(), String.t()) ::
  :ok | map() | list() | nil
Link to this function

init(adapter)

init(String.t() | nil) :: {:ok, map()}

Callback implementation for GenServer.init/1.

Power off an adapter

Power on an adapter

Link to this function

parse_devices(data, from)

parse_devices(String.t(), GenServer.from()) :: :ok
Link to this function

powered?()

powered?() :: bool()

Check if adapter is powered

Link to this function

select(adapter)

Select an adapter

Link to this function

start_link(adapter \\ nil)

start_link(String.t() | nil) :: term()