Wifi is becoming a bit of a pain. It seems that when the internet/router goes down at my home, the DHCP is having troubles renewing the lease (even after I set the time to only 10 seconds to renew). Anyways, manually running some commands got it up and working for me (below). I suspect I may have to have some detection in the program that if the wifi is down, try to run these commands via a shell script.
Link to post that solved my issue:
http://www.raspberrypi.org/forums/viewtopic.php?t=72282&p=521088
1. sudo dhclient -v -r wlan0
2. ifconfig
3. sudo dhclient -v wlan0
Will update this post if I find another, simpler, way to get around this.
Update 1:
After hours and hours of research, this appears to not work. I finally came across a possible lead:
iwlist wlan0 scan
Returns my wifi connection sometimes, and sometimes not. This gave me some extra search terms to try and figure out a possible fix. After coming across a post about power issues, I have determined (for now) that the wifi adapter I am using requires too much power. The Raspberry Pi only outputs a certain amount of volts/amps, which wasn't enough, causing intermittent connection problems.
I have ordered a powered USB hub (http://shop.pimoroni.com/products/pihub) to ideally fix the issue.
No comments:
Post a Comment