Problems Setting a Default WiFi network on emonPi2

I am trying to configure our emonPi2s with a default WiFi client as all our locations use the same SSID and password. While the LCD does allow for configuring the emonPi AP and selecting a network, we have had great difficulty using this with reliability and it is lengthening our install time unnecessarily. An option is to use a laptop with a small switch and ethernet cables, but this is kind of a messy setup, and again it is taking too long to do onsite.

I first tried modifying the wpa_supplicant.conf file with our default SSID and Password by using Putty and entering sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

This didn’t work, so next I tried adding a new file called wpa_supplicant.conf to the Pi boot directory. The file contents are below (this is the same information as I modified in the first step).

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
  ssid="YOURSSID"
  scan_ssid=1
  psk="YOURPASSWORD"
  key_mgmt=WPA-PSK
}

(I have substituted our SSID and Password with “YOURSSID” and “YOURPASSWORD” for this post).

As I created the new file with a Windows text editor, I ran dos2unix and chmod 777 on the file once it was installed on the emon unit, and then used sudo mv wpa_supplicant.conf /boot to move it into the boot directory.

Unfortunately, this did not work as the emonPi2 does not connect to the WiFi SSID.

As I am new to Linux, I welcome any advice to get this working or where I may have done something incorrectly. Or is there an emonPi parameter that is preventing this approach from working?

Thank you,

Gordon

@TrystanLea - I know you were working on the Wi-Fi setup recently.