All Projects → mark2b → Wpa Connect

mark2b / Wpa Connect

Licence: mit
wpa-connect

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Wpa Connect

Solarthing
Monitors an Outback MATE and a Renogy Rover - MPPT Charge Controller. Integrates with Grafana, PVOutput and more!
Stars: ✭ 33 (-23.26%)
Mutual labels:  raspberry-pi
Pi Webcam
Automation to configure a Raspberry Pi as a USB OTG webcam
Stars: ✭ 990 (+2202.33%)
Mutual labels:  raspberry-pi
My Raspberry Pi Site
Middleman-based site for my RaspberryPi
Stars: ✭ 41 (-4.65%)
Mutual labels:  raspberry-pi
Iobroker.deconz
Connects to deConz software developed by dresden-elektronik. This software aims to be a universal ZigBee Gateway solution, using hardware from dresden-elektronik the ConBee USB stick and RaspBee a modul for the Raspberry Pi.
Stars: ✭ 33 (-23.26%)
Mutual labels:  raspberry-pi
Pendulum
ROS, ROS2, real-time, control, pendulum
Stars: ✭ 37 (-13.95%)
Mutual labels:  raspberry-pi
Mmm Rtspstream
MagicMirror² module for streaming an RTSP video stream from a security camera to your MagicMirror.
Stars: ✭ 40 (-6.98%)
Mutual labels:  raspberry-pi
Pi Builder
Extensible tool to build Arch Linux ARM for Raspberry Pi on x86_64 host using Docker
Stars: ✭ 31 (-27.91%)
Mutual labels:  raspberry-pi
Lsquaredc
A library for I2C communications for Linux devices (Beaglebone Black, Raspberry PI, and possibly others).
Stars: ✭ 42 (-2.33%)
Mutual labels:  raspberry-pi
Blinkt go examples
The beginning of Blinkt examples programs in Go
Stars: ✭ 37 (-13.95%)
Mutual labels:  raspberry-pi
Embedio
A tiny, cross-platform, module based web server for .NET
Stars: ✭ 1,007 (+2241.86%)
Mutual labels:  raspberry-pi
Pos system
Automated Point of Sale System using NFC
Stars: ✭ 34 (-20.93%)
Mutual labels:  raspberry-pi
Image Builder Rpi
SD card image for Raspberry Pi with Docker: HypriotOS
Stars: ✭ 973 (+2162.79%)
Mutual labels:  raspberry-pi
Smart Surveillance System Using Raspberry Pi
This is my Third Year Project for face recognition using OpenCV
Stars: ✭ 41 (-4.65%)
Mutual labels:  raspberry-pi
Openswiftui
WIP — OpenSwiftUI is an OpenSource implementation of Apple's SwiftUI DSL.
Stars: ✭ 967 (+2148.84%)
Mutual labels:  raspberry-pi
Padd
PADD (formerly Chronometer2) is a more expansive version of the original chronometer.sh that is included with Pi-Hole. PADD provides in-depth information about your Pi-hole.
Stars: ✭ 1,011 (+2251.16%)
Mutual labels:  raspberry-pi
Kotihome
Home automation system based on Arduino with sensors, Raspberry Pi, Node.js and React
Stars: ✭ 32 (-25.58%)
Mutual labels:  raspberry-pi
True artificial intelligence
真AI人工智能
Stars: ✭ 38 (-11.63%)
Mutual labels:  raspberry-pi
Embassy Os
A graphical operating system for running self-hosted software.
Stars: ✭ 43 (+0%)
Mutual labels:  raspberry-pi
Piweatherrock
Displays local weather on a Raspberry Pi
Stars: ✭ 42 (-2.33%)
Mutual labels:  raspberry-pi
Lakka Libreelec
Lakka is a lightweight Linux distribution that transforms a small computer into a full blown game console.
Stars: ✭ 1,007 (+2241.86%)
Mutual labels:  raspberry-pi

wpa-connect

Package provides API for connection Linux device to Wi-Fi Network.

wpa-connect communicates with WPA supplicant over D-Bus (linux message bus system).

This package was developed as part of IoT project in order to add Wi-Fi connectivity to headless Raspberry Pi like devices. No need for connman or Network Manager be installed.

Setup

On Linux:

wpa_supplicant service should run with -u flag in order to enable DBus interface. Run it as Linux service before first call to wpa_supplicant. Otherwise system will start it automatically without -u flag.

Systemd service configuration file - /etc/systemd/system/[email protected]

[Unit]
Description=WPA supplicant for %i

[Service]
ExecStart=/usr/sbin/wpa_supplicant -u -i%i -c/etc/wpa_supplicant.conf -Dwext

[Install]
WantedBy=multi-user.target

On Raspberry PI OS (Debian Buster):

Raspbery PI OS (formerely known as Raspbian) uses dhcpd-run-hooks to setup and invoke the wpa_supplicant daemon.

  1. Disable the systemd managed wpa_supplicant located under /etc/systemd/dbus-fi.w1.wpa_supplicant1.service by running sudo systemctl disable wpa_supplicant
  2. Modify the existing wpa_supplicant dhcpd-run-hook available under /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant by adding the -u flag to the invocation of the wpa_supplicant daemon in the wpa_supplicant_start() function.
  3. Alternatively run sudo sed -i 's/wpa_supplicant -B/wpa_supplicant -u -B/g' /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant to modify the hook in place.

On Project:

go get github.com/mark2b/wpa-connect

Usage

Please see godoc.org for documentation. (Not ready yet)

Examples

Connect to Wi-Fi network

import wifi "wpa-connect"

if conn, err := wifi.ConnectManager.Connect(ssid, password, time.Second * 60); err == nil {
	fmt.Println("Connected", conn.NetInterface, conn.SSID, conn.IP4.String(), conn.IP6.String())
} else {
	fmt.Println(err)
}

Scan for Wi-Fi networks

import wifi "wpa-connect"

if bssList, err := wifi.ScanManager.Scan(); err == nil {
	for _, bss := range bssList {
		print(bss.SSID, bss.Signal, bss.KeyMgmt)
	}
}

Package release under a MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].