HOWTO: Making Wireless Connections Work

Share your own howto's etc. Not for support questions!

HOWTO: Making Wireless Connections Work

Postby jordi » 2007-11-21 13:30

I have been experimenting all kind of problems when trying to connect to wireless networks that the system sees but it's unable to establish a operating connection. I suppose that your wireless card is working currently on your system and that is capable of making a managed connection, and that the WiFi Access Point is prepared for giving adresses automatically through DHCP. This process is desktop environment independent, the GNOME/KDE network tools/manager frontends give unsufficient information when connecting to wireless networks, so I prepare this for being done through a terminal and textfile configuration.

As I have experimented, the problem commonly appears with the DHCP client-to-server communication (http://en.wikipedia.org/wiki/DHCP). The DHCP automates the private address assignation and makes easy the client configuration in order to access the Internet.

First, begin removing network-manager, cause it gives problems sometimes

Code: Select all
apt-get remove network-manager network-manager-gnome


There's the configuration of the interfaces file (/etc/network/interfaces), only the section that refers to the wireless interface. I have used this configuration in Debian GNU/Linux Etch, and it seems to work the majority of the times (The key should be specified in hexagesimal, with no spaces or dots, and I assume that the interface is called wlan0):

Code: Select all
auto wlan0
iface wlan0 inet dhcp
wireless-channel <the_channel>
wireless-essid <the_essid>
wireless-key open <the_key>


After configuring this, and doing no more changes on the system, if we reconfigure the interfaces (necessary after making any change in the configuration of any interface)

Code: Select all
sudo /etc/init.d/networking force-reload


the system responds with a sort of DHCP requests to which the AP doesn't respond:

Code: Select all
Reconfiguring network interfaces...Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/wlan0/00:80:5a:4d:4b:89
Sending on   LPF/wlan0/00:80:5a:4d:4b:89
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8


The solution to this concern can be reached through the configuration of the DHCP client, concretely the timeout parameter of the /etc/dhcp3/dhclient.conf, uncomment it and set it to 100 milliseconds:

Code: Select all
...
timeout 100;
...


Save and re-echo the reloading of the configuration:

Code: Select all
sudo /etc/init.d/networking force-reload


Now, the response of the system should be something like that:

Code: Select all
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/wlan0/00:80:5a:4d:4b:89
Sending on   LPF/wlan0/00:80:5a:4d:4b:89
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
DHCPOFFER from 192.168.1.1
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.1
bound to 192.168.1.130 -- renewal in 124957 seconds.
done.


The AP has given the .130 private IP adress. If there isn't any response yet, you can try to decrease the rate of the link before reconfiguring, supposing you have wireless-tools installed:

Code: Select all
iwconfig <interface> rate 1M


This solution has worked the majority of the times in my case. Having a low level signal is a problem, if you are too far from the AP, get closer and/or use an antenna (I use a homemade cantenna).
Last edited by jordi on 2008-02-11 19:24, edited 11 times in total.
Never trust a computer you can't throw out a window. (S. Wozniak)
Registered (GNU/)Linux User 464200.
User avatar
jordi
 
Posts: 39
Joined: 2006-12-25 20:03
Location: Catalan Countries

Postby isilia » 2007-11-21 15:09

I was about to write a wireless guide myself, are you already going to?
Cult of the sitting penguin!
User avatar
isilia
 
Posts: 112
Joined: 2007-11-10 15:31
Location: The Netherlands

Postby jordi » 2007-11-21 16:15

yeah!

if you want to collaborate, your contribution will be appreciated
Never trust a computer you can't throw out a window. (S. Wozniak)
Registered (GNU/)Linux User 464200.
User avatar
jordi
 
Posts: 39
Joined: 2006-12-25 20:03
Location: Catalan Countries

Postby isilia » 2007-11-21 19:38

I'll check if I can add anything useful to your guide ^^ I struggled with getting my wireless connection to work without any network manager yesterday, it really sucked.
Cult of the sitting penguin!
User avatar
isilia
 
Posts: 112
Joined: 2007-11-10 15:31
Location: The Netherlands

Postby jordi » 2007-11-23 10:03

I'd appreciate a bit of feedback, both if it works or if it not. Thank you.
Never trust a computer you can't throw out a window. (S. Wozniak)
Registered (GNU/)Linux User 464200.
User avatar
jordi
 
Posts: 39
Joined: 2006-12-25 20:03
Location: Catalan Countries

Postby isilia » 2007-11-25 01:52

Somehow I missed your post, I'll check your guide tomorrow (when I feel less sleepy!)
Cult of the sitting penguin!
User avatar
isilia
 
Posts: 112
Joined: 2007-11-10 15:31
Location: The Netherlands

Re: HOWTO: Making Wireless Connections Work

Postby williamdavid » 2013-10-08 03:55

Code: Select all
iwconfig <interface> rate 3M


I face a problem with this code.anyone solve this.This code no properly run.
williamdavid
 
Posts: 2
Joined: 2013-10-08 03:15


Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable