A minimium script to configure Wi-Fi network on Raspbian system for Raspberry Pi(R) ARM computer.
This script is useful for headless usage of Raspberry Pi. You may connect a brand new Raspbian system to Wi-Fi network, only by "blindly" entering one line of command via a USB keyboard. You don't need wired network connection, direct changing linux partition or even a screen.
This script may also be used in any Linux system with wpa_supplicant tools installed.
- Linux system
- wpa_supplicant installed, wpa_cli command available
- A Wi-Fi network card supported by your system
How to use (generally)
- Edit the script file
w.sh, enter your Wi-Fi SSID and password.
- Execute with
./w.shusing root privilege. (by root user or via sudo)
How to use it for configuring Wi-Fi for a new Raspbian system
- Write Raspbian system image to SD card.
- Edit script file
w.sh, copy it to the boot partition (aka. the first, small FAT partition) of SD card.
(Note: DON'T edit this file with Windows Notepad, as it can't recognize Unix style line-endings! Use Notepad++ or other text editor instead.)
- Power on Raspberry Pi, with a supported Wi-Fi usb dongle, and a usb keyboard connected.
- Wait 2 minutes. (for the first boot)
ESCkey. (to exit raspi-config)
- Wait 30 seconds. (for entering command line)
- Input this command and press enter:
You may not see your entering without a screen - just relax. It's OK to do it blind.
- Wi-Fi connection will be established within several seconds. The indicator light on your Wi-Fi dongle (if exists) will light up and flash.
You can connect to your Raspberry Pi via SSH. Pi's IP address can be found in router admin interface, or using an IP scanner software.