Unable to connect Raspberry Pi 3 to new WiFi network

So new Ubiquiti Access point installed and running very well. I’m moving everything over to the new combined network “RisingStars” (2.4GHz & 5GHz), previously I had the two networks “FinalCrisis” (2.4GHz) and “RisingStars” (5GHz). This Raspberry Pi, a model B, was connected to “FinalCrisis” as it doesn’t support 5GHz and was to far away as well.

With the Ubiquiti I wanted to just have the one network, SSID, of “RisingStars” and let the Access Point or the device decide what to connect to. So for the transisition stage I have the Ubiquiti running the “RisingStars” (2.4GHz & 5GHz) SSIDs and an old router running “FinalCrisis” (2.4GHz).

So it should have been just a case of running sudo raspi-config changing the network, rebooting and done. Should have been. One reboot later and it’s still connected to “FinalCrisis”. A check of the file /etc/wpa_supplicant/wpa_supplicant.conf shows that “FinalCrisis” is down as the “ssid” to use but, at the top of the file, is this comment: # Generated automatically by /usr/lib/piaware-support/generate-network-config. Aha, I run Flight Aware on this Pi as well, so I need to find what files are used by that script. One of them is the /boot/piaware-config.txt file and this has the entries wireless-ssid and wireless-password set to “FinalCrisis” and “JMS” respectively. So I changed them to the new values, ran the generate-network-config and rebooted…The Pi is still connecting to “FinalCrisis”! To make matters worse running iwlist scan only shows all WiFi networks on the first run, subsequent runs only list “FinalCrisis”. So more messing about with raspi-config, this time making sure the local settings are all correct, i.e. GB or UK. Reboot, run iwlist scan and all networks are there but it’s still connecting to “FinalCrisis”, run iwlist scan and only “FinalCrisis” is showing again! I found a reference to /etc/network/interfaces as being another possible file to change, so I edited that and once again the first line says: # Generated automatically by /usr/lib/piaware-support/generate-network-config! But there was a reference to another file: /etc/wpa_supplicant/wpa-roam.conf, which was similar to files I’ve looked at so I dived into there, that also says it’s generated by the aforementioned piaware script, arrgh!

In the end I made manual changes to all three files and ran the generate-network-config script, rebooted and voila “RisingStars” is now shown as the connected SSID by both iwgetid and the DHCP server I’m running. I still can’t get iwlist to show all networks after the first run it just shows “RisingStars” now, no idea why.

Hope this helps someone, and if anyone knows why please leave a comment.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.