Connect RPi to wifi without monitor

Does anyone know if it’s possible to connect the RPi to a wifi access point without a keyboard and monitor? Can it be done over Bluetooth with some kind of custom script?

You may put the WiFi config file into the SD card before inserting it into the Pi:

It may take a couple of tries to get the settings right though, as it requires configuring the security type of your router, it’s best if you could copy the contents of a /etc/wpa_supplicant/wpa_supplicant.conf file you know is working from another Pi.

this is the file I put on the sd card to connect to wifi :slight_smile:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=DE

network={
	ssid="ExactWifiName"
	psk="passwordOfTheWifi"
	key_mgmt=WPA-PSK
}

saved as wpa_supplicant.conf on the main folder of the SD containing a freshly flashed image, make sure is not wpa_supplicant.conf.txt !
change yours accordingly with the wifi name and country code DE is Germany
Also add an empty file with no extension called ssh to activate ssh from start

1 Like

I suppose I should have been a bit more clear; what if I don’t know the wifi access point/protocol/password beforehand?

Some form of input of such information will be necessary - either keyboard and monitor, or another computer using which you can write info to the SD card (and also get the necessary information). :slight_smile:

Would be a great feature to add to the Pisound app! Connect to Bluetooth then provide a wizard to connect the RPi to the available wifi.

Hint hint…

1 Like

You can tether usb to a phone and then use ssh, or more simply service like dataplicity to get a terminal once it’s connected to the internet. Once you have a terminal you can use sudo raspi-config to setup the wifi.