All Projects → Autodrop3d → raspiApWlanScripts

Autodrop3d / raspiApWlanScripts

Licence: MIT License
Wifi station/AP mode scripts

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to raspiApWlanScripts

RPi-TELEBOT
Python based Telegram bot to monitor and control the raspberry pi
Stars: ✭ 19 (-20.83%)
Mutual labels:  raspberrypi, raspberry-pi-iot, raspberry-pi-zero, raspberry-pi-3
homeberry
HomeBerry is an Android remote control app for your Raspberry PI
Stars: ✭ 31 (+29.17%)
Mutual labels:  raspberry-pi-zero, raspberry-pi-3, raspberry-pi-zero-w
vigilantpi
VigilantPI is a lightweight NVR which targets mainly Raspberry Pi
Stars: ✭ 14 (-41.67%)
Mutual labels:  raspberrypi, raspberry-pi-3, raspberry-pi-zero-w
PiBeacon
Low-cost iBeacon using Raspberry Pi
Stars: ✭ 41 (+70.83%)
Mutual labels:  raspberrypi, raspberry-pi-iot, raspberry-pi-zero-w
azure-iot-starter-kits
Samples for Azure IoT starter kits.
Stars: ✭ 29 (+20.83%)
Mutual labels:  raspberry-pi-iot, raspberry-pi-3
SmartMirror
Raspberrry Pi powered smart mirror inspired by HackerHouseYT Smart Mirror project
Stars: ✭ 16 (-33.33%)
Mutual labels:  raspberrypi, raspberry-pi-3
PiBuilder
Ideas for building a Raspberry Pi from "bare metal" to ready-to-run IOTstack
Stars: ✭ 26 (+8.33%)
Mutual labels:  raspberry-pi-3, raspberry-pi-zero-w
EEGwithRaspberryPI
Open-Source board for converting RaspberryPI to Brain-computer interface
Stars: ✭ 402 (+1575%)
Mutual labels:  raspberrypi, raspberry-pi-3
MyIoT
[MyIoT] A start with personal server for home automation
Stars: ✭ 14 (-41.67%)
Mutual labels:  raspberrypi, raspberry-pi-3
Linux-System-Info-Webpage
Material Design Dashboard for Linux System Info. Great for RPi and other linux Distros
Stars: ✭ 19 (-20.83%)
Mutual labels:  raspberrypi, raspberry-pi-3
Realtek-USB-Wireless-Adapter-Drivers
Realtek USB Wireless Adapter Drivers [0bda:f179] (Kernel 4.15.x ~ 5.9.x)
Stars: ✭ 34 (+41.67%)
Mutual labels:  raspberrypi, raspberry-pi-3
teslausb
Steps and scripts for turning a Raspberry Pi into a useful USB drive for a Tesla
Stars: ✭ 1,426 (+5841.67%)
Mutual labels:  raspberrypi, raspberry-pi-zero-w
motor-hat
Node Module to control Adafruits MotorHAT for the RaspberryPi
Stars: ✭ 28 (+16.67%)
Mutual labels:  raspberrypi, raspberry-pi-3
gro-light-automation
A raspberry pi project to automate hydroponics with relays and data sensors through a web application
Stars: ✭ 44 (+83.33%)
Mutual labels:  raspberry-pi-iot, raspberry-pi-3
wor-flasher
Legal utility that runs on RPiOS to flash another SD card with Windows 10/11
Stars: ✭ 451 (+1779.17%)
Mutual labels:  raspberrypi, raspberry-pi-3
Three-Factor-Security-Door
What do you get when you mix a Raspberry Pi, a MySQL database, an RFID reader, an LCD touchscreen, a relay switch, an electronic door strike and a Twilio SMS account?
Stars: ✭ 49 (+104.17%)
Mutual labels:  raspberry-pi-iot, raspberry-pi-3
PiHueEntertainment
An application that can handle the Hue Entertainment Areas on a Raspberry Pi
Stars: ✭ 28 (+16.67%)
Mutual labels:  raspberrypi, raspberry-pi-3
yamete
Yamete - Hentai downloader in PHP CLI - Easy site downloader PHP system
Stars: ✭ 63 (+162.5%)
Mutual labels:  raspberrypi, raspberry-pi-3
aprenda-python
Aprendizado, dicas e projetos sobre Python
Stars: ✭ 22 (-8.33%)
Mutual labels:  raspberrypi, raspberry-pi-3
RaspberryPi-Packet-Sniffer
An HTTP and HTTPS sniffing tool created using a Raspberry Pi
Stars: ✭ 79 (+229.17%)
Mutual labels:  wlan, raspberry-pi-3

Raspberry Pi Wlan/AP Mode Switching Scripts

What's all this then?

Well, as the title here says, these scripts enable a Paspberry Pi to switch between station mode (connect to an access point) and Access Point mode (it is an access point) without needing to reboot the Pi.

Ok... Why would I want that?

Well let's say that you want to have a Pi embedded in a thing that has no interface for a user to configure it. You could have a button connected to the Pi that triggers it to switch to AP mode. Then the user can connect to it with their smartphone or whatever and browse to a webserver (that you provide separately!) hosted by the Pi. Or maybe you just want to be able to demo some network functionality when you're not in range of your home or office router.

Neat. So how do I make it work?

Run this script as root. Use the -h flag to see usage info.

./setup_wlan_and_AP_modes.sh -s <station mode SSID> -p <station mode password> -a <AP mode SSID> -r <AP mode password>

By default, the Pi will boot into station mode. You can change this by including the -d flag when running this script.

After running this script, you should reboot your Pi.

Then...

You can run the switchToAP.sh or switchToWlan.sh scripts (as root) to do what they say.

What if I want to change the station mode AP and passwords later?!

Just rerun the setup_wlan_and_AP_modes.sh script with whatever you need!


Some impartant notes

These scripts are presently written to work in the US only.

But if you live in another country, you can still make this work for you! You only need to edit the country codes. This can be done in two ways: Edit the setup script before running it OR edit the wpa-supplicant files after running the setup script. Thanks to cl for reminding me of this limitation.

Option 1: Edit the setup script

Simply search for the phrase country=USand replace it with country=XX where XX is your two letter country code. There are two places where you must make this change.

Option 2: Edit the wpa-supplicant files after running the setup script

As root, edit two files, both are in the /etc/wpa_supplicant/ directory:

  1. wpa_supplicant-wlan0.conf

    This file is used for configuration when the Pi is in station mode (connecting to an access point). As above, replace country=US with whatever is appropriate for you.

  2. wpa_supplicant-ap0.conf

    This file is used for configuration when the Pi is in AP mode (acting as an access point). Just as with the other wpa_supplicant file, edit the contry code as appropriate.

This script sets an AP mode IP address that you might not like.

That's just like, your opinion, man. I like using 192.168.4.1. But if you don't, that's ok. You can choose whatever IP address you want to use by either editing the script or editing a file after you run the script.

Option 1: Edit the setup script

Simply search for the phrase 192.168.4.1 and replace it with your preferred IP address.

Option 2: Edit /etc/systemd/network/12-ap0.network

Same as the last option. Search this file for 192.168.4.1 and replace it with your preferred IP address.

Pull requests accepted! Go ahead - make my day

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].