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"
}

Last Post!

Rehan

Rehan

Thank you @jjcarstens

Where Next?

Popular in Questions Top

ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 55125 245
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
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

We're in Beta

About us Mission Statement