Changing the wifi network on priate radio

Hi I have a Pimoroni Pirate Radio working on my home network. I was planning to take it on holiday. So I need to change the SSID/password. How do I do this?

Thanks

You need to edit your /etc/wpa_supplicant/wpa_supplicant.conf file to fit to your new ssid and psk.

So, sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

look for ssid="*" and
look for psk="
’’" and write in the approriate values

save the file and reboot…

1 Like

If your running the full Raspbian just click the WIFI icon in the tray. After connecting a monitor etc. I run full Raspbian to make stuff like that easier. I just set it to boot to command line when done to speed up the boot and reduces resources. If you plan on doing it all remotely you’ll have to ssh in or something with putty.

Hi Thanks for the fast responses. I am running Stretch lite - perhaps I should repeat the whole setup from the full Stretch? At present when I start up I do not get to a terminal at all when I connect a monitor so at my vacation home I will be unable to add a new network.

But does the full Stretch version give me a desktop after I have loaded the Pirate Radio software?

It’s the lack of an IP address - how do I ssh without it? Can I edit the boot drive of the sd card on my laptop and add the new SSID/password there? It would be great to take the radio has it does work very well.

Maybe I should ask my vacation house owner for their SSID/password and before I leave home add them from my network then return to my network values as I leave and come back? I feel there must be a better way or I am just missing something! Your help is much appreciated.

The full Raspbian by default boots to the desktop GUI. On my Pirate Radio I just go into the configuration menu and change it so it boots to command line interface instead.
What do you get when you boot up? Plug your monitor in and have it turned on before you boot up the Pi. I have one TV that won’t display the Pi’s signal if its not plugged in and turned on before boot up… I just get a blank black screen.
Windows will only see the one fat partition on the SSD card. If your laptop is running Linux you’ll have access to the whole card. I think you’ll need full access to edit the supplicant.conf, I’m not 100% sure on that one though. I’d have to try it myself, I’m a bit of a Linux noob.
Assuming the vacation house has a TV with an HDMI input, all you’ll need is an HDMI cable and a keyboard to set it up manually when you get there. I have a little mini keyboard with a built in touchpad that is great for stuff like that. I’m assuming you already have the adapters for the mini HDMI and micro USB.

Like alphanumeric I need to plug my pi in via HDMI on my monitors before powering up in order to see anything on my monitors. If you are using lite you will not have the desktop but you should see the terminal instead. If you are seeing nothing at all in your monitor then there is something wrong there.

Thanks everyone. If I do plug in the monitor first I do see the boot up. It then stops at the login for about 10secs and then completes the boot. Pirate radio starts as usual and the monitor defaults to no cursor. However if I fill in the user id and password I get to the command line! So I will be able to add networks manually. I will try the idea of adding more networks to my wpa_supplicant.conf now to see if that helps. I have activated the Linux option on my laptop and installed Debian. I was going to see if that would work. I have this worry that the vacation house TV will not have a HDMI socket. Thanks again!

If you run sudo raspi-config from the command line that will bring up the old config menu. In there in the boot options there is an option to auto log you in, if you want. I do it on mine.

Thanks. I will try that. Have you ever tried adding multiple networks to the wpa_supplicant.conf file? Would it pick the one that’s broadcasting? Thanks.

I’ve only ever edited that file once and only added the one network.

Another way to do this is after logging in at the command line, run raspi-config. One of the options lets you type in the wifi SSID and password, and raspi-config takes care of editing wpa_supplicant for you.

Hi thanks. I will use this route. I tried adding extra ssids/pwds to the wpa_supplicant file but that just stopped the Pi zero finding any wifi! I used http://stuart.shum.cc/projects/raspberry-pi-wifi-multiple-networks/ and I think followed it correctly but maybe I had a typo.

I haven’t tried this myself yet, but according to https://core-electronics.com.au/tutorials/raspberry-pi-zerow-headless-wifi-setup.html you should be able to create a wpa_supplicant.conf file on the boot filesytem (e.g. by plugging your sd card into a PC or Mac) and raspbian will copy it into the right place next time it boots.

Also, yes, you can totally put multiple networks in there and it will pick one it can reach. I haven’t done this on Pi but I know it works on regular Linux because this is how I run my laptop

I’ve done that with a playlist.m3u file on my pirate radio. It gets moved over and becomes the default playlist. I have never tried it with a wpa_suplicant.config though. Cool if it works.

Hi Thanks for the idea. I tried it but after booting it fails to find my ssid - I just get two red x’s on the ethernet/wifi icon when I connect a monitor. I cannot even see my SSID when I click on the icon so cannot re-connect directly. The file wpa_supplicant.conf is in folder /etc/wpa_supplicant/ but is labelled unknown and when I try to open it with text editor I get permission denied. If I open it from terminal it looks correct - with my SSID and password. Yet I still get the message no wireless found.

Strange because I too used the playlist trick to get my stations onto Pirate Radio and that worked fine.

Any thoughts on how to re-establish the wifi? Thanks.

Hi Okay - I fixed it. I should have read through the comments. You need to use response J in the comments. When I did this it work perfectly. When I get a chance I will try the idea with multiple networks - this time I just made up a wpa_supplicant.conf in boot with one network. Its a neat idea!