4

Assuming a user has a RPi-based device with a WiFi adaptor, Ethernet port, and Bluetooth dongle, what is the easiest way to configure their SSID & Password to get them connected to WiFi without:

  • plugging in a screen
  • plugging in a keyboard
  • downloading a native app (OSX, Windows, iOS, Android, etc.)
  • SSHing or connecting directly via console cables (targeting mass audience, non-savvy users)

Let's assume Raspbian, but open to other OS's (like Android) that might offer a better experience.

Coder (http://googlecreativelab.github.io/coder) takes an approach where it sets up an ad-hoc network that allows you to connect to the device through the IP it's assigned (they use Multicast DNS, so you can connect to foobar.local), shown an HTML form to enter & submit your network settings, then the device can change it's networking settings & connect to your WiFi.

Spark (http://docs.spark.io/start) makes you connect via USB, and then download a native app to configure the device. I believe over Bluetooth? I believe Sonos does something similar, but not sure.

Any other references, libraries, tuts, code examples, approaches anyone has seen?

  • You have excluded all the normal techniques (why?). Do you propose telepathy? – Milliways Oct 29 '14 at 22:47
  • @Milliways if you read my post, i'm targeting the every-day consumer to receive a RPi-based product, and be able to get it connected to the internet as easily as possible. The "normal" techniques aren't for everyone. – Nick Jonas Oct 30 '14 at 13:04
  • If the device has a display and UI of any sort at all, you can do WiFi configuration through that. It wasn't fun to enter my long passphrase into a Kindle with it's four way rocker and an onscreen keyboard, but it was at least possible. For a device with no UI at all (say a weather station, door bell button, security camera, etc.), this is a very good question. The usual technique for routers and access points of having them come up on a published IP address works well for those devices, but by nature they have a wired network connection to use. – RBerteig Nov 27 '14 at 0:57
2

You can mount the OS disk to another computer and edit /etc/network/interfaces to read

auto lo
iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ap-scan 1
wpa-scan-ssid 1
wpa-ssid "network name"
wpa-psk "network password"

I don't know whether this is more convenient than connecting a display and keyboard...

(Sorry that I put this as an answer, but I don't have enough reputation to comment...)

  • Again, this is meant to target the every-day consumer. No non-tech savvy person is going to know to plug into ethernet, find their IP address, mount the OS disk, and edit etc/network/interfaces – Nick Jonas Nov 11 '14 at 5:48
  • As I pointed out, I were not eligible to comment at the time of my post. OTOH, one could write a desktop app to prepare the OS disk for the RPi via e.g. card reader in order to set the network settings and maybe more. – jkalden Nov 11 '14 at 10:55
2

I don't know of any reference for the full process but Lasse Christiansen has written an article about how to "Connect to WiFi or create An Encrypted DHCP Enabled Ad-hoc Network as Fallback". I think this can be an excellent base for further developpments. I haven't started myself, still waiting the delivery of a compatible wifi key.

I am surprised that this question has so little answers as it is a very standard problem to solve for the internet of things.

I am a personal fan of the ad-hoc method. It is also used for the Chromecast (through a dedicated app) while the USB method was used in early versions of the Withing connected scale.

  • I've been leaning towards the ad-hoc network as well. Thanks for the link, haven't seen that article. Will give it a try, seems similar to the Google Coder approach. – Nick Jonas Jan 11 '15 at 4:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.