个人工具

“UbuntuHelp:WifiDocs/WirelessTroubleShootingGuide”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/WifiDocs/WirelessTroubleShootingGuide}}
 
{{From|https://help.ubuntu.com/community/WifiDocs/WirelessTroubleShootingGuide}}
 
{{Languages|UbuntuHelp:WifiDocs/WirelessTroubleShootingGuide}}
 
{{Languages|UbuntuHelp:WifiDocs/WirelessTroubleShootingGuide}}
 
 
 
 
 
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconControlCenter2.png https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconFavourites.png https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconHammer2.png  https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconDustTape.png https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconArt-Small.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconControlCenter2.png https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconFavourites.png https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconHammer2.png  https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconDustTape.png https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconArt-Small.png
 
 
''WifiDocs/WiFiTroubleshooting should be merged into this document.''
 
''WifiDocs/WiFiTroubleshooting should be merged into this document.''
 
 
== Purpose ==
 
== Purpose ==
 
This guide can serve as a checklist for troubleshooting your wireless network connections. While it may not solve all your problems, it can hopefully steer you in the right direction.
 
This guide can serve as a checklist for troubleshooting your wireless network connections. While it may not solve all your problems, it can hopefully steer you in the right direction.
 
 
'''Before using this guide''', check to see if you already have a wireless connection set up.   
 
'''Before using this guide''', check to see if you already have a wireless connection set up.   
 
* To do this, open System > Administration > Networking. If you can see a "Wireless Connection" entry under the Connections tab, then you may have a working driver already installed and simply need to activate the card. Select the entry and click on the "Properties" button to the right.  Check "Enable this connection" and fill in the appropriate information below (SSID, network name, passcode, and connection settings).  When finished, click OK and wait for the system to activate your card.  If this does not produce a working connection, make sure you have entered all settings correctly, then consult the remainder of this guide to track down your problem(s).
 
* To do this, open System > Administration > Networking. If you can see a "Wireless Connection" entry under the Connections tab, then you may have a working driver already installed and simply need to activate the card. Select the entry and click on the "Properties" button to the right.  Check "Enable this connection" and fill in the appropriate information below (SSID, network name, passcode, and connection settings).  When finished, click OK and wait for the system to activate your card.  If this does not produce a working connection, make sure you have entered all settings correctly, then consult the remainder of this guide to track down your problem(s).
 
 
== Overview ==
 
== Overview ==
 
 
=== Steps ===
 
=== Steps ===
** The basic structure
+
* The basic structure
***** [[check Check for Device Recognition]]
+
** [[check Check for Device Recognition]]
***** [[driver Check for driver]]
+
*** [[driver Check for driver]]
***** [[connection Check for router connection]]
+
*** [[connection Check for router connection]]
***** [[ip Check for ip address assignment]]
+
*** [[ip Check for ip address assignment]]
***** [[dns Connected but no internet]]
+
*** [[dns Connected but no internet]]
 
+
 
* This structure is setup in a specific order. Do not move on until you get everything resolved in the current step. For example, step 3 is router association. You can not move on to the next step of ip assignment until you get router association. If you can't get past a step, look for more help in that specific area. Once it's resolved, move onto the next step.
 
* This structure is setup in a specific order. Do not move on until you get everything resolved in the current step. For example, step 3 is router association. You can not move on to the next step of ip assignment until you get router association. If you can't get past a step, look for more help in that specific area. Once it's resolved, move onto the next step.
 
 
=== Config files ===
 
=== Config files ===
** Any config file used in wireless will be listed with notes about the particular file
+
* Any config file used in wireless will be listed with notes about the particular file
 
+
 
=== Connected but no internet ===
 
=== Connected but no internet ===
** This section will be devoted to those who have a working wireless connection but other problems occur such as dropped signal. This is a fragmented work in progress currently.
+
* This section will be devoted to those who have a working wireless connection but other problems occur such as dropped signal. This is a fragmented work in progress currently.
 
+
 
=== Commands ===
 
=== Commands ===
** Reading through the commands section is not necessary for this guide, but could prove useful.
+
* Reading through the commands section is not necessary for this guide, but could prove useful.
** The first section contains the commands associated with troubleshooting wireless. Details about the command and some basics of what it does will be given. When going through the [[steps steps]], anywhere a command is given it will link to the command section.
+
* The first section contains the commands associated with troubleshooting wireless. Details about the command and some basics of what it does will be given. When going through the [[steps steps]], anywhere a command is given it will link to the command section.
** With each command will be an example with key points noted.
+
* With each command will be an example with key points noted.
** For more information on each command check the manual.
+
* For more information on each command check the manual.
***** ''man <command>''
+
** ''man <command>''
** Where a word appears inside <>. you need to input a value to complete the command. '''Do not''' include the <> symbols in your command.
+
* Where a word appears inside <>. you need to input a value to complete the command. '''Do not''' include the <> symbols in your command.
***** eg Where you see <ath0> you need to replace this with your device's logical name (could be ath0; wlan0; eth1; etc...)
+
** eg Where you see <ath0> you need to replace this with your device's logical name (could be ath0; wlan0; eth1; etc...)
 
+
 
[[Anchor(steps)]]
 
[[Anchor(steps)]]
 
 
 
== Troubleshooting Steps ==
 
== Troubleshooting Steps ==
 
 
[[Anchor(check)]]
 
[[Anchor(check)]]
 
 
=== Check Device ===
 
=== Check Device ===
 
 
Commands we'll be using in this section: [[lshw lshw]]  [[lspci lspci]] [[lsusb lsusb]]
 
Commands we'll be using in this section: [[lshw lshw]]  [[lspci lspci]] [[lsusb lsusb]]
 
 
 
==== PnP ====
 
==== PnP ====
 
+
* Most devices are plug and play but it is worth checking.
** Most devices are plug and play but it is worth checking.
+
 
+
 
{i} plug and Play is a term used in the computer field to describe a computer's ability to have new device, normally peripherals, added without having to reconfigure or restart the computer. It is not a term stating the device will work as described immediately. A driver has to be installed so the os can communicate with the device
 
{i} plug and Play is a term used in the computer field to describe a computer's ability to have new device, normally peripherals, added without having to reconfigure or restart the computer. It is not a term stating the device will work as described immediately. A driver has to be installed so the os can communicate with the device
****** To check if device is recognized use the [[lshw lshw]] command. If device shows up then you can check off step I
+
# To check if device is recognized use the [[lshw lshw]] command. If device shows up then you can check off step I
 
+
 
==== Non-recognized Card ====
 
==== Non-recognized Card ====
 
+
* Some devices are not recognized by the OS upon insertion. [Needs expansion.]
*** Some devices are not recognized by the OS upon insertion. [Needs expansion.]
+
*# If card doesn't show up immediately try these steps:
 
+
***** If card doesn't show up immediately try these steps:
+
 
+
 
Run the following command. ''Hopefully you'll get some output about the device.''
 
Run the following command. ''Hopefully you'll get some output about the device.''
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo pccardctl ident
 
sudo pccardctl ident
 
</nowiki></pre>
 
</nowiki></pre>
 
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
<pre><nowiki>
 
<pre><nowiki>
第80行: 第51行:
 
function: 6 (network)
 
function: 6 (network)
 
</nowiki></pre>
 
</nowiki></pre>
 
 
'''If you get no output then the memory on the card cannot be read.'''
 
'''If you get no output then the memory on the card cannot be read.'''
 
 
Now we need to open a configuration file and add this information to it:
 
Now we need to open a configuration file and add this information to it:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
gksudo gedit /etc/pcmcia/config.opts
 
gksudo gedit /etc/pcmcia/config.opts
 
</nowiki></pre>
 
</nowiki></pre>
 
 
the information you add should look like this, with your own data substituted.
 
the information you add should look like this, with your own data substituted.
 
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
<pre><nowiki>
 
<pre><nowiki>
第98行: 第64行:
 
bind "ath_pci"
 
bind "ath_pci"
 
</nowiki></pre>
 
</nowiki></pre>
 
 
After making this change run this command:
 
After making this change run this command:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo kill -HUP `cat /var/run/cardmgr.pid`
 
sudo kill -HUP `cat /var/run/cardmgr.pid`
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Now run [[lshw lshw]] to see if the card is recognized and loaded properly.
 
Now run [[lshw lshw]] to see if the card is recognized and loaded properly.
 
 
 
{i} Most cards requiring this step will be older devices. You should not have to do this with any cards made in the past few years, but there can be exceptions.
 
{i} Most cards requiring this step will be older devices. You should not have to do this with any cards made in the past few years, but there can be exceptions.
 
 
{i} Notice the bind line which states what driver should be allocated to the device. You will need to find what driver your device uses. More on that in the next step.
 
{i} Notice the bind line which states what driver should be allocated to the device. You will need to find what driver your device uses. More on that in the next step.
 
 
===== Problem with bridge in PCI bus line =====
 
===== Problem with bridge in PCI bus line =====
 
 
On several, especially new systems the Yenta bridge is not on the root PCI bridge, but behind a PCI-to-PCI bridge. On some x86 or x86_64 systems, these bridges aren't corrreclty set up by the BIOS, which may cause CardBus and even PCMCIA devices not to show up in lspci or in pccardctl ident correctly. If you suspect that this may be the cause, issue this command:
 
On several, especially new systems the Yenta bridge is not on the root PCI bridge, but behind a PCI-to-PCI bridge. On some x86 or x86_64 systems, these bridges aren't corrreclty set up by the BIOS, which may cause CardBus and even PCMCIA devices not to show up in lspci or in pccardctl ident correctly. If you suspect that this may be the cause, issue this command:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
lspci -v | grep subordinate
 
lspci -v | grep subordinate
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Its result may be like this:
 
Its result may be like this:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
Bus: primary=00, secondary=02, subordinate=04, sec-latency=64
 
Bus: primary=00, secondary=02, subordinate=04, sec-latency=64
第127行: 第82行:
 
Bus: primary=02, secondary=07, subordinate=0a, sec-latency=176
 
Bus: primary=02, secondary=07, subordinate=0a, sec-latency=176
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Let's decode the first line: bus 0 (primary) is bridged to busses 2 (secondary) to 4 (subordinate) by a bridge. The second and the third line state that bus 2 is bridged to busses 3-6, and 7-10. However, the CPU (which itself is connected to bus 0 through the root bridge) needs to be able to access all these busses. If you try to walk the tree to bus 7, for example, you see that the CPU can't get there, as bus 0 is only bridged to busses 2 to 4.
 
Let's decode the first line: bus 0 (primary) is bridged to busses 2 (secondary) to 4 (subordinate) by a bridge. The second and the third line state that bus 2 is bridged to busses 3-6, and 7-10. However, the CPU (which itself is connected to bus 0 through the root bridge) needs to be able to access all these busses. If you try to walk the tree to bus 7, for example, you see that the CPU can't get there, as bus 0 is only bridged to busses 2 to 4.
 
 
If this is the case, or you find a message stating "try pci=assign-busses" in the dmesg log, append the following to the kernel boot line:
 
If this is the case, or you find a message stating "try pci=assign-busses" in the dmesg log, append the following to the kernel boot line:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
pci=assign-busses
 
pci=assign-busses
 
</nowiki></pre>
 
</nowiki></pre>
 
 
 
==== System locks upon card insertion ====
 
==== System locks upon card insertion ====
 
 
When a card is first inserted, the system attempts to read the card's memory.  This can sometimes cause your system to lock-up. Try this to see if it helps:
 
When a card is first inserted, the system attempts to read the card's memory.  This can sometimes cause your system to lock-up. Try this to see if it helps:
 
 
1) Open the file /etc/pcmcia/config.opts
 
1) Open the file /etc/pcmcia/config.opts
 
 
<pre><nowiki>
 
