What is the simplest way to connect to wireless on a Debian system with nothing but essential?

14,978

Solution 1

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>

Solution 2

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:
14,978
user2914606
Author by

user2914606

Updated on September 18, 2022

Comments

  • user2914606
    user2914606 almost 2 years

    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.

  • user2914606
    user2914606 almost 11 years
    ah, i was missing the wireless-* components.
  • user2914606
    user2914606 almost 11 years
    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>"