WiFi at startup

211 views
Skip to first unread message

chrised...@gmail.com

unread,
Jul 27, 2016, 12:22:14 PM7/27/16
to snickerdoodle forum
Hi Jamil, et. al.,

I saw the thread a few weeks ago on getting WiFi to start at boot, and also see the utilities & ifupdown scripts you posted on github.  Are there any docs/posts on how to use them correctly?  Maybe I missed the post.

Your previous post on bringing up wifi works like a charm for me.  Now just need it automated at boot.

Thanks,
Chris

chrisnr...@gmail.com

unread,
Jul 27, 2016, 8:41:31 PM7/27/16
to snickerdoodle forum, chrised...@gmail.com
Chris,
I added the following to /etc/network/interfaces to start at boot. The last 2 lines are commented out as they don't seem to work on the current Ubuntu version in the snickedoodle image.

The newer versions of Ubuntu use a different network configuration method so the whole networking config would probably change when the project moves to the newer versions of Ubuntu.

Hope this helps.


auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -d -D nl80211 -c /etc/wpa_supplicant.conf -i wlan0 -B
post-down killall -q wpa_supplicant
#wpa-driver nl80211
#wpa-conf /etc/wpa_supplicant.conf

Bush

unread,
Jul 28, 2016, 4:29:21 PM7/28/16
to snickerdoodle forum, chrised...@gmail.com, chrisnr...@gmail.com
You shouldn't directly modify /etc/network/interfaces rather you should add an interface file to /etc/network/interfaces.d (most commonly you will name the file with the name of the interface) and put the interface definition lines and stanzas in that file. This will give you a separate file for every interface you'd like to customize. I've added some if-up/down scripts to automate the wireless configuration for both station and AP mode in the following repository, and they will be documented there: https://github.com/krtkl/snickerdoodle-utilities The scripts can be invoked using the stanzas in your interfaces files.

chrisnr...@gmail.com

unread,
Jul 29, 2016, 1:04:39 PM7/29/16
to snickerdoodle forum, chrised...@gmail.com, chrisnr...@gmail.com
Good to know. I'll take a look at this scripts.

I wasn't aware it was a bad thing to edit it directly, have been doing it for years. I can see if you had a setup with lots of NICs it might not be best method though.

Thanks,
Chris

Bush

unread,
Aug 1, 2016, 1:15:12 PM8/1/16
to snickerdoodle forum, chrised...@gmail.com, chrisnr...@gmail.com
There's nothing inherently wrong with editing the interfaces file directly but, as you pointed out, with increased number and types of NICs on systems the "standard" approach for describing these interfaces has changed. Your /etc/network/interfaces file should only serve to source the interface files in /etc/network/interfaces.d.  Normally, all you should see in your /etc/network/interfaces file is a single line used to source the directory, something like this:

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d


So make sure to keep the source-directory line in your /etc/network/interfaces file if you wish to use the /etc/network/interfaces.d directory for your interface files.

Tom Olenik

unread,
Aug 7, 2016, 12:05:14 PM8/7/16
to snickerdoodle forum, chrised...@gmail.com, chrisnr...@gmail.com
Chris, Bush,

Thanks for the great tips on setting up the snickerdoodle to connect to the WiFi automatically. It worked perfectly for me. For anyone who wants to see a demo of what is described in this thread, I've posted a video to YouTube here:


I hope it helps someone.

Tom Olenik

Cousins

unread,
Aug 7, 2016, 1:31:37 PM8/7/16
to snickerdoodle forum, chrised...@gmail.com, chrisnr...@gmail.com
This is great, Tom! Thanks a lot for putting all these videos together...

-Ryan
Reply all
Reply to author
Forward
0 new messages