LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > drask
User Name
Password

Notices


Rate this Entry

wireless lan on raspberry pi

Posted 12-29-2013 at 10:47 PM by drask
Updated 12-29-2013 at 11:17 PM by drask

I just had to rebuild my raspberry pi again. It seems to keep eating its sd card for some reason. I decided to forgo the gui this time since it's a headless server. I just access it via ssh and vnc and I think I'm ready to drop vnc. Generally all I use X for is editing files in leafpad, and I can just as easily run pluma locally and connect over sshfs.

I have a pretty simple wireless setup - an open wireless network with no keys or certificates (I live on a farm, I'm not concerned about people intercepting my wifi). But it took me some time to figure out how to configure it, so I wanted to record what I did.

Anyway, here is my /etc/network/interfaces file:

Code:
auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
gateway 192.168.0.1

wpa-conf /etc/wpa_supplicant/wireless-lan.conf
and here are the contents of /etc/wpa_supplicant/wireless-lan.conf:

Code:
network={
	scan_ssid=1
	ssid="Wireless"
	key_mgmt=NONE
}
I'm not sure why I had to put the gateway into the interfaces file. Supposedly dhcp should set this, but without it I had no defined routes and couldn't get to anything outside my local subnet:

Code:
$ /sbin/route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
If it had to go anywhere, it seems like it would belong in the network definition in the wireless-lan.conf file, since different wireless networks will probably sport different gateways. When connecting using Network Manager, it's never been a problem, so I'm not sure why it's not getting set automatically here.
Posted in Uncategorized
Views 2178 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 10:51 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration