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
- Edit the script file
w.sh
, enter your Wi-Fi SSID and password. - Execute with
./w.sh
using root privilege. (by root user or via sudo)
- 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)
- Press
ESC
key. (to exit raspi-config) - Wait 30 seconds. (for entering command line)
- Input this command and press enter:
sudo /boot/w.sh
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.