Rehan

Rehan

Checking to which network wlan is connected?

Hello,
I working on configuring wlan on BBB using vintagenet.
i’m able to configure the device to connect to multiple devices.
Now i want to know to which network is it connected.
Is it possible with vintagenet?
As VintageNet.get_configuration() only shows list of configured networks

VintageNet.get_configuration("wlan0")
%{
  ipv4: %{method: :dhcp},
  type: VintageNetWiFi,
  vintage_net_wifi: %{
    networks: [
      %{
        key_mgmt: :wpa_psk,
        mode: :infrastructure,
        psk: "F33EBA548E6C3A89C3D56D7EEB3B2A74DC28AA459C2557FF86A3C8683FAA190",
        ssid: "TEST1"
      },
      %{
        key_mgmt: :wpa_psk,
        mode: :infrastructure,
        psk: "002B299742748487FB35C21A46ACE6B80844D5512551657A6AA662043A6E5B49",
        ssid: "Hotspot1"
      }
    ]
  }
}

Marked As Solved

jjcarstens

jjcarstens

Nerves Core Team

VintageNetWiFi has a property (current_ap) which will have this information:

iex(2)> VintageNet.get(["interface", "wlan0", "wifi", "current_ap"])
%VintageNetWiFi.AccessPoint{
  bssid: "11:22:33:44:55:66",
  frequency: 2412,
  band: :wifi_2_4_ghz,
  channel: 1,
  signal_dbm: -41,
  signal_percent: 88,
  flags: [:wpa2_psk_sae_ccmp, :wpa2, :psk, :sae, :ccmp, :ess],
  ssid: "Some SSID"
}

Where Next?

Popular in Questions Top

albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
earth10
Hi, I’m just starting to build a side-project with Elixir and Phoenix and doing some basic test with Elixir alone. What strikes me is th...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> somethi...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New

Other popular topics Top

albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement