nerves_network icon indicating copy to clipboard operation
nerves_network copied to clipboard

Show debug information regarding the connection state of WpaSupplicant

Open chmanie opened this issue 6 years ago • 0 comments

This resulted from a conversation in the nerves slack channel. As far as I understand one would like to register for the events the WpaSupplicant emits and handle them accordingly.

connor-rigby:
{:ok, _} = Elixir.Registry.register(Nerves.WpaSupplicant, interface, [])
  def handle_info({Nerves.WpaSupplicant, {:INFO, "WPA: 4-Way Handshake failed - pre-shared key may be incorrect"}, _})
  def handle_info({Nerves.WpaSupplicant, :"CTRL-EVENT-NETWORK-NOT-FOUND", _}, state)
  def handle_info({Nerves.WpaSupplicant, :"CTRL-EVENT-NETWORK-NOT-FOUND"}, state)

Something like

:ok = Nerves.Network.setup(interface, settings)
Nerves.Network.subscribte(interface)

chmanie avatar Apr 27 '18 08:04 chmanie