GuitarExtended
Posts: 26
Joined: Fri Aug 10, 2012 8:15 am
Contact: Website

Strategies for configuring wifi on a headless RPi

Mon Nov 19, 2012 6:46 pm

Hi,

I m running the RPi as a headless device, with a small python server build with CherryPy serving a web interface. I m currently using the ethernet connection, but I plan on buying a wifi dongle soon.

I am looking for strategies to configure a wifi connection (assuming the dongle works fine per se) while keeping the RPi a headless device (no screen, no keyboard).

I see two main options :
- configure SSID and password from the web interface (my server doesn't do https and i'm a bit worried about security...),
- or put the SSID and password in a file in a fat32 partition (I could stick it in my laptop and create the file easily), and let Python read it and configure the connection (it could edit /etc/wpa_supplicant.conf).

I'm not really sure how to go about this. I'd like to know whether there exist better options.

Cheers!
http://guitarextended.wordpress.com

BlackJack
Posts: 288
Joined: Sat Aug 04, 2012 8:28 am
Contact: Website

Re: Strategies for configuring wifi on a headless RPi

Mon Nov 19, 2012 7:28 pm

@GuitarExtended: How do you reach the web interface in option one without a working wifi connection? ;-)

Code: Select all

while not self.asleep():
    sheep += 1

GuitarExtended
Posts: 26
Joined: Fri Aug 10, 2012 8:15 am
Contact: Website

Re: Strategies for configuring wifi on a headless RPi

Mon Nov 19, 2012 8:24 pm

I want to avoid doing it through the web interface anyway. If i have to, i'll keep the ethernet connected while configuring the wifi.
http://guitarextended.wordpress.com

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2819
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Strategies for configuring wifi on a headless RPi

Mon Nov 19, 2012 8:45 pm

You can use the GUI if you install tightvnc. You only have to do it once for the wifi dongle setup. :D
Alex Eames RasPi.TV, RasP.iO

Return to “Python”