googlecreativelab / coder

A simple way to make web stuff on Raspberry Pi
http://goo.gl/coder
Apache License 2.0
2.42k stars 275 forks source link

Ad-hoc fallback unreliable #58

Closed joesanford closed 9 years ago

joesanford commented 10 years ago

I've been using Coder mixed with my software, BlockyTalky (https://github.com/tufts-LPC/blockytalky), which does not modify the Coder software at all. I have noticed that at times the ad-hoc network either a) fails to ever appear or b) appears after a long period of time. Is there a way to improve this? Or is a wired connection better?

jmstriegel commented 10 years ago

Hi Joe -

The ad-hoc network is intended for use during setup and configuration. If you want to use Coder wirelessly in a reliable manner, I'd recommend one of the following options:

Option 1: Configure coder to connect to a real access point. This is probably easiest, works out of the box and allows you to access your Pi and the internet at the same time.

Option 2: Manually configure your device's network to always maintain an ad-hoc network. This option will let you access your Pi if you plan on not being near a hotspot. The downside is that you won't get great performance out of the radio in ad-hoc mode, and you won't be able to access the internet when your laptop is connected to this network.

You can do this by editing /etc/wpa_supplicant/wpasupplicant.conf and also disabling hotplug in /etc/network/interfaces. You'll probably have to read some documentation on these to get the settings dialed in.

joesanford commented 10 years ago

Thanks for the quick response.

I use the ad-hoc fallback for two things: first, to connect to setup which wireless network, or to program directly on a pi with either the Coder front end or the BlockyTalky front end.

For both uses, I have been able to successfully connect, code, etc in ad-hoc or connected to a wireless network. However, the ultimate issue is when moving to a new environment (and thus not being able to find the assigned network) and ad-hoc has been unreliable. It sometimes takes several minutes for the network to show, or sometimes it doesn't show at all and requires a reboot.

I am very familiar with using wpa_supplicant, and I have not modified it manually in any way, but I have found the ad-hoc to not always be present. Thoughts?

jmstriegel commented 10 years ago

Yeah, I'm not sure that wpa roaming and the auto hotplug stuff work spotlessly. One major issue I've seen is that if a preferred network is visible, but it can't make a solid connection (either out of range or bas password), it won't properly fail over to the next one.

Another thing I noticed is that I usually need to be pretty close to the device for ad-hoc to work properly. It seems the radio on that card isn't all that great.

Here's another idea for high-availability: if you're moving around from network to network a bunch. You could get a second wifi card. Have wlan0 be auto roaming on any preferred wireless networks, and have wlan1 fixed on an ad-hoc config network. Then you can always access a device if your network is spotty, but you still get the benefit of roaming.

joesanford commented 10 years ago

Just to make sure we are on the same page - I am using the Edimax EW-7811Un. Are you using the same dongle or getting the same issues with a different one?

jmstriegel commented 10 years ago

I think that's the same device I'm using. I suspect the issue is more with wpa-supplicant and how it manages automatic failover, rather than it being a driver thing.

On Mon, Nov 11, 2013 at 11:25 AM, Joe notifications@github.com wrote:

Just to make sure we are on the same page - I am using the Edimax EW-7811Un. Are you using the same dongle or getting the same issues with a different one?

— Reply to this email directly or view it on GitHubhttps://github.com/googlecreativelab/coder/issues/58#issuecomment-28214169 .