KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
wpaclient
★ 10
Open GitHub ↗
Client library for wpa_supplicant
Download README (.md)
Explore Similar Repositories
samsung_encrypted_POC
:
A proof of concept to pair and send commands to H and J series Samsung TVs
signalrex
:
Signalr implementation for Elixir
email-crawler
:
Crawls emails from web pages
KalmanFilter
:
Implementation of EKF,UKF,EnKF,PF
dotfiles
:
A collection of my dotfiles
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
wpaclient
?
Download (.md)
# wpaclient [](https://travis-ci.org/brlbil/wpaclient) [](http://godoc.org/github.com/brlbil/wpaclient) [](https://goreportcard.com/report/github.com/brlbil/wpaclient) Package wpaclient provides a high level wap_supplicant client. ## Install ```bash go get github.com/brlbil/wpaclient ``` ## Usage ### Execute Client can execute commands, all of the available commands are exported. ```go // Initialize n new client client, err := New("wlan0") if err != nil { return err } // Close connection defer client.Close() // Execute a command, all commands are exported buf, err := client.Execute(CmdPing) fmt.Println(buf) $ PONG ``` ### Scan access-points Scan is a helper function for SCAN and SCAN_RESULTS commands. ```go aps, err := client.Scan() for _, ap := range aps { fmt.Printf("ssid: %s mac: %s freq: %d signal strength: %d\n", ap.SSID, ap.BSSID, ap.Frequency, ap.SignalStrength) } ``` ### List networks List is a helper function for LIST_NETWORKS command. ```go nets, err := client.Networks() for _, nt := range nets { fmt.Printf("id: %d, ssid: %s\n", nt.ID, nt.SSID) } ``` ### Get event notifications Client get event notification by opening a second socket connection. ```go // Get all events ch, err := client.Notify() // Just get connection and disconnection events. ch, err := client.Notify(WpaEventConnected, WpaEventDisconnected) ev := <- ch ``` ## Credits * [Birol Bilgin](https://github.com/brlbil) ## License The MIT License (MIT) - see [`LICENSE.md`](https://github.com/brlbil/wpaclient/blob/master/LICENSE.md) for more details