Skip to content

Commit

Permalink
Explicitly list how to get scanned wifi points in docs
Browse files Browse the repository at this point in the history
For someone unfamiliar with VintageNet it previously wasn't clear how to
get the scanned wifi access points
  • Loading branch information
axelson authored and fhunleth committed Feb 16, 2022
1 parent 2e35a20 commit 35fb6cc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/vintage_net.ex
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,12 @@ defmodule VintageNet do
Initiate an access point scan on a wireless interface
The scan results are posted asynchronously to the `["interface", ifname, "wifi", "access_points"]`
property as they come in. It appears that there's some variation in how scanning
is implemented on WiFi adapters. One strategy that seems to work is to call `scan/1` every
10 seconds or so while prompting a user to pick a WiFi network.
property as they come in. After waiting a second or two they can be fetched via
`VintageNet.get(["interface", ifname, "wifi", "access_points"])`.
It appears that there's some variation in how scanning is implemented on WiFi adapters. One
strategy that seems to work is to call `scan/1` every 10 seconds or so while prompting a user to
pick a WiFi network.
This is a utility function for calling the `:scan` ioctl.
"""
Expand Down

0 comments on commit 35fb6cc

Please sign in to comment.