Wireless all of a sudden broken on Ubuntu

Soldato
Joined
2 May 2004
Posts
19,950
Hi,

Earlier today wireless just stopped working all of a sudden.

There were also a few other annoying problems due to me messing around, so I just reformatted and reinstalled Ubuntu as there's nothing on there I want to keep yet.

When I first installed Ubuntu the wireless card was set up automatically and the internet worked through wireless straight away without me touching anything.

But, this time, after the reformat the wireless would not work. I can't ping other network PCs, I can't ping the router, nothing.

Wireless is working for all other computers, so it's not a router problem.

Any ideas why it would have all of a sudden stopped working and then not configured itself when I reinstalled?

Thanks,
Craig.
 
$ ifconfig (or iwconfig)

check if you have an ip address

check /etc/rc.conf to see if your interfaces are set up correctly.
 
fumbles said:
$ ifconfig (or iwconfig)

check if you have an ip address

check /etc/rc.conf to see if your interfaces are set up correctly.

ifconfig only lists lo with the IP 127.0.0.1 - the wireless is ath0

Also, there's nothing in /etc/rc.conf :(

What confuses me is the fact that the first time i set up Ubuntu it configured the wireless perfectly for me.
 
Is this a dual boot system with windows?
If so does the wifi card work in windows? Maybe its faulty.

sounds like the wifi device is even detected/driver loaded.

try these two commands

iwconfig ath0 key * essid **
dhcpcd ath0

* wep or wpa key here, leave out key command if you don't have encryption enabled
** but the id name of you network here
 
tuxy said:
Is this a dual boot system with windows?
If so does the wifi card work in windows? Maybe its faulty.

sounds like the wifi device is even detected/driver loaded.

try these two commands

iwconfig ath0 key * essid **
dhcpcd ath0

* wep or wpa key here, out key command if you don't have encryption enabled
** but the id name of you network here

Nope, not a dual boot, just Ubuntu on it's own. This card was in a Windows PC about 2 days ago working perfectly & was working earlier today in Ubuntu perfectly.

Hmmm, dhcpcd ath0 says command not found.
 
Firstly find out what your wireless card is called,

sudo iwconfig (ill use eth1 as example - replace with your own)

Then sudo iwconfig eth1 essid whatever

sudo iwconfig eth1 key whatever

sudo dhclient eth1

That should sort it if driver is loaded and your using DHCP for ip allocation.
 
Done that, still doesn't seem to be working.

In iwconfig the connection now has the frequency, essid, the access point mac address etc. but I still can't ping anything.

Also, ath0 is now listed in ifconfig properly which I guess is a step further.

I'll reboot and check again.
 
Do you have an ip address in ifconfig ath0? If not your either not getting one correctly using sudo dhclient ath0 or setting it up correctly if your using static ips.
 
Una said:
Do you have an ip address in ifconfig ath0? If not your either not getting one correctly using sudo dhclient ath0 or setting it up correctly if your using static ips.

No, when I run dhclient ath0 it says this:

Listening on LPF/ath0/00:0f:2d:86:c0:70
Sending on LPF/ath0/00:0f:2d:86:c0:70
Sending on Socket/Fallback
DHCPDISCOVERY on ath0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVERY on ath0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVERY on ath0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVERY on ath0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVERY on ath0 to 255.255.255.255 port 67 interval 9
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

It's weird, in iwconfig it's picking up all the details of the network. The frequency, mac address, quality etc etc. but no IP and no proper connection.

Oh, and the router is picking the computer up in it's DHCP list, yet it cannot ping it and I cannot ping it from my main PC either. Argh :(
 
Last edited:
Craig321 said:
No, when I run dhclient ath0 it says this:



It's weird, in iwconfig it's picking up all the details of the network. The frequency, mac address, quality etc etc. but no IP and no proper connection.

Oh, and the router is picking the computer up in it's DHCP list, yet it cannot ping it and I cannot ping it from my main PC either. Argh :(

Of course you can't ping it if you don't have a valid subnet IP address.

Its odd though that you don't seem to be getting any DHCP offers. You may want to try static ip's instead.
 
Una said:
Of course you can't ping it if you don't have a valid subnet IP address.

Its odd though that you don't seem to be getting any DHCP offers. You may want to try static ip's instead.

Hmm, tried setting up static in the Ubuntu network manager but it doesn't seem to edit anything in iwconfig or ifconfig :(

How can I do it through the shell using something similar to dhclient?

Thanks,
Craig.
 
Yeah network manager is crap,

Best way to do it is to edit /etc/network/interfaces then restart networking.
 
Right then, I can finally ping my router which is a step further, but no internet.

The reason for now internet is the fact I'm on static when the router isn't setup for static, so all I can do at the moment is use the network.

I'm gonna need to set it to DHCP and get it working that way :(
 
You could just set the router as a static ip, then set it as your gateway and net will work.

If you understand packet dumps you can prolly work out what DHCP is doing..... I recommend wireshark if you do.
 
Woo yeah, got it!

I found a DHCP assign thingy in the router config which allows me to assign a static IP to a mac address meaning that IP is reserved for the PC with that MAC address.

Thanks very much for the help guys, now I can finally get back to playing with Ubuntu! :D

Craig.
 
Back
Top Bottom