Setting up WIFI via SSH

I tried following the instructions here:

flightaware.com/adsb/piaware/build/optional#wifi

to set up wifi via SSH. I’m not getting a connection. I expected that while connected wired, using the iPad Fing app, I should have seen two connections for the Raspberry Pi, one for the wired connection and one for WIFI. Not seeing that, I thought maybe piaware doesn’t try the wifi if there is a wired connection. So I disconnected the wired connection and tried a reboot.

After waiting long enough for it to have made a connection, I tried the web interface and was unable to connect. I also noticed no piaware connection on Fing.

I did see a blue LED light up about 10 times on my Edimax WIFI USB dongle when I booted, but it’s apparently not connecting. I’ll connect wired again until I have more ideas of things to try.

P.S. When I run the script indicated in the instructions, above, I get output like this:

pi@piaware ~ $ sudo /root/network_monitor.sh &
[1] 5494
pi@piaware ~ $ Network connection down! Attempting reconnection.
wpa_supplicant: wpa_action is managing ifup/ifdown state of wlan0
wpa_supplicant: execute ifdown --force wlan0' to stop wpa_action run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1 run-parts: /etc/network/if-up.d/wpasupplicant exited with return code 1 Network connection down! Attempting reconnection. wpa_supplicant: wpa_action is managing ifup/ifdown state of wlan0 wpa_supplicant: execute ifdown --force wlan0’ to stop wpa_action
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
run-parts: /etc/network/if-up.d/wpasupplicant exited with return code 1
Network connection down! Attempting reconnection.
wpa_supplicant: wpa_action is managing ifup/ifdown state of wlan0
wpa_supplicant: execute `ifdown --force wlan0’ to stop wpa_action
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
run-parts: /etc/network/if-up.d/wpasupplicant exited with return code 1
Network connection down! Attempting reconnection.

I ran into issues with the X based utility saving the password correctly. My WPS+ (or whatever type it is) is all uppercase it my router is case sensitive. I hade to find the WiFi config file and “sudo nano” it and add the password that way. Sorry I can’t be more specific on what file. My old standby would be to ssh into the Pi and do a “sudo find / -name wifi* -print” That will give you every file that starts with wifi.

I also used savagehomeautomation.com/pro … dapte.html to create a file for my network, but I’m not sure I understand the settings.

My network is a WPA2 network, according to my current connection from my Macbook Pro. I entered my network name for SSID and my network password for psk. I’m suspecting that’s wrong, though. What are all the lines:

network={
ssid=“SSID
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=“WPA_SHARED_KEY
}

Thanks. I didn’t try using the x utility, so I suspect my setup of my LAN is what’s faulty.

Here’s what my network settings are:

Frequency 2.4GHz or 5 GHz
SSID ENGEL (this is just my network name)
Hide SSID No
Wireless Mode Austo b/g Protection
Channel bandwidth 20/40 MHz
Control Channel Auto
Extension Channel Auto
Authentication Method WPA2-Personal
WPA Encryption AES
WPA Pre-Shared Key (wouldn’t you like to know)
Network Key Rotation Interval 3600

So do I need to adjust anything else besides the network name and the shared key?

I got it.

In the /etc/network/interfaces file I added:

auto wlan0
iface wlan0 inet dhcp
wpa-ssid ENGEL
wpa-psk mynetworkpassword

It connected automatically when I saved this file.

Hmmm. Fing is reporting a different IP now. I guess that’s normal. But it’s not being reflected on flightaware website. My previous number is still there. Do I just need to wait a while for the new one to kick in?

Hmmm. I’m giving up for now. Seems like I’m making progress but still have something wrong. I can’t, for example, ssh to the new IP. I can ssh just fine when I then reconnect the LAN cable.

OK, now it’s working, and the IP address has been updated on FA.

It finally worked when I trimmed down the interfaces file to look like the one here (which makes me wonder what the other lines are supposed to do):

raspberrypihq.com/how-to-add-wif … pberry-pi/

Anyway, not I got it working wirelessly, I can move it up to the second floor or the attic for better reception. I’ll do that tomorrow if I can find a decent power supply.