Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a Debian Jessie system which, for reasons unrelated to this question, has nothing installed but the set of essential system packages.

What is the simplest method for connecting to a wireless network? If it matters, my network is using WEP (yes, I know it's bad to use WEP). Bonus points if you suggest an answer requiring the least number of packages needed (including dependencies), because I have to manually download every one of these.

I've installed wireless-tools, wpa_supplicant and isc-dhcp-client, and messed around, but got nowhere. I've been able to set my link to up with ip link set up wlan0, but that doesn't actually get me to the point where I can input a password to connect to the router.

share|improve this question
2  
The common dependencies of wicd-daemon and network-manager should do the trick. –  Gilles Jul 27 '13 at 22:38

2 Answers 2

up vote 2 down vote accepted

Since you have the wireless tools and wpa supplicant installed, you have all you need. But for WEP you don't need the wpa supplicant. Configure your network via /etc/network/interfaces:

auto wlan1
iface wlan1 inet dhcp
  wireless-key <key>
  wireless-essid <ESSID>
share|improve this answer
    
ah, i was missing the wireless-* components. –  strugee Jul 27 '13 at 3:09
1  
Actually, this didn't end up helping. It did the exact same thing as before, which was to output "DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval <some number between 3 and 18>" –  strugee Jul 27 '13 at 3:25

You can bring up the wireless interface from the command line to get yourself bootstrapped. Debian Jessie's essential packages have all you need to do this.

Let's say the SSID is "example" and its WPA2 pre-shared key is "abcdefg". Create a file wpa_supplicant.conf containing:

network={
  ssid="example"
  psk="abcdefg"
  scan_ssid=1
}

Now as root say:

# wpa_supplicant -c wpa_supplicant.conf -i wlan0 &

Wait until you see a successful link, and then say:

# dhclient wlan0

Use ip addr show dev wlan0 and ip route show dev wlan0 to check for addressing and for a default route.

If you need a more permanent solution and still want to limit yourself to the essential pacakges only then you want to use the ifupdown system. Edit /etc/network/interfaces.d/wlan0 to say:

allow-hotplug wlan0
iface wlan0 inet manual
  wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface wlan0 inet6 auto

Create /etc/wpa_supplicant/wpa_supplicant.conf to say

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
  ssid="example"
  psk="abcdefg"
  scan_ssid=1
}

Add yourself to the netdev group with usermod -a -G netdev vk5tu. Logout, login. Now try ifup wlan0. When you boot the interface should come up automatically.

Edit

I see you are using WEP rather than WPA. In that case the wpa_supplicant network clause is:

network={
  ssid="example"
  wep_key0="abcdefg"
  wep_tx_keyidx=0
  key_mgmt=NONE
}

You can also configure WEP using ifconfig.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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