<pre><nowiki>
 
gksudo gedit /etc/pcmcia/config.opts
 
gksudo gedit /etc/pcmcia/config.opts
 
</nowiki></pre>
 
</nowiki></pre>
 
 
2) Find the following section:
 
2) Find the following section:
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
第154行: 第100行:
 
include memory 0x60000000-0x60ffffff
 
include memory 0x60000000-0x60ffffff
 
</nowiki></pre>
 
</nowiki></pre>
 
 
3) Change it to look like this:
 
3) Change it to look like this:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
include memory 0xd0000-0xdffff
 
include memory 0xd0000-0xdffff
第163行: 第107行:
 
include memory 0xd8000-0xdffff
 
include memory 0xd8000-0xdffff
 
</nowiki></pre>
 
</nowiki></pre>
 
 
 
 
[[Anchor(driver)]]
 
[[Anchor(driver)]]
 
 
=== Device Drivers ===
 
=== Device Drivers ===
 
 
Commands we'll be using in this section: [[lshw lshw]] [[lsmod lsmod]] [[modprobe modprobe]]
 
Commands we'll be using in this section: [[lshw lshw]] [[lsmod lsmod]] [[modprobe modprobe]]
 
 
{i} Your device may be supported in Ubuntu with a native driver. Before anything else you should check to see if a driver automatically loaded. Use the [[lshw lshw]] command for this.
 
{i} Your device may be supported in Ubuntu with a native driver. Before anything else you should check to see if a driver automatically loaded. Use the [[lshw lshw]] command for this.
 
 
==== General device information ====
 
