ganagos
Posts: 1
Joined: Thu Jan 24, 2013 6:12 am

Pre-configure wifi for headless/blind installation?

Thu Jan 24, 2013 6:26 am

Hello folks

I recently acquired a Raspberry Pi model B along with an Edimax wifi usb adapter, and I'd like to create a Raspbian image for my SD card with wifi pre-configured, so that the RPi will automatically connect to my WPA secured home-network when it boots up, allowing me to then SSH into RPi remotely.

The reason for this is that I do not have physical access to the router meaning that I can't plug the RPi directly into the router with a network cable, neither do I have a crossover cable at hand to plug it into the network port on my computer. So I think that creating an image pre-configured to connect to my wifi is maybe the easiest solution, or are there any other suggestions?

Cheers!

texy
Forum Moderator
Forum Moderator
Posts: 5173
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Pre-configure wifi for headless/blind installation?

Thu Jan 24, 2013 10:26 am

All you need to do is startx at the login prompt. You will see an app on the desktop to configure the wifi. Once you'd done that you are set to go.
You can then shut down the Pi. Once you switch it back on, you should be able to see the Pi from your router, or a PC on the same network.
You;ll be able to SSH into the Pi, and you don'[t need to go into X for this to work.
Hope this helps,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

texy
Forum Moderator
Forum Moderator
Posts: 5173
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Pre-configure wifi for headless/blind installation?

Thu Jan 24, 2013 10:30 am

PS, you don't need a crossover cable - most later ethernet designs are auto sensing and do not require it, including the Pi, a straight cable will do.

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

Mobius
Posts: 238
Joined: Thu Aug 30, 2012 1:07 am
Location: San Angelo, Texas USA

Re: Pre-configure wifi for headless/blind installation?

Thu Jan 24, 2013 6:48 pm

Sounds like maybe you want to do the configuration without ever directly accessing the Pi using a USB keyboard. In that case, I think you would need to access the SD card from your PC using Linux so that you can make the edits in the appropriate files that reside on the Linux partition. The config.txt file can be edited directly from Windows because the boot partition is FAT formatted but the wifi setup is not located there.

mailliw
Posts: 39
Joined: Fri May 10, 2013 10:51 am

Re: Pre-configure wifi for headless/blind installation?

Thu Mar 26, 2015 11:54 am

Sorry to resurrect such an old thread, but I'm keen to know if this is possible. I've downloaded the latest Raspberry .img and need to wipe my existing Pi with a fresh copy. It would be useful to be able to plug the new card/img in, and use the existing (working) wifi settings to avoid plugging it into ethernet etc.

Is it possible to edit the .img and copy over the wpa_supplicant.conf file and so on?

User avatar
DougieLawson
Posts: 42232
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: Pre-configure wifi for headless/blind installation?

Thu Mar 26, 2015 12:04 pm

mailliw wrote: Is it possible to edit the .img and copy over the wpa_supplicant.conf file and so on?
Yes, you need a Linux system but it's not easy.

It's much easier to copy the image to an SDCard, mount that on a Linux system and edit the filesystem that way.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

mailliw
Posts: 39
Joined: Fri May 10, 2013 10:51 am

Re: Pre-configure wifi for headless/blind installation?

Thu Mar 26, 2015 12:10 pm

Interesting. Would mounting an SD card on a Mac be any different (present a read/writeable filesystem) as opposed to simply having and mounting the .img? Will give it a go.

User avatar
DougieLawson
Posts: 42232
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: Pre-configure wifi for headless/blind installation?

Thu Mar 26, 2015 12:36 pm

I haven't a clue. The last time I touched any Apple device was 35 years ago.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

Return to “Beginners”