     GenServer.call(ble, :controllers)
   end
 
-  defstruct [:driver, :monitor_ref, :controllers]
+  defstruct [:driver, :monitor_ref, controllers: %{}, devices: %{}]
 
   defmodule Controller do
     @moduledoc """

    Logger.info("Driver #{inspect state.driver} is down")
    {:stop, :driver_down, state}
  end

  defp reply(ret_value, state) do
    {:reply, ret_value, state}

      discoverable: false]
  end

  defmodule Device do
    @moduledoc """
    Data structure descibring a device and its (generic) state
    """
    @type t :: %__MODULE__{id: String.t, name: String.t, rssi: integer}
    defstruct [id: "", name: "", rssi: 0]
  end

  def init([driver]) do
    ref = Process.monitor(driver)
    Driver.attach(driver, self())
    {:ok, %__MODULE__{driver: driver, monitor_ref: ref}}
  end

  def handle_call(:controllers, _from, state = %__MODULE__{controllers: cs}) do
