Wifi Setup

get an IoT device online by first broadcasting a private wifi network that users can connect to to configure your device
Alternatives To Wifi Setup
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Bettercap13,764
17 days ago61April 21, 2021146otherGo
The Swiss Army knife for 802.11, BLE, IPv4 and IPv6 networks reconnaissance and MITM attacks.
Wifi Cracking10,046
6 months ago35mit
Crack WPA/WPA2 Wi-Fi Routers with Airodump-ng and Aircrack-ng/Hashcat
Esp_wifi_repeater3,679
2 years ago183mitC
A full functional WiFi Repeater (correctly: a WiFi NAT Router)
Networkmanager3,555
21 hours ago30gpl-3.0C#
A powerful tool for managing networks and troubleshoot network problems!
Wifi Password2,554
3 months ago12February 14, 20217mitPython
Quickly fetch your WiFi password and if needed, generate a QR code of your WiFi to allow phones to easily connect
Reactivenetwork2,508
754 months ago28September 17, 201936apache-2.0Java
Android library listening network connection state and Internet connectivity with RxJava Observables
Kickthemout2,166
5 months ago103mitPython
💤 Kick devices off your network by performing an ARP Spoof attack.
Trackerjacker2,156
4 years ago78November 30, 201813mitPython
Like nmap for mapping wifi networks you're not connected to, plus device tracking
Linux Wifi Hotspot1,633
2 months ago62bsd-2-clauseC
Feature-rich wifi hotspot creator for Linux which provides both GUI and command-line interface. It is also able to create a hotspot using the same wifi card which is connected to an AP already ( Similar to Windows 10).
Connectivity1,566
4823 days ago29July 07, 2020mitSwift
🌐 Makes Internet connectivity detection more robust by detecting Wi-Fi networks without Internet access.
Alternatives To Wifi Setup
Select To Compare


Alternative Project Comparisons
Readme

wifi-setup

This repo is an Express server designed to run on an IoT device and handles the first-time setup required to get the device working connected to the user's home wifi network.

  • since the device is not on the local wifi network when it is first turned on, the device broadcasts its own wifi access point and runs the server on that. The user then connects their phone or laptop to that wifi network and uses a web browser (not a native app!) to connect to the device at the URL 10.0.0.1 or <hostname>.local. The user can select then their home wifi network and enter the password on a web page and transfer it to the web server running on the device. At this point, the device can turn off its private network and connect to the internet using the credentials the user provided.

The code is Linux-specific, depends on systemd, and has so far only been tested on a Raspberry Pi 3. It requires hostapd and udhcpd to be installed and properly configured. Here are the steps I followed to configure and run this server.

Step 0: clone and install

First, clone this repo and download its dependencies from npm:

$ git clone [email protected]:davidflanagan/wifi-setup.git
$ cd wifi-setup
$ npm install

Step 1: AP mode setup

Install software we need to host an access point, but make sure it does not run by default each time we boot. For Raspberry Pi, we need to do:

$ sudo apt-get install hostapd
$ sudo apt-get install udhcpd
$ sudo systemctl disable hostapd
$ sudo systemctl disable udhcpd

Step 2: configuration files

Next, configure the software:

  • Edit /etc/default/hostapd to add the line:
DAEMON_CONF="/etc/hostapd/hostapd.conf"
  • Copy config/hostapd.conf to /etc/hostapd/hostapd.conf. This config file defines the access point name "Wifi Setup". Edit it if you want to use a more descriptive name for your device.

  • Edit the file /etc/default/udhcpd and comment out the line:

DHCPD_ENABLED="no"
  • Copy config/udhcpd.conf to /etc/udhcp.conf.

Step 3: set up the other services you want your device to run

Once the wifi-setup server has connected to wifi, it will exit. But if you want, it can run a command to make your device start doing whatever it is your device does. If you want to use this feature, edit platforms/default.js to define the nextStageCommand property.

Step 4: run the server

If you have a keyboard and monitor hooked up to your device, or have a serial connection to the device, then you can try out the server at this point:

sudo node index.js

If you want to run the server on a device that has no network connection and no keyboard or monitor, you probably want to set it up to run automatically when the device boots up. To do this, copy config/wifi-setup.service to /lib/systemd/system, edit it to set the correct paths for node and for the server code, and then enable the service with systemd:

$ sudo cp config/wifi-setup.service /lib/systemd/system
$ sudo vi /lib/systemd/system/wifi-setup.service # edit paths as needed
$ sudo systemctl enable wifi-setup

At this point, the server will run each time you reboot. If you want to run it manually without rebooting, do this:

$ sudo systemctl start wifi-setup

Any output from the server is sent to the systemd journal, and you can review it with:

$ sudo journalctl -u wifi-setup

Add the -b option to the line above if you just want to view output from the current boot. Add -f if you want to watch the output live as you interact with the server.

If you want these journals to persist across reboots (you probably do) then ensure that the /var/log/journal/ directory exists:

$ sudo mkdir /var/log/journal
Popular Network Projects
Popular Wifi Projects
Popular Networking Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Javascript
Server
Network
Internet Of Things
Wifi
Systemd
Access Point
Hostapd