==== General device information ====
 
 
* [http://doc.gwos.org/index.php/Networkwifi UDSF networkwifi section]
 
* [http://doc.gwos.org/index.php/Networkwifi UDSF networkwifi section]
 
* [http://linux-wless.passys.nl/ Linux wireless devices.]
 
* [http://linux-wless.passys.nl/ Linux wireless devices.]
 
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconNote.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconNote.png
 
Devices using the ralink chipset are listed with the rt2x00 driver. the rt2x00 driver only works for kernels 2.6.13 or greater. For a kernel older then this you need to use rt2500 for pci devices or rt2570 for usb devices
 
Devices using the ralink chipset are listed with the rt2x00 driver. the rt2x00 driver only works for kernels 2.6.13 or greater. For a kernel older then this you need to use rt2500 for pci devices or rt2570 for usb devices
 
 
==== Native Linux Drivers ====
 
==== Native Linux Drivers ====
 
 
You can find general driver information, driver notes specific to ubuntu releases, and links to more help on the drivers [http://doc.gwos.org/index.php/Networkwifi here].
 
You can find general driver information, driver notes specific to ubuntu releases, and links to more help on the drivers [http://doc.gwos.org/index.php/Networkwifi here].
 
 
 
[[Anchor(ndisc)]]
 
[[Anchor(ndisc)]]
 
 
==== ndiswrapper for non supported cards ====
 
==== ndiswrapper for non supported cards ====
 
 
''Not all cards/devices have a linux driver. If you find your card is not supported you will have to look at an app called ndiswrapper.''
 
''Not all cards/devices have a linux driver. If you find your card is not supported you will have to look at an app called ndiswrapper.''
 
 
 
*[http://ndiswrapper.sourceforge.net/mediawiki/index.php/List You can check here to see if your card is supported by ndiswrapper.]
 
*[http://ndiswrapper.sourceforge.net/mediawiki/index.php/List You can check here to see if your card is supported by ndiswrapper.]
 
 
*[[UbuntuWiki:WifiDocs/Driver/Ndiswrapper|full information on ndiswrapper kept on this page]] including troubleshooting help specific to ndiswrapper.
 
*[[UbuntuWiki:WifiDocs/Driver/Ndiswrapper|full information on ndiswrapper kept on this page]] including troubleshooting help specific to ndiswrapper.
 
 
Sometimes ndiswrapper is used prematurely. There may be a native driver that comes with Ubuntu which is taking the primary driver position and conflicting with ndiswrapper. In such cases, if the native driver does not work properly with your card you want to use ndiswrapper, you can blacklist the native driver, by adding a file to ''/etc/modprobe.d/'' . The file name must begin with the ''blacklist'' prefix. In this file you can blacklist modules (so that they will not be loaded upon card chipset recognition) with the following syntax :
 
Sometimes ndiswrapper is used prematurely. There may be a native driver that comes with Ubuntu which is taking the primary driver position and conflicting with ndiswrapper. In such cases, if the native driver does not work properly with your card you want to use ndiswrapper, you can blacklist the native driver, by adding a file to ''/etc/modprobe.d/'' . The file name must begin with the ''blacklist'' prefix. In this file you can blacklist modules (so that they will not be loaded upon card chipset recognition) with the following syntax :
 
 
<pre><nowiki>
 
<pre><nowiki>
 
blacklist modulename
 
blacklist modulename
 
</nowiki></pre>
 
</nowiki></pre>
 
 
For example, if you own a D-Link DWL-G520+ card which uses the ACX111 chipset, and you plan to use the ndiswrapper module, you have to blacklist the acx module, by creating the file ''/etc/modprobe.d/blacklist-acx'' with a single line inside which states :
 
For example, if you own a D-Link DWL-G520+ card which uses the ACX111 chipset, and you plan to use the ndiswrapper module, you have to blacklist the acx module, by creating the file ''/etc/modprobe.d/blacklist-acx'' with a single line inside which states :
 
 
<pre><nowiki>
 
<pre><nowiki>
 
blacklist acx
 
blacklist acx
 
</nowiki></pre>
 
</nowiki></pre>
 
 
==== Check driver ====
 
==== Check driver ====
 
 
''If you ran [[lshw lshw]] and saw a driver bound to the device then let's test to make sure it's communicating to the kernel.''
 
''If you ran [[lshw lshw]] and saw a driver bound to the device then let's test to make sure it's communicating to the kernel.''
*** run the command [[lsmod lsmod]] to see if driver is loaded. (look for the name that was listed under lshw). If you did not see it in the list then use the [[modprobe modprobe]] command to load it.
+
# run the command [[lsmod lsmod]] to see if driver is loaded. (look for the name that was listed under lshw). If you did not see it in the list then use the [[modprobe modprobe]] command to load it.
*** run the command [[iwconfig iwconfig]]. If you see out put like in the example in the command section then the driver is at least identifying the device as a wireless device to the kernel.
+
# run the command [[iwconfig iwconfig]]. If you see out put like in the example in the command section then the driver is at least identifying the device as a wireless device to the kernel.
a. Opening networking in system>administration> and seeing the device in the list is how to identify through gui if driver is at least communicating to the kernel at a basic level.
+
## Opening networking in system>administration> and seeing the device in the list is how to identify through gui if driver is at least communicating to the kernel at a basic level.
*** run the command [[iwlist iwlist]] to scan for a router. If an access point is identified this is a second identifier which shows the driver as communicating and shows that it's probably working as it can complete a wireless interface task. (note not all cards support scanning so this may not work for you)
+
# run the command [[iwlist iwlist]] to scan for a router. If an access point is identified this is a second identifier which shows the driver as communicating and shows that it's probably working as it can complete a wireless interface task. (note not all cards support scanning so this may not work for you)
 
+
 
==== Driver looks ok, device disabled ====
 
==== Driver looks ok, device disabled ====
 
 
Newer laptops come with features to disable the wireless radio to save battery when not in use. Usually this is switched by a FN+Fx key combo or specific button for the purpose. It is possible driver and everything is ok but the wireless device is in the disabled state and can't be used. Using the designated key(s) in linux sometimes does not work.
 
Newer laptops come with features to disable the wireless radio to save battery when not in use. Usually this is switched by a FN+Fx key combo or specific button for the purpose. It is possible driver and everything is ok but the wireless device is in the disabled state and can't be used. Using the designated key(s) in linux sometimes does not work.
 
 
Usually this is apparent by running the [[lshw lshw]] command you see <code><nowiki>*-network:1 DISABLED</nowiki></code> or if you run the [[iwconfig iwconfig]] command you see <code><nowiki>eth1      NOT READY!</nowiki></code>.
 
Usually this is apparent by running the [[lshw lshw]] command you see <code><nowiki>*-network:1 DISABLED</nowiki></code> or if you run the [[iwconfig iwconfig]] command you see <code><nowiki>eth1      NOT READY!</nowiki></code>.
 
 
So how do you rectify this? It varies so much the exact solution can't be put here in this document for all the different models. So...
 
So how do you rectify this? It varies so much the exact solution can't be put here in this document for all the different models. So...
** Look at the Ubuntu:LaptopTestingTeam page on the team wiki to see if your laptop is listed with any information.
+
# Look at the Ubuntu:LaptopTestingTeam page on the team wiki to see if your laptop is listed with any information.
** Do a google search using terms such as manufacture, model, linux, wireless, enable, button, radio....etc. When searching and finding similar pages that don't help, use words that are used in those pages to help you search.
+
# Do a google search using terms such as manufacture, model, linux, wireless, enable, button, radio....etc. When searching and finding similar pages that don't help, use words that are used in those pages to help you search.
** Go to the [http://ubuntuforums.org ubuntu forums] and ask, maybe someone else has the same laptop and knows the work around.
+
# Go to the [http://ubuntuforums.org ubuntu forums] and ask, maybe someone else has the same laptop and knows the work around.
 
+
 
+
 
[[Anchor(connection)]]
 
[[Anchor(connection)]]
 
 
=== Router Connection ===
 
=== Router Connection ===
 
 
Commands we'll be using in this section: [[iwconfig iwconfig]]
 
Commands we'll be using in this section: [[iwconfig iwconfig]]
 
+
* With the driver loaded go to the panel System>Administration>Networking. Highlight your device and click properties. Enter your networking info, click ok then try to activate.
*** With the driver loaded go to the panel System>Administration>Networking. Highlight your device and click properties. Enter your networking info, click ok then try to activate.
+
*# You should see an applet in the panel showing a connection. (You may need to set properties to show correct interface)
 
+
*## You can check if you're associated to router by running the command [[iwconfig iwconfig]].
***** You should see an applet in the panel showing a connection. (You may need to set properties to show correct interface)
+
* You can also connect to the router via the command line using the command [[iwconfig iwconfig]]. The syntax looks like this.
***** You can check if you're associated to router by running the command [[iwconfig iwconfig]].
+
 
+
*** You can also connect to the router via the command line using the command [[iwconfig iwconfig]]. The syntax looks like this.
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo iwconfig <ath0> essid <essid> ap <xx:xx:xx:xx:xx:> key <XXX> mode <> commit
 
sudo iwconfig <ath0> essid <essid> ap <xx:xx:xx:xx:xx:> key <XXX> mode <> commit
 
</nowiki></pre>
 
</nowiki></pre>
 
 
''~-note: not all these may be used, check the '''man page''' for more informatin-~''
 
''~-note: not all these may be used, check the '''man page''' for more informatin-~''
 
+
* If you can not connect to the router then try these.
*** If you can not connect to the router then try these.
+
*# Change to an open signal (instead of wep or wpa). This may be an unattractive option but it's a short term one to make sure the card and ap can connect. Once you've verified this then you can add encryption back in.
***** Change to an open signal (instead of wep or wpa). This may be an unattractive option but it's a short term one to make sure the card and ap can connect. Once you've verified this then you can add encryption back in.
+
*## When using wep more people seem to have success using an open key instead of shared and a hexadecimal method instead of ascii. But there should be no reason any setting shouldn't work. Try the settings you want and consider adjusting if you have problems.
a. When using wep more people seem to have success using an open key instead of shared and a hexadecimal method instead of ascii. But there should be no reason any setting shouldn't work. Try the settings you want and consider adjusting if you have problems.
+
*### To get wpa working you will need to install the wpasupplicant from the repositories. There are instructions for various drivers on using wpa. See notes on wpa below.
a. To get wpa working you will need to install the wpasupplicant from the repositories. There are instructions for various drivers on using wpa. See notes on wpa below.
+
*## Download a scanner such as [[UbuntuHelp:NetworkManager|network manager]], [http://ubuntuforums.org/forumdisplay.php?f=74/ gtk wifi], or [http://www.bitbuilder.com/wifi_radar/ wifi radar]. ~-of course this is not an option if you can not connect to the internet without wireless-~
***** Download a scanner such as [[UbuntuHelp:NetworkManager|network manager]], [http://ubuntuforums.org/forumdisplay.php?f=74/ gtk wifi], or [http://www.bitbuilder.com/wifi_radar/ wifi radar]. ~-of course this is not an option if you can not connect to the internet without wireless-~
+
*## Try booting with kernel option pci=noacpi or acpi=off as acpi sometimes conflicts with network devices. The second option will affect power management.
***** Try booting with kernel option pci=noacpi or acpi=off as acpi sometimes conflicts with network devices. The second option will affect power management.
+
*## Check for firmware update on the router and update it if there is newer firmware available.
***** Check for firmware update on the router and update it if there is newer firmware available.
+
 
+
 
==== Notes on wep ====
 
==== Notes on wep ====
 
 
* [https://www.ubuntulinux.org/support/documentation/faq/helpcenterfaq.2004-10-07.0031507315/ ubuntu wep faq]
 
* [https://www.ubuntulinux.org/support/documentation/faq/helpcenterfaq.2004-10-07.0031507315/ ubuntu wep faq]
 
* If you have a 10 digit wep key try entering it in this format xxxx-xxxx-xx (include dashes)
 
* If you have a 10 digit wep key try entering it in this format xxxx-xxxx-xx (include dashes)
 
* Use an open setting instead of shared when using wep
 
* Use an open setting instead of shared when using wep
 
* When using wep, check driver files such as README as some drivers need a command to adjust the mode to work properly. Here are a couple examples.
 
* When using wep, check driver files such as README as some drivers need a command to adjust the mode to work properly. Here are a couple examples.
**** Madwifi driver needs to change to authmode 2 when using shared key setting.
+
** Madwifi driver needs to change to authmode 2 when using shared key setting.
******manually from command line  ''iwpriv ath0 authmode 2''
+
*manually from command line  ''iwpriv ath0 authmode 2''
******add line ''pre-up iwpriv ath0 authmode 2'' to interfaces file to automate during boot
+
*add line ''pre-up iwpriv ath0 authmode 2'' to interfaces file to automate during boot
**** For ipw2200 driver interface file should say ''wireless-key restricted <key>''
+
* For ipw2200 driver interface file should say ''wireless-key restricted <key>''
 
+
 
==== Notes on wpa ====
 
==== Notes on wpa ====
 
 
* [http://hostap.epitest.fi/ Information on host AP; hostapd; wpa_supplicant]
 
* [http://hostap.epitest.fi/ Information on host AP; hostapd; wpa_supplicant]
 
* [https://wiki.ubuntu.com/WifiDocs/Driver/Ndiswrapper ndiswrapper w/ wpa]
 
* [https://wiki.ubuntu.com/WifiDocs/Driver/Ndiswrapper ndiswrapper w/ wpa]
第275行: 第177行:
 
* [http://doc.gwos.org/index.php/Ipw2200_wpa ipw2200 and WPA]
 
* [http://doc.gwos.org/index.php/Ipw2200_wpa ipw2200 and WPA]
 
* [http://www.madwifi.org/wiki/UserDocs/802.11i madwifi/atheros and wpa]
 
* [http://www.madwifi.org/wiki/UserDocs/802.11i madwifi/atheros and wpa]
 
 
 
{i} There have been a few posts where no association is established with router even on an open signal. At the point of writing this line, no answer has been seen to why this happens. A router reboot has been noted once to resolve but in other situations has caused heartache as network settings need to be set up again. Booting with acpi=off or noapci should be tried.
 
{i} There have been a few posts where no association is established with router even on an open signal. At the point of writing this line, no answer has been seen to why this happens. A router reboot has been noted once to resolve but in other situations has caused heartache as network settings need to be set up again. Booting with acpi=off or noapci should be tried.
 
 
[[Anchor(ip)]]
 
[[Anchor(ip)]]
 
 
=== ip assignment ===
 
=== ip assignment ===
 
 
''Now that you have association to the router did you get an ip assigned to the device? This can be checked two ways.''
 
''Now that you have association to the router did you get an ip assigned to the device? This can be checked two ways.''
**** Run the command [[ifconfig ifconfig]] and look for an assigned ip.
+
# Run the command [[ifconfig ifconfig]] and look for an assigned ip.
**** You can always try to [[ping ping]] the router with the routers ip. A lot of home routers use something similar to 192.168.0.1 You'll have to find what that ip address is to ping.
+
2. You can always try to [[ping ping]] the router with the routers ip. A lot of home routers use something similar to 192.168.0.1 You'll have to find what that ip address is to ping.
 
+
 
''If you do not have an ip then here are things to try''
 
''If you do not have an ip then here are things to try''
**** Using DHCP
+
* Using DHCP
 
+
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo dhclient <ath0>
 
sudo dhclient <ath0>
第298行: 第193行:
 
</nowiki></pre>
 
</nowiki></pre>
 
~-after running the invoke-rc.d command try dhclient ath0 again-~
 
~-after running the invoke-rc.d command try dhclient ath0 again-~
 
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconNote.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconNote.png
 
You may want to try and reboot making sure your networking [[config interfaces]] file is set up properly.
 
You may want to try and reboot making sure your networking [[config interfaces]] file is set up properly.
 
 
If you can connect to the router, but can't get an ip, it may be because you put the wrong WEP key in.  
 
If you can connect to the router, but can't get an ip, it may be because you put the wrong WEP key in.  
 
 
* Using Static ip assignment
 
* Using Static ip assignment
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo ifconfig <ath0> down
 
sudo ifconfig <ath0> down
 
</nowiki></pre>
 
</nowiki></pre>
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo ifconfig ip addr 192.168.x.x netmask 255.255.255.0 broadcast 192.168.x.255 up
 
sudo ifconfig ip addr 192.168.x.x netmask 255.255.255.0 broadcast 192.168.x.255 up
 
</nowiki></pre>
 
</nowiki></pre>
 
 
where the x = an ip address in your network range.
 
where the x = an ip address in your network range.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo route add default gw <router_ip> dev <ath0>
 
sudo route add default gw <router_ip> dev <ath0>
 
</nowiki></pre>
 
</nowiki></pre>
 
+
* Now try to [[ping ping]] your router and a website. If you're connected now and have an ip assigned but can not surf website then move on to next section.
** Now try to [[ping ping]] your router and a website. If you're connected now and have an ip assigned but can not surf website then move on to next section.
+
* You will need to make sure your [[config interfaces]] file is set up properly so you get internet again when you reboot
** You will need to make sure your [[config interfaces]] file is set up properly so you get internet again when you reboot
+
 
+
 
[[Anchor(dns)]]
 
[[Anchor(dns)]]
 
 
=== Connected but no internet ===
 
=== Connected but no internet ===
 
 
==== DNS ====
 
==== DNS ====
 
 
''If you don't know what DNS means or what it does you can go [http://en.wikipedia.org/wiki/Domain_name_system here] to read more. Basically it takes a common name such as www.google.com and searches a database to find the ip address of google. Then it actually transfers the request to download the web page via the ip address. If you are connected to your router and have an ip address assigned to your wireless device but can't search the web, you will need to check to see if you have a DNS nameserver set''
 
''If you don't know what DNS means or what it does you can go [http://en.wikipedia.org/wiki/Domain_name_system here] to read more. Basically it takes a common name such as www.google.com and searches a database to find the ip address of google. Then it actually transfers the request to download the web page via the ip address. If you are connected to your router and have an ip address assigned to your wireless device but can't search the web, you will need to check to see if you have a DNS nameserver set''
 
+
* A simple test to see if it's a DNS server setting is to use the [[ping ping]] command. If you can ping an external site via ip address but can't load a web page in your browser then it is possible you have a dns server problem.
*** A simple test to see if it's a DNS server setting is to use the [[ping ping]] command. If you can ping an external site via ip address but can't load a web page in your browser then it is possible you have a dns server problem.
+
* Check this file to see if there is a dns server listed.
 
+
 
+
*** Check this file to see if there is a dns server listed.
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
 
cat /etc/resolv.conf
 
cat /etc/resolv.conf
 
</nowiki></pre>
 
</nowiki></pre>
 
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
<pre><nowiki>
 
<pre><nowiki>
第346行: 第224行:
 
nameserver 209.53.4.150
 
nameserver 209.53.4.150
 
</nowiki></pre>
 
</nowiki></pre>
 
+
* You can find your dns settings if you have a working windows machine
*** You can find your dns settings if you have a working windows machine
+
** For a Win 95/98 box click start>run then type `winipcfg`. Choose the correct adapter and then more. In the sample above, replace telus.net with what's in the "Host Name" box. name server will equal what's in the dns server box.
***** For a Win 95/98 box click start>run then type `winipcfg`. Choose the correct adapter and then more. In the sample above, replace telus.net with what's in the "Host Name" box. name server will equal what's in the dns server box.
+
*** For a Win 2000/xp box click Start>Run...type cmd click ok. type `ipconfig /all`. In the sample above, replace telus.net with what's next to the field ''Connection-Specific DNS suffix. For name server look next to the line DNS servers.
***** For a Win 2000/xp box click Start>Run...type cmd click ok. type `ipconfig /all`. In the sample above, replace telus.net with what's next to the field   ''Connection-Specific DNS suffix. For name server look next to the line DNS servers.
+
* Your DNS server settings can also be found out by calling your isp provider and asking them.
*** Your DNS server settings can also be found out by calling your isp provider and asking them.
+
 
+
 
You can set up your dns settings so they don't change.<br>
 
You can set up your dns settings so they don't change.<br>
*** StaticDnsWithDhcp:StaticDnsWithDhcp
+
* StaticDnsWithDhcp:StaticDnsWithDhcp
 
+
 
[[Anchor(ipv6)]]
 
[[Anchor(ipv6)]]
 
 
==== IPV6 ====
 
==== IPV6 ====
 
 
''The internet standard is currently considered ipv4. The new standard, ipv6, is slowly being implemented to replace ipv4. Because it's not widely used at the moment, ipv6 can cause problems. It is enabled by default in Ubuntu. This can cause no internet if above seems ok.''
 
''The internet standard is currently considered ipv4. The new standard, ipv6, is slowly being implemented to replace ipv4. Because it's not widely used at the moment, ipv6 can cause problems. It is enabled by default in Ubuntu. This can cause no internet if above seems ok.''
 
+
* Firefox specific
*** Firefox specific
+
** In the address bar type ''about:config''. Find this line ''network.dns.disableIPv6'' and double click on it to change the value to ''true''.
***** In the address bar type ''about:config''. Find this line ''network.dns.disableIPv6'' and double click on it to change the value to ''true''.
+
* System wide
 
+
** Open the file /etc/modprobe.d/aliases<br> Add the first three lines to the file. The line with # starting is already in the file. Find it and add the # in front of it.
*** System wide
+
***** Open the file /etc/modprobe.d/aliases<br> Add the first three lines to the file. The line with # starting is already in the file. Find it and add the # in front of it.
+
 
+
 
alias net-pf-10 ipv6 off<br>
 
alias net-pf-10 ipv6 off<br>
 
alias net-pf-10 off<br>
 
alias net-pf-10 off<br>
 
alias ipv6 off<br>
 
alias ipv6 off<br>
 
#alias net-pf-10 ipv6
 
#alias net-pf-10 ipv6
 
 
''After making these changes a reboot is required.''
 
''After making these changes a reboot is required.''
 
 
[[Anchor(config)]]
 
[[Anchor(config)]]
 
 
== Config Files ==
 
== Config Files ==
 
+
* The following is a list of important config files used with wireless
*** The following is a list of important config files used with wireless
+
** /etc/network/interfaces<br>''This is where your inteface settings for the network are kept'' [http://www.linuxplanet.com/linuxplanet/tutorials/5736/3/ sample]
 
+
**# ''man interfaces'' has information about this file.
***** /etc/network/interfaces<br>''This is where your inteface settings for the network are kept'' [http://www.linuxplanet.com/linuxplanet/tutorials/5736/3/ sample]
+
**# For a little more detailed info on the interfaces file look at the file in /usr/share/doc/ifupdown/examples/network-interfaces.gz. You can read through it with the ''cat'' command and then adding ''| less'' to the end of the command.
1. ''man interfaces'' has information about this file.
+
**# For pcmcia users who want to start your card at boot do not use an ''auto'' stanza. add map <ath0> to the file. So here is an example of what it would look like.
1. For a little more detailed info on the interfaces file look at the file in /usr/share/doc/ifupdown/examples/network-interfaces.gz. You can read through it with the ''cat'' command and then adding ''| less'' to the end of the command.
+
# Check your routers settings to ensure it can accept another connection.
1. For pcmcia users who want to start your card at boot do not use an ''auto'' stanza. add map <ath0> to the file. So here is an example of what it would look like.
+
## Check your /etc/network/intefaces file. You should have something similar to this:
*** Check your routers settings to ensure it can accept another connection.
+
**** Check your /etc/network/intefaces file. You should have something similar to this:
+
 
+
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
<pre><nowiki>
 
<pre><nowiki>
第392行: 第256行:
 
auto lo
 
auto lo
 
iface lo inet loopback
 
iface lo inet loopback
 
 
# This is a list of hotpluggable network interfaces.
 
# This is a list of hotpluggable network interfaces.
 
# They will be activated automatically by the hotplug subsystem.
 
# They will be activated automatically by the hotplug subsystem.
第399行: 第262行:
 
#      script grep
 
#      script grep
 
#      map eth0
 
#      map eth0
 
 
#echo connects ath0 when device is hotplugged. using echo instead of grep allows any device to be brought up when hotplugged. Note this could cause a problem if a device is active and another one that is mapped is plugged in.
 
#echo connects ath0 when device is hotplugged. using echo instead of grep allows any device to be brought up when hotplugged. Note this could cause a problem if a device is active and another one that is mapped is plugged in.
 
mapping hotplug
 
mapping hotplug
 
script echo
 
script echo
 
map ath0
 
map ath0
 
 
#interfce of ath0 device with wep setting (not all these lines are required but show you options that may be needed)
 
#interfce of ath0 device with wep setting (not all these lines are required but show you options that may be needed)
 
iface <ath0> inet dhcp
 
iface <ath0> inet dhcp
第414行: 第275行:
 
wireless-key s:xxx (add s: in front of key if ascii form)
 
wireless-key s:xxx (add s: in front of key if ascii form)
 
wireless-key XXXXXXXXXX open|restricted (if using shared/restricted setting add this line)
 
wireless-key XXXXXXXXXX open|restricted (if using shared/restricted setting add this line)
 
 
auto <ath0>
 
auto <ath0>
 
</nowiki></pre>
 
</nowiki></pre>
***** /etc/resolv.conf<br>''Where your DNS server settings are kept''
+
* /etc/resolv.conf<br>''Where your DNS server settings are kept''
***** /etc/modules<br>''If a driver won't load at boot, you can add it to this list so it does''
+
* /etc/modules<br>''If a driver won't load at boot, you can add it to this list so it does''
***** /etc/modprobe.d/blacklist<br>''If you don't want a driver to load at boot you add it to this list. Usually this is used if you have a driver conflict and you want to make sure a specific driver is used. Note: this method will not work unless it is a LKM (loadable kernel module) If driver/mod was compiled into the base kernel, it will still load if on blacklist.''
+
* /etc/modprobe.d/blacklist<br>''If you don't want a driver to load at boot you add it to this list. Usually this is used if you have a driver conflict and you want to make sure a specific driver is used. Note: this method will not work unless it is a LKM (loadable kernel module) If driver/mod was compiled into the base kernel, it will still load if on blacklist.''
 
+
 
[[Anchor(special)]]
 
[[Anchor(special)]]
 
 
== Connection Established, Problems Persist ==
 
== Connection Established, Problems Persist ==
 
 
This section is reserved for solutions to problems where you can get connected but the connection is unstable. If you find a solution to your problem that's not here, please edit this page and add your solution.
 
This section is reserved for solutions to problems where you can get connected but the connection is unstable. If you find a solution to your problem that's not here, please edit this page and add your solution.
 
 
=== Dropped Connections ===
 
=== Dropped Connections ===
*** One common problem is channel interference. Cordless phones and other wireless devices can interrupt your wireless connection.  If you are having a problem with dropped connections then try using a different channel.
+
# One common problem is channel interference. Cordless phones and other wireless devices can interrupt your wireless connection.  If you are having a problem with dropped connections then try using a different channel.
*** Network-Manager; Wifi-radar; and gtk wifi can cause dropped signals every so often as they scan the interfaces, causing the connection to drop. You can try uninstalling these apps to see if your problem goes away, but doing so will remove any GUI tools that you may or may not have been using to configure and monitor your wireless connections.  If removing these tools solves your problem, please file a bug report on the product's launchpad page to help improve the app's performance.
+
2. Network-Manager; Wifi-radar; and gtk wifi can cause dropped signals every so often as they scan the interfaces, causing the connection to drop. You can try uninstalling these apps to see if your problem goes away, but doing so will remove any GUI tools that you may or may not have been using to configure and monitor your wireless connections.  If removing these tools solves your problem, please file a bug report on the product's launchpad page to help improve the app's performance.
 
+
 
=== Connected, Issues with Certain Websites ===
 
=== Connected, Issues with Certain Websites ===
*** Disable [[ipv6 IPV6]].
+
# Disable [[ipv6 IPV6]].
 
+
 
=== Incorrect Driver Loads at Boot ===
 
=== Incorrect Driver Loads at Boot ===
*** Some devices will have multiple drivers, and some will function better than others. To prevent a specific driver from loading during boot, read the [[modprobe modprobe]] command section.
+
# Some devices will have multiple drivers, and some will function better than others. To prevent a specific driver from loading during boot, read the [[modprobe modprobe]] command section.
 
+
 
[[Anchor(commands)]]
 
[[Anchor(commands)]]
 
 
 
== Commands ==
 
== Commands ==
 
 
This section gives a real brief summary of commands used to help you troubleshoot. There are also examples of the commands discussed. For more information, consult the man page of the command or do a google search.
 
This section gives a real brief summary of commands used to help you troubleshoot. There are also examples of the commands discussed. For more information, consult the man page of the command or do a google search.
 
[[Anchor(lshw)]]
 
[[Anchor(lshw)]]
 
 
=== lshw ===
 
=== lshw ===
 
 
This command shows information about hardware:
 
This command shows information about hardware:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo lshw
 
sudo lshw
 
</nowiki></pre>
 
</nowiki></pre>
 
 
(!) We can limit the the output to show just specific devices by adding options to the command:
 
(!) We can limit the the output to show just specific devices by adding options to the command:
 
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo lshw -businfo
 
sudo lshw -businfo
 
</nowiki></pre>
 
</nowiki></pre>
 
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
 
{|border="1" cellspacing="0"
 
{|border="1" cellspacing="0"
 
|BusInfo||Device||Class||Description
 
|BusInfo||Device||Class||Description
第472行: 第314行:
 
|}
 
|}
 
<br>
 
<br>
 
 
(!) You can then use a different option to limit output so it shows just your networking devices.
 
(!) You can then use a different option to limit output so it shows just your networking devices.
 
Find your device in the list and notice it's class then:
 
Find your device in the list and notice it's class then:
第478行: 第319行:
 
sudo lshw -C <class>
 
sudo lshw -C <class>
 
</nowiki></pre>
 
</nowiki></pre>
 
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
<pre><nowiki>
 
<pre><nowiki>
 
 
*-network
 
*-network
 
description: Wireless interface
 
description: Wireless interface
第497行: 第336行:
 
resources: iomemory:10800000-1080ffff irq:11
 
resources: iomemory:10800000-1080ffff irq:11
 
</nowiki></pre>
 
</nowiki></pre>
 
 
 
'''''Key Points'''''
 
'''''Key Points'''''
** Notice the configuration line. This area will tell you if there is a driver loaded for your device. (except devices using orinoco driver, these don't show here) If you do not see a driver listed here then there is not one loaded and assigned to the device and it will not show up in iwconfig output or the nework-admin gui.
+
# Notice the configuration line. This area will tell you if there is a driver loaded for your device. (except devices using orinoco driver, these don't show here) If you do not see a driver listed here then there is not one loaded and assigned to the device and it will not show up in iwconfig output or the nework-admin gui.
** The businfo line has importance as some devices are recognized and memory is readable but the device is not physically on the bus. This is rare but it has been seen. It may seem cryptic but your output will vary greatly and there needs to be some characters (other then 0) here denoting it's place in the pci bus.
+
2. The businfo line has importance as some devices are recognized and memory is readable but the device is not physically on the bus. This is rare but it has been seen. It may seem cryptic but your output will vary greatly and there needs to be some characters (other then 0) here denoting it's place in the pci bus.
 
+
 
''TODO: describe what it means when it shows `*-network UNCLAIMED`, and no `configuration` line is present.''
 
''TODO: describe what it means when it shows `*-network UNCLAIMED`, and no `configuration` line is present.''
 
 
[[Anchor(lspci)]]
 
[[Anchor(lspci)]]
 
 
=== lspci ===
 
=== lspci ===
 
 
This command lists information about devices on the pci bus:
 
This command lists information about devices on the pci bus:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
lspci -v
 
lspci -v
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Lists out pci devices with information about the device. (information is different then output from lshw)
 
Lists out pci devices with information about the device. (information is different then output from lshw)
 
 
 
(!) You can limit the output by piping the output with grep
 
(!) You can limit the output by piping the output with grep
 
 
<pre><nowiki>
 
<pre><nowiki>
 
lspci -v | grep Ethernet
 
lspci -v | grep Ethernet
 
</nowiki></pre>
 
</nowiki></pre>
 
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
<pre><nowiki>
 
<pre><nowiki>
第532行: 第359行:
 
Capabilities: [44] Power Management version 2
 
Capabilities: [44] Power Management version 2
 
</nowiki></pre>
 
</nowiki></pre>
 
 
command:
 
command:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo lspci -n
 
sudo lspci -n
 
</nowiki></pre>
 
</nowiki></pre>
 
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
<pre><nowiki>
 
<pre><nowiki>
 
0000:03:00.0 0200: '''168c:0013''' (rev 01)
 
0000:03:00.0 0200: '''168c:0013''' (rev 01)
 
</nowiki></pre>
 
</nowiki></pre>
 
 
'''Key Points'''
 
'''Key Points'''
** This command shows the revision of the card (in above example the revision of the card is B5 not 01).
+
# This command shows the revision of the card (in above example the revision of the card is B5 not 01).
** Using the -n option you can find the PCI ID (168C:0013) of the card and find the correct driver to use with ndiswrapper. [http://ndiswrapper.sourceforge.net/mediawiki/index.php/list ndiswrapper list]
+
# Using the -n option you can find the PCI ID (168C:0013) of the card and find the correct driver to use with ndiswrapper. [http://ndiswrapper.sourceforge.net/mediawiki/index.php/list ndiswrapper list]
 
+
 
+
 
[[Anchor(lsusb)]]
 
[[Anchor(lsusb)]]
 
 
=== lsusb ===
 
=== lsusb ===
 
 
This command lists information about devices on the usb bus.
 
This command lists information about devices on the usb bus.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo lsusb -v
 
sudo lsusb -v
 
</nowiki></pre>
 
</nowiki></pre>
 
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
<pre><nowiki>
 
<pre><nowiki>
第568行: 第386行:
 
Bus 002 Device 001: ID 0000:0000
 
Bus 002 Device 001: ID 0000:0000
 
</nowiki></pre>
 
</nowiki></pre>
 
 
 
[[Anchor(lsmod)]]
 
[[Anchor(lsmod)]]
 
 
=== lsmod ===
 
=== lsmod ===
 
 
This command simply shows what modules are loaded and running.
 
This command simply shows what modules are loaded and running.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo lsmod
 
sudo lsmod
 
</nowiki></pre>
 
</nowiki></pre>
 
 
 
(!) When the command [[lshw lshw]] was run, you saw the name of the driver allocated to the device. You can pipe this command through grep to limit the output.
 
(!) When the command [[lshw lshw]] was run, you saw the name of the driver allocated to the device. You can pipe this command through grep to limit the output.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
lsmod | grep ath
 
lsmod | grep ath
 
</nowiki></pre>
 
</nowiki></pre>
 
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
<pre><nowiki>
 
<pre><nowiki>
第594行: 第403行:
 
ath_hal              148432  3 ath_pci,ath_rate_sample
 
ath_hal              148432  3 ath_pci,ath_rate_sample
 
</nowiki></pre>
 
</nowiki></pre>
 
 
[[Anchor(modprobe)]]
 
[[Anchor(modprobe)]]
 
 
=== modprobe ===
 
=== modprobe ===
 
 
modprobe runs or stops a module from running. Most wireless drivers in breezy are in a module form. The following commands remove or add a module.
 
modprobe runs or stops a module from running. Most wireless drivers in breezy are in a module form. The following commands remove or add a module.
 
 
 
{i} When a recognized device loads, the kernel automatically loads the correct module for the device. This command is only needed to manually run a module
 
{i} When a recognized device loads, the kernel automatically loads the correct module for the device. This command is only needed to manually run a module
 
 
To start a module run this command:
 
To start a module run this command:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo modprobe <module>
 
sudo modprobe <module>
 
</nowiki></pre>
 
</nowiki></pre>
 
To stop and remove a module run this command:
 
To stop and remove a module run this command:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo modprobe -r <module>
 
sudo modprobe -r <module>
 
</nowiki></pre>
 
</nowiki></pre>
 
 
[[Anchor(iwconfig)]]
 
[[Anchor(iwconfig)]]
 
 
=== iwconfig ===
 
=== iwconfig ===
 
 
This command prints information about a wireless interface and allows you to configure the network interface from the command line.
 
This command prints information about a wireless interface and allows you to configure the network interface from the command line.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo iwconfig
 
sudo iwconfig
 
</nowiki></pre>
 
</nowiki></pre>
 
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
<pre><nowiki>
 
<pre><nowiki>
 
* eth0      no wireless extensions.
 
* eth0      no wireless extensions.
 
 
* ath0      IEEE 802.11g  ESSID:"XXXXX"
 
* ath0      IEEE 802.11g  ESSID:"XXXXX"
 
Mode- Managed  '''Frequency- 2.437 GHz'''  '''Access Point- 00:17:16:1D:FC:DE'''
 
Mode- Managed  '''Frequency- 2.437 GHz'''  '''Access Point- 00:17:16:1D:FC:DE'''
第639行: 第434行:
 
Tx excessive retries:0  Invalid misc:0  Missed beacon:0
 
Tx excessive retries:0  Invalid misc:0  Missed beacon:0
 
</nowiki></pre>
 
</nowiki></pre>
 
 
'''Key Points'''
 
'''Key Points'''
 
+
# This example shows the interface of ath0. If you do not see anything like this sample then you do not have a working driver.
** This example shows the interface of ath0. If you do not see anything like this sample then you do not have a working driver.
+
# Access Point: If you see all zeros here or nothing then you are not connected/associated to your router. When you are connected it will show the mac address of the router here.
** Access Point: If you see all zeros here or nothing then you are not connected/associated to your router. When you are connected it will show the mac address of the router here.
+
# Frequency more commonly known as channel. If you can not connect to your router ensure frequency is correct.
** Frequency more commonly known as channel. If you can not connect to your router ensure frequency is correct.
+
 
+
 
{i} You can not set the channel(currently with breezy or earlier) via the network gui. Most drivers are set up as auto so it changes to the corresponding channel of the ap you're trying to connect to. But if you must make the change then this is the command to change it.
 
{i} You can not set the channel(currently with breezy or earlier) via the network gui. Most drivers are set up as auto so it changes to the corresponding channel of the ap you're trying to connect to. But if you must make the change then this is the command to change it.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo iwconfig <ath0> channel <X>
 
sudo iwconfig <ath0> channel <X>
第653行: 第444行:
 
sudo iwconfig <ath0> freq <x.xxxG>
 
sudo iwconfig <ath0> freq <x.xxxG>
 
</nowiki></pre>
 
</nowiki></pre>
 
 
{|border="1" cellspacing="0"
 
{|border="1" cellspacing="0"
|||||<tablestyle="width: 20%">'''Channel/Frequency Chart'''
+
|||||'''Channel/Frequency Chart'''
 
|-
 
|-
 
|Ch 1||2.412
 
|Ch 1||2.412
第687行: 第477行:
 
|Ch 14||2.484
 
|Ch 14||2.484
 
|}
 
|}
 
 
 
[[Anchor(ifconfig)]]
 
[[Anchor(ifconfig)]]
 
 
=== ifconfig ===
 
=== ifconfig ===
 
 
This command is similar to iwconfig with the following differences.
 
This command is similar to iwconfig with the following differences.
*** It's a more general networking command. It works with any interface whether wireless or wired.
+
* It's a more general networking command. It works with any interface whether wireless or wired.
*** It's configuration options and output show different networking references or set different settings.
+
* It's configuration options and output show different networking references or set different settings.
 
+
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo ifconfig
 
sudo ifconfig
 
</nowiki></pre>
 
</nowiki></pre>
 
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
<pre><nowiki>
 
<pre><nowiki>
第714行: 第498行:
 
</nowiki></pre>
 
</nowiki></pre>
 
'''Key Points'''
 
'''Key Points'''
** The benefit with ifconfig on a wireless device is it shows if you have an ip address assigned to the device which is noted next to inet addr. iwconfig may show you're connected to your router but you still have no internet connection with out an ip address assigned to the device.
+
# The benefit with ifconfig on a wireless device is it shows if you have an ip address assigned to the device which is noted next to inet addr. iwconfig may show you're connected to your router but you still have no internet connection with out an ip address assigned to the device.
 
+
 
[[Anchor(iwlist)]]
 
[[Anchor(iwlist)]]
 
 
=== iwlist ===
 
=== iwlist ===
 
 
This command will give you more detailed information from the wireless interface such as a scan of all available routers with in range.
 
This command will give you more detailed information from the wireless interface such as a scan of all available routers with in range.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo iwlist <ath0> scan
 
sudo iwlist <ath0> scan
 
</nowiki></pre>
 
</nowiki></pre>
 
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconExample48.png
 
<pre><nowiki>
 
<pre><nowiki>
第749行: 第528行:
 
Extra bcn_int=100
 
Extra bcn_int=100
 
</nowiki></pre>
 
</nowiki></pre>
 
 
'''Key Points'''
 
'''Key Points'''
** If you get a completed scan like example, then your device and driver is probably working properly.
+
# If you get a completed scan like example, then your device and driver is probably working properly.
** Some devices do not support scanning so this command may not work for you.(such as orinoco cards)
+
# Some devices do not support scanning so this command may not work for you.(such as orinoco cards)
 
+
 
[[Anchor(dhclient)]]
 
[[Anchor(dhclient)]]
 
 
=== dhclient ===
 
=== dhclient ===
 
 
dhclient is simply the program that deals with dhcp if you're dealing with a router running as a dhcp server.
 
dhclient is simply the program that deals with dhcp if you're dealing with a router running as a dhcp server.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo dhclient <ath0>
 
sudo dhclient <ath0>
 
</nowiki></pre>
 
</nowiki></pre>
 
 
 
{i} If you are associated with your router try running this command to get ip and other information to set up connection.
 
{i} If you are associated with your router try running this command to get ip and other information to set up connection.
 
 
[[Anchor(ping)]]
 
[[Anchor(ping)]]
 
 
=== ping ===
 
=== ping ===
 
 
ping is a good troubleshooting command to track down where the connection problem may be:
 
ping is a good troubleshooting command to track down where the connection problem may be:
 
 
First ping your local loopback device
 
First ping your local loopback device
 
<pre><nowiki>
 
<pre><nowiki>
 
ping -c 4 127.0.0.1
 
ping -c 4 127.0.0.1
 
</nowiki></pre>
 
</nowiki></pre>
 
 
{i} If this doesn't work then there is a problem in the tcp/ip stack some where.
 
{i} If this doesn't work then there is a problem in the tcp/ip stack some where.
 
 
If the device is assigned an ip address next ping that. {i} ''use [[ifconfig ifconfig]] to find the ip address assigned to the device''
 
If the device is assigned an ip address next ping that. {i} ''use [[ifconfig ifconfig]] to find the ip address assigned to the device''
 
<pre><nowiki>
 
<pre><nowiki>
 
ping -c 4 <192.168.1.11>
 
ping -c 4 <192.168.1.11>
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Next ping your router
 
Next ping your router
 
<pre><nowiki>
 
<pre><nowiki>
 
ping -c 4 <192.168.0.1>
 
ping -c 4 <192.168.0.1>
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Next ping an external site using the ip address
 
Next ping an external site using the ip address
 
<pre><nowiki>
 
<pre><nowiki>
 
ping -c 4 216.239.57.99
 
ping -c 4 216.239.57.99
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Next ping using common name
 
Next ping using common name
 
<pre><nowiki>
 
<pre><nowiki>
 
ping -c 4 www.google.com
 
ping -c 4 www.google.com
 
</nowiki></pre>
 
</nowiki></pre>
 
 
{i} If you can ping an external site with the ip address but not the common name then there is a [[dns dns]] nameserver problem
 
{i} If you can ping an external site with the ip address but not the common name then there is a [[dns dns]] nameserver problem
 
 
 
 
[[Anchor(links)]]
 
[[Anchor(links)]]
 
 
=== Links ===
 
=== Links ===
 
 
''These are sites with information on wireless networking:''
 
''These are sites with information on wireless networking:''
 
 
[http://oob.freeshell.org/nzwireless/LWAP-HOWTO.html linux wireless access point HOWTO]<br>
 
[http://oob.freeshell.org/nzwireless/LWAP-HOWTO.html linux wireless access point HOWTO]<br>
 
[http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/ Wireless linux resources]<br>
 
[http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/ Wireless linux resources]<br>
第815行: 第571行:
 
[http://www.us.debian.org/doc/manuals/reference/ch-gateway.en.html Debian Network Configuration]<br>
 
[http://www.us.debian.org/doc/manuals/reference/ch-gateway.en.html Debian Network Configuration]<br>
 
[http://users.linpro.no/janl/hardware/wifi.html Survey of Linux and Wifi]<br>
 
[http://users.linpro.no/janl/hardware/wifi.html Survey of Linux and Wifi]<br>
 
 
[[category:CategoryDocumentation]] [[category:CategoryCleanup]] [[category:CategoryNetworking]]
 
[[category:CategoryDocumentation]] [[category:CategoryCleanup]] [[category:CategoryNetworking]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2007年11月30日 (五) 22:28的版本

IconsPage?action=AttachFile&do=get&target=IconControlCenter2.png IconsPage?action=AttachFile&do=get&target=IconFavourites.png IconsPage?action=AttachFile&do=get&target=IconHammer2.png IconsPage?action=AttachFile&do=get&target=IconDustTape.png IconsPage?action=AttachFile&do=get&target=IconArt-Small.png WifiDocs/WiFiTroubleshooting should be merged into this document.

Purpose

This guide can serve as a checklist for troubleshooting your wireless network connections. While it may not solve all your problems, it can hopefully steer you in the right direction. Before using this guide, check to see if you already have a wireless connection set up.

  • To do this, open System > Administration > Networking. If you can see a "Wireless Connection" entry under the Connections tab, then you may have a working driver already installed and simply need to activate the card. Select the entry and click on the "Properties" button to the right. Check "Enable this connection" and fill in the appropriate information below (SSID, network name, passcode, and connection settings). When finished, click OK and wait for the system to activate your card. If this does not produce a working connection, make sure you have entered all settings correctly, then consult the remainder of this guide to track down your problem(s).

Overview

Steps

Config files

  • Any config file used in wireless will be listed with notes about the particular file

Connected but no internet

  • This section will be devoted to those who have a working wireless connection but other problems occur such as dropped signal. This is a fragmented work in progress currently.

Commands

  • Reading through the commands section is not necessary for this guide, but could prove useful.
  • The first section contains the commands associated with troubleshooting wireless. Details about the command and some basics of what it does will be given. When going through the steps steps, anywhere a command is given it will link to the command section.
  • With each command will be an example with key points noted.
  • For more information on each command check the manual.
    • man <command>
  • Where a word appears inside <>. you need to input a value to complete the command. Do not include the <> symbols in your command.
    • eg Where you see <ath0> you need to replace this with your device's logical name (could be ath0; wlan0; eth1; etc...)

Anchor(steps)

Troubleshooting Steps

Anchor(check)

Check Device

Commands we'll be using in this section: lshw lshw lspci lspci lsusb lsusb

PnP

  • Most devices are plug and play but it is worth checking.

{i} plug and Play is a term used in the computer field to describe a computer's ability to have new device, normally peripherals, added without having to reconfigure or restart the computer. It is not a term stating the device will work as described immediately. A driver has to be installed so the os can communicate with the device

  1. To check if device is recognized use the lshw lshw command. If device shows up then you can check off step I

Non-recognized Card

  • Some devices are not recognized by the OS upon insertion. [Needs expansion.]
    1. If card doesn't show up immediately try these steps:

Run the following command. Hopefully you'll get some output about the device.

sudo pccardctl ident

IconsPage?action=AttachFile&do=get&target=IconExample48.png

Socket 0:
product info: "Atheros Communications, Inc.", "AR5001-0000-0000", "Wireless LAN Reference Card", "00"
manfid: 0x0271, 0x0012
function: 6 (network)

If you get no output then the memory on the card cannot be read. Now we need to open a configuration file and add this information to it:

gksudo gedit /etc/pcmcia/config.opts

the information you add should look like this, with your own data substituted. IconsPage?action=AttachFile&do=get&target=IconExample48.png

card ""Atheros Communications, Inc.", "AR5001-0000-0000", "Wireless LAN"
manfid 0x0271, 0x0012
function: 6 (network)
bind "ath_pci"

After making this change run this command:

sudo kill -HUP `cat /var/run/cardmgr.pid`

Now run lshw lshw to see if the card is recognized and loaded properly. {i} Most cards requiring this step will be older devices. You should not have to do this with any cards made in the past few years, but there can be exceptions. {i} Notice the bind line which states what driver should be allocated to the device. You will need to find what driver your device uses. More on that in the next step.

Problem with bridge in PCI bus line

On several, especially new systems the Yenta bridge is not on the root PCI bridge, but behind a PCI-to-PCI bridge. On some x86 or x86_64 systems, these bridges aren't corrreclty set up by the BIOS, which may cause CardBus and even PCMCIA devices not to show up in lspci or in pccardctl ident correctly. If you suspect that this may be the cause, issue this command:

lspci -v | grep subordinate

Its result may be like this:

Bus: primary=00, secondary=02, subordinate=04, sec-latency=64
Bus: primary=02, secondary=03, subordinate=06, sec-latency=176
Bus: primary=02, secondary=07, subordinate=0a, sec-latency=176

Let's decode the first line: bus 0 (primary) is bridged to busses 2 (secondary) to 4 (subordinate) by a bridge. The second and the third line state that bus 2 is bridged to busses 3-6, and 7-10. However, the CPU (which itself is connected to bus 0 through the root bridge) needs to be able to access all these busses. If you try to walk the tree to bus 7, for example, you see that the CPU can't get there, as bus 0 is only bridged to busses 2 to 4. If this is the case, or you find a message stating "try pci=assign-busses" in the dmesg log, append the following to the kernel boot line:

	pci=assign-busses

System locks upon card insertion

When a card is first inserted, the system attempts to read the card's memory. This can sometimes cause your system to lock-up. Try this to see if it helps: 1) Open the file /etc/pcmcia/config.opts

gksudo gedit /etc/pcmcia/config.opts

2) Find the following section: IconsPage?action=AttachFile&do=get&target=IconExample48.png

include memory 0xc0000-0xfffff
include memory 0xa0000000-0xa0ffffff
include memory 0x60000000-0x60ffffff

3) Change it to look like this:

include memory 0xd0000-0xdffff
include memory 0xc0000-0xcffff
include memory 0xc8000-0xcffff
include memory 0xd8000-0xdffff

Anchor(driver)

Device Drivers

Commands we'll be using in this section: lshw lshw lsmod lsmod modprobe modprobe {i} Your device may be supported in Ubuntu with a native driver. Before anything else you should check to see if a driver automatically loaded. Use the lshw lshw command for this.

General device information

IconsPage?action=AttachFile&do=get&target=IconNote.png Devices using the ralink chipset are listed with the rt2x00 driver. the rt2x00 driver only works for kernels 2.6.13 or greater. For a kernel older then this you need to use rt2500 for pci devices or rt2570 for usb devices

Native Linux Drivers

You can find general driver information, driver notes specific to ubuntu releases, and links to more help on the drivers here. Anchor(ndisc)

ndiswrapper for non supported cards

Not all cards/devices have a linux driver. If you find your card is not supported you will have to look at an app called ndiswrapper.

Sometimes ndiswrapper is used prematurely. There may be a native driver that comes with Ubuntu which is taking the primary driver position and conflicting with ndiswrapper. In such cases, if the native driver does not work properly with your card you want to use ndiswrapper, you can blacklist the native driver, by adding a file to /etc/modprobe.d/ . The file name must begin with the blacklist prefix. In this file you can blacklist modules (so that they will not be loaded upon card chipset recognition) with the following syntax :

blacklist modulename

For example, if you own a D-Link DWL-G520+ card which uses the ACX111 chipset, and you plan to use the ndiswrapper module, you have to blacklist the acx module, by creating the file /etc/modprobe.d/blacklist-acx with a single line inside which states :

blacklist acx

Check driver

If you ran lshw lshw and saw a driver bound to the device then let's test to make sure it's communicating to the kernel.

  1. run the command lsmod lsmod to see if driver is loaded. (look for the name that was listed under lshw). If you did not see it in the list then use the modprobe modprobe command to load it.
  2. run the command iwconfig iwconfig. If you see out put like in the example in the command section then the driver is at least identifying the device as a wireless device to the kernel.
    1. Opening networking in system>administration> and seeing the device in the list is how to identify through gui if driver is at least communicating to the kernel at a basic level.
  3. run the command iwlist iwlist to scan for a router. If an access point is identified this is a second identifier which shows the driver as communicating and shows that it's probably working as it can complete a wireless interface task. (note not all cards support scanning so this may not work for you)

Driver looks ok, device disabled

Newer laptops come with features to disable the wireless radio to save battery when not in use. Usually this is switched by a FN+Fx key combo or specific button for the purpose. It is possible driver and everything is ok but the wireless device is in the disabled state and can't be used. Using the designated key(s) in linux sometimes does not work. Usually this is apparent by running the lshw lshw command you see *-network:1 DISABLED or if you run the iwconfig iwconfig command you see eth1 NOT READY!. So how do you rectify this? It varies so much the exact solution can't be put here in this document for all the different models. So...

  1. Look at the Ubuntu:LaptopTestingTeam page on the team wiki to see if your laptop is listed with any information.
  2. Do a google search using terms such as manufacture, model, linux, wireless, enable, button, radio....etc. When searching and finding similar pages that don't help, use words that are used in those pages to help you search.
  3. Go to the ubuntu forums and ask, maybe someone else has the same laptop and knows the work around.

Anchor(connection)

Router Connection

Commands we'll be using in this section: iwconfig iwconfig

  • With the driver loaded go to the panel System>Administration>Networking. Highlight your device and click properties. Enter your networking info, click ok then try to activate.
    1. You should see an applet in the panel showing a connection. (You may need to set properties to show correct interface)
      1. You can check if you're associated to router by running the command iwconfig iwconfig.
  • You can also connect to the router via the command line using the command iwconfig iwconfig. The syntax looks like this.
sudo iwconfig <ath0> essid <essid> ap <xx:xx:xx:xx:xx:> key <XXX> mode <> commit

~-note: not all these may be used, check the man page for more informatin-~

  • If you can not connect to the router then try these.
    1. Change to an open signal (instead of wep or wpa). This may be an unattractive option but it's a short term one to make sure the card and ap can connect. Once you've verified this then you can add encryption back in.
      1. When using wep more people seem to have success using an open key instead of shared and a hexadecimal method instead of ascii. But there should be no reason any setting shouldn't work. Try the settings you want and consider adjusting if you have problems.
        1. To get wpa working you will need to install the wpasupplicant from the repositories. There are instructions for various drivers on using wpa. See notes on wpa below.
      2. Download a scanner such as network manager, gtk wifi, or wifi radar. ~-of course this is not an option if you can not connect to the internet without wireless-~
      3. Try booting with kernel option pci=noacpi or acpi=off as acpi sometimes conflicts with network devices. The second option will affect power management.
      4. Check for firmware update on the router and update it if there is newer firmware available.

Notes on wep

  • ubuntu wep faq
  • If you have a 10 digit wep key try entering it in this format xxxx-xxxx-xx (include dashes)
  • Use an open setting instead of shared when using wep
  • When using wep, check driver files such as README as some drivers need a command to adjust the mode to work properly. Here are a couple examples.
    • Madwifi driver needs to change to authmode 2 when using shared key setting.
  • manually from command line iwpriv ath0 authmode 2
  • add line pre-up iwpriv ath0 authmode 2 to interfaces file to automate during boot
  • For ipw2200 driver interface file should say wireless-key restricted <key>

Notes on wpa

{i} There have been a few posts where no association is established with router even on an open signal. At the point of writing this line, no answer has been seen to why this happens. A router reboot has been noted once to resolve but in other situations has caused heartache as network settings need to be set up again. Booting with acpi=off or noapci should be tried. Anchor(ip)

ip assignment

Now that you have association to the router did you get an ip assigned to the device? This can be checked two ways.

  1. Run the command ifconfig ifconfig and look for an assigned ip.

2. You can always try to ping ping the router with the routers ip. A lot of home routers use something similar to 192.168.0.1 You'll have to find what that ip address is to ping. If you do not have an ip then here are things to try

  • Using DHCP
sudo dhclient <ath0>

or

sudo invoke-rc.d networking restart

~-after running the invoke-rc.d command try dhclient ath0 again-~ IconsPage?action=AttachFile&do=get&target=IconNote.png You may want to try and reboot making sure your networking config interfaces file is set up properly. If you can connect to the router, but can't get an ip, it may be because you put the wrong WEP key in.

  • Using Static ip assignment
sudo ifconfig <ath0> down
sudo ifconfig ip addr 192.168.x.x netmask 255.255.255.0 broadcast 192.168.x.255 up

where the x = an ip address in your network range.

sudo route add default gw <router_ip> dev <ath0>
  • Now try to ping ping your router and a website. If you're connected now and have an ip assigned but can not surf website then move on to next section.
  • You will need to make sure your config interfaces file is set up properly so you get internet again when you reboot

Anchor(dns)

Connected but no internet

DNS

If you don't know what DNS means or what it does you can go here to read more. Basically it takes a common name such as www.google.com and searches a database to find the ip address of google. Then it actually transfers the request to download the web page via the ip address. If you are connected to your router and have an ip address assigned to your wireless device but can't search the web, you will need to check to see if you have a DNS nameserver set

  • A simple test to see if it's a DNS server setting is to use the ping ping command. If you can ping an external site via ip address but can't load a web page in your browser then it is possible you have a dns server problem.
  • Check this file to see if there is a dns server listed.
cat /etc/resolv.conf

IconsPage?action=AttachFile&do=get&target=IconExample48.png

search telus.net
nameserver 209.53.4.130
nameserver 209.53.4.150
  • You can find your dns settings if you have a working windows machine
    • For a Win 95/98 box click start>run then type `winipcfg`. Choose the correct adapter and then more. In the sample above, replace telus.net with what's in the "Host Name" box. name server will equal what's in the dns server box.
      • For a Win 2000/xp box click Start>Run...type cmd click ok. type `ipconfig /all`. In the sample above, replace telus.net with what's next to the field Connection-Specific DNS suffix. For name server look next to the line DNS servers.
  • Your DNS server settings can also be found out by calling your isp provider and asking them.

You can set up your dns settings so they don't change.

  • StaticDnsWithDhcp:StaticDnsWithDhcp

Anchor(ipv6)

IPV6

The internet standard is currently considered ipv4. The new standard, ipv6, is slowly being implemented to replace ipv4. Because it's not widely used at the moment, ipv6 can cause problems. It is enabled by default in Ubuntu. This can cause no internet if above seems ok.

  • Firefox specific
    • In the address bar type about:config. Find this line network.dns.disableIPv6 and double click on it to change the value to true.
  • System wide
    • Open the file /etc/modprobe.d/aliases
      Add the first three lines to the file. The line with # starting is already in the file. Find it and add the # in front of it.

alias net-pf-10 ipv6 off
alias net-pf-10 off
alias ipv6 off

  1. alias net-pf-10 ipv6

After making these changes a reboot is required. Anchor(config)

Config Files

  • The following is a list of important config files used with wireless
    • /etc/network/interfaces
      This is where your inteface settings for the network are kept sample
      1. man interfaces has information about this file.
      2. For a little more detailed info on the interfaces file look at the file in /usr/share/doc/ifupdown/examples/network-interfaces.gz. You can read through it with the cat command and then adding | less to the end of the command.
      3. For pcmcia users who want to start your card at boot do not use an auto stanza. add map <ath0> to the file. So here is an example of what it would look like.
  1. Check your routers settings to ensure it can accept another connection.
    1. Check your /etc/network/intefaces file. You should have something similar to this:

IconsPage?action=AttachFile&do=get&target=IconExample48.png

# The loopback network interface
auto lo
iface lo inet loopback
# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
# With lines # out these don't work. If they were removed this would hotplug only eth0 when cable is plugged in with active network
#mapping hotplug
#       script grep
#       map eth0
#echo connects ath0 when device is hotplugged. using echo instead of grep allows any device to be brought up when hotplugged. Note this could cause a problem if a device is active and another one that is mapped is plugged in.
mapping hotplug
script echo
map ath0
#interfce of ath0 device with wep setting (not all these lines are required but show you options that may be needed)
iface <ath0> inet dhcp
wireless-essid xxxx
wireless-key xxxxx
wireless-key xxxx-xxxx-xx (in certain situations a - is needed after every 4 characters to work)
wireless-key1 xxxx (add a number after key to specify key number to use.)
wireless-defaultkey 1 (specifies which key is default)
wireless-key s:xxx (add s: in front of key if ascii form)
wireless-key XXXXXXXXXX open|restricted (if using shared/restricted setting add this line)
auto <ath0>
  • /etc/resolv.conf
    Where your DNS server settings are kept
  • /etc/modules
    If a driver won't load at boot, you can add it to this list so it does
  • /etc/modprobe.d/blacklist
    If you don't want a driver to load at boot you add it to this list. Usually this is used if you have a driver conflict and you want to make sure a specific driver is used. Note: this method will not work unless it is a LKM (loadable kernel module) If driver/mod was compiled into the base kernel, it will still load if on blacklist.

Anchor(special)

Connection Established, Problems Persist

This section is reserved for solutions to problems where you can get connected but the connection is unstable. If you find a solution to your problem that's not here, please edit this page and add your solution.

Dropped Connections

  1. One common problem is channel interference. Cordless phones and other wireless devices can interrupt your wireless connection. If you are having a problem with dropped connections then try using a different channel.

2. Network-Manager; Wifi-radar; and gtk wifi can cause dropped signals every so often as they scan the interfaces, causing the connection to drop. You can try uninstalling these apps to see if your problem goes away, but doing so will remove any GUI tools that you may or may not have been using to configure and monitor your wireless connections. If removing these tools solves your problem, please file a bug report on the product's launchpad page to help improve the app's performance.

Connected, Issues with Certain Websites

  1. Disable ipv6 IPV6.

Incorrect Driver Loads at Boot

  1. Some devices will have multiple drivers, and some will function better than others. To prevent a specific driver from loading during boot, read the modprobe modprobe command section.

Anchor(commands)

Commands

This section gives a real brief summary of commands used to help you troubleshoot. There are also examples of the commands discussed. For more information, consult the man page of the command or do a google search. Anchor(lshw)

lshw

This command shows information about hardware:

sudo lshw

(!) We can limit the the output to show just specific devices by adding options to the command:

sudo lshw -businfo

IconsPage?action=AttachFile&do=get&target=IconExample48.png

BusInfo Device Class Description
pci@00:1f.5 multimedia 82801CA/CAM AC'97 Audio Controller
pci@00:1f.6 communication 82801CA/CAM AC'97 Modem Controller
pci@03:00.0 ath0 network AR5212 802.11abg NIC


(!) You can then use a different option to limit output so it shows just your networking devices. Find your device in the list and notice it's class then:

sudo lshw -C <class>

IconsPage?action=AttachFile&do=get&target=IconExample48.png

*-network
description: Wireless interface
product: AR5212 802.11abg NIC
vendor: Atheros Communications, Inc.
physical id: 1
bus info: pci@03:00.0
logical name: ath0
version: 01
serial: 00:11:95:50:be:62
width: 32 bits
clock: 33MHz
capabilities: bus_master cap_list ethernet physical wireless
configuration: broadcast=yes '''driver=ath_pci driverversion=0.9.6.0 (EXPERIMENTAL)''' ip=192.168.1.12 multicast=yes wireless=IEEE 802.11g
resources: iomemory:10800000-1080ffff irq:11

Key Points

  1. Notice the configuration line. This area will tell you if there is a driver loaded for your device. (except devices using orinoco driver, these don't show here) If you do not see a driver listed here then there is not one loaded and assigned to the device and it will not show up in iwconfig output or the nework-admin gui.

2. The businfo line has importance as some devices are recognized and memory is readable but the device is not physically on the bus. This is rare but it has been seen. It may seem cryptic but your output will vary greatly and there needs to be some characters (other then 0) here denoting it's place in the pci bus. TODO: describe what it means when it shows `*-network UNCLAIMED`, and no `configuration` line is present. Anchor(lspci)

lspci

This command lists information about devices on the pci bus:

lspci -v

Lists out pci devices with information about the device. (information is different then output from lshw) (!) You can limit the output by piping the output with grep

lspci -v | grep Ethernet

IconsPage?action=AttachFile&do=get&target=IconExample48.png

0000:03:00.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
'''Subsystem: D-Link System Inc D-link DWL-G650 (Rev B5)''' Wireless cardbus adapter
Flags: bus master, medium devsel, latency 168, IRQ 11
Memory at 10800000 (32-bit, non-prefetchable) [size=64K]
Capabilities: [44] Power Management version 2

command:

sudo lspci -n

IconsPage?action=AttachFile&do=get&target=IconExample48.png

0000:03:00.0 0200: '''168c:0013''' (rev 01)

Key Points

  1. This command shows the revision of the card (in above example the revision of the card is B5 not 01).
  2. Using the -n option you can find the PCI ID (168C:0013) of the card and find the correct driver to use with ndiswrapper. ndiswrapper list

Anchor(lsusb)

lsusb

This command lists information about devices on the usb bus.

sudo lsusb -v

IconsPage?action=AttachFile&do=get&target=IconExample48.png

$ lsusb
Bus 005 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 004 Device 002: ID 2001:3700 D-Link Corp. [hex] DWL-122 802.11b
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000

Anchor(lsmod)

lsmod

This command simply shows what modules are loaded and running.

sudo lsmod

(!) When the command lshw lshw was run, you saw the name of the driver allocated to the device. You can pipe this command through grep to limit the output.

lsmod | grep ath

IconsPage?action=AttachFile&do=get&target=IconExample48.png

ath_pci                78908  0
ath_rate_sample        16776  1 ath_pci
wlan                  141532  4 wlan_wep,ath_pci,ath_rate_sample
ath_hal               148432  3 ath_pci,ath_rate_sample

Anchor(modprobe)

modprobe

modprobe runs or stops a module from running. Most wireless drivers in breezy are in a module form. The following commands remove or add a module. {i} When a recognized device loads, the kernel automatically loads the correct module for the device. This command is only needed to manually run a module To start a module run this command:

sudo modprobe <module>

To stop and remove a module run this command:

sudo modprobe -r <module>

Anchor(iwconfig)

iwconfig

This command prints information about a wireless interface and allows you to configure the network interface from the command line.

sudo iwconfig

IconsPage?action=AttachFile&do=get&target=IconExample48.png

* eth0      no wireless extensions.
* ath0      IEEE 802.11g  ESSID:"XXXXX"
Mode- Managed  '''Frequency- 2.437 GHz'''  '''Access Point- 00:17:16:1D:FC:DE'''
Bit Rate-36 Mb/s   Tx-Power-18 dBm   Sensitivity=0/3
Retry- off   RTS thr:off   Fragment thr- off
Encryption key:xxxx-xxxx-xx   Security mode:restricted
Power Management off
Link Quality=50/94  Signal level=-45 dBm  Noise level=-95 dBm
Rx invalid nwid:10911  Rx invalid crypt:0  Rx invalid frag:0
Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Key Points

  1. This example shows the interface of ath0. If you do not see anything like this sample then you do not have a working driver.
  2. Access Point: If you see all zeros here or nothing then you are not connected/associated to your router. When you are connected it will show the mac address of the router here.
  3. Frequency more commonly known as channel. If you can not connect to your router ensure frequency is correct.

{i} You can not set the channel(currently with breezy or earlier) via the network gui. Most drivers are set up as auto so it changes to the corresponding channel of the ap you're trying to connect to. But if you must make the change then this is the command to change it.

sudo iwconfig <ath0> channel <X>
or
sudo iwconfig <ath0> freq <x.xxxG>
Channel/Frequency Chart
Ch 1 2.412
Ch 2 2.417
Ch 3 2.422
Ch 4 2.427
Ch 5 2.432
Ch 6 2.437
Ch 7 2.442
Ch 8 2.447
Ch 9 2.452
Ch 10 2.457
Ch 11 2.462
Ch 12 2.467
Non US Channels
Ch 13 2.472
Ch 14 2.484

Anchor(ifconfig)

ifconfig

This command is similar to iwconfig with the following differences.

  • It's a more general networking command. It works with any interface whether wireless or wired.
  • It's configuration options and output show different networking references or set different settings.
sudo ifconfig

IconsPage?action=AttachFile&do=get&target=IconExample48.png

ath0      Link encap:Ethernet  HWaddr 00:11:95:50:BE:62
inet addr:192.168.1.11 Bcast:192.168.255.255  Mask:255.255.255.0
inet6 addr: fe80::211:95ff:fe50:be62/64 Scope;Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:32568 errors:162786 dropped:0 overruns:0 frame:162786
TX packets:17252 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:200
RX bytes:20362191 (19.4 MiB)  TX bytes:6778264 (6.4 MiB)
Interrupt:11 Memory:d0c80000-d0c90000

Key Points

  1. The benefit with ifconfig on a wireless device is it shows if you have an ip address assigned to the device which is noted next to inet addr. iwconfig may show you're connected to your router but you still have no internet connection with out an ip address assigned to the device.

Anchor(iwlist)

iwlist

This command will give you more detailed information from the wireless interface such as a scan of all available routers with in range.

sudo iwlist <ath0> scan

IconsPage?action=AttachFile&do=get&target=IconExample48.png

ath0      Scan completed :
Cell 01 - Address: 00:13:46:1D:BC;0E
ESSID:"xxx"
Mode: Master
Frequency: 2.437 GHz (Channel 6)
Quality=49/94  Signal level=-46 dBm  Noise level=-95 dBm
Encryption key:on
Bit Rate:1 Mb/s
Bit Rate:2 Mb/s
Bit Rate:5 Mb/s
Bit Rate:6 Mb/s
Bit Rate:9 Mb/s
Bit Rate;11 Mb/s
Bit Rate;12 Mb/s
Bit Rate;18 Mb/s
Bit Rate;24 Mb/s
Bit Rate;36 Mb/s
Bit Rate;48 Mb/s
Bit Rate;54 Mb/s
Extra bcn_int=100

Key Points

  1. If you get a completed scan like example, then your device and driver is probably working properly.
  2. Some devices do not support scanning so this command may not work for you.(such as orinoco cards)

Anchor(dhclient)

dhclient

dhclient is simply the program that deals with dhcp if you're dealing with a router running as a dhcp server.

sudo dhclient <ath0>

{i} If you are associated with your router try running this command to get ip and other information to set up connection. Anchor(ping)

ping

ping is a good troubleshooting command to track down where the connection problem may be: First ping your local loopback device

ping -c 4 127.0.0.1

{i} If this doesn't work then there is a problem in the tcp/ip stack some where. If the device is assigned an ip address next ping that. {i} use ifconfig ifconfig to find the ip address assigned to the device

ping -c 4 <192.168.1.11>

Next ping your router

ping -c 4 <192.168.0.1>

Next ping an external site using the ip address

ping -c 4 216.239.57.99

Next ping using common name

ping -c 4 www.google.com

{i} If you can ping an external site with the ip address but not the common name then there is a dns dns nameserver problem Anchor(links)

Links

These are sites with information on wireless networking: linux wireless access point HOWTO
Wireless linux resources
tldp Linux networking howto
Debian Network Configuration
Survey of Linux and Wifi