Report comment

Hi Sayed, thanks for your comments and I'm glad you found the guide easy to follow.
The issue Mark had was that the wpa_supplicant.conf file was missing some of the top lines which are important to it working. It should start like this:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

the country should be your country if your not in the UK.
The line you edited changing; if (echo "$ssidreply" | grep "$ssid") basically says show the found ssid signal in range and compare it to your wpa_supplicant ssid list. By changing grep to echo this will always be true regardless of the results of the previous checks.
There may be somthing in your ssid that is not compatable with the script. What format is your ssid in your wpa_supplicant file? it shoudl be in quotes and not contain commas or apostrophies as they will be removed.
so ssid="mySSID1" and ssid="mySSID 1" is ok but ssid="mySSID'1" will fail.

Try the feature where you add your own ssid to the script to try this;
Near the top of the script add a # to the start of the four lines below IFSdef=$IFS

and remove the # on this line
#ssids=('mySSID1' 'mySSID2' 'mySSID3')
and add your ssid to the first entry, somthing like
ssids=('yourssid' 'mySSID2' 'mySSID3')

Try that and it should find your wifi network ok. Let me know what happens and the format of your ssid is.

I will be adding the script from Peter but I need to modify it for general use as it is for his specific requirements but will be made available.