# Wireless woes [FIINALLY solved]

## curmudgeon

Although most things are easier to do on Linux, wireless networking is a big exception to that (and that section of the Gentoo documentation is far below the usual high standard). I have tried with various computers over the past four years spending dozens, and I have NEVER been able to get it working.

I am in a situation where I need to try again. It looks like I am off to my usual set of problems:

From lspci -v:

```

02:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

        Subsystem: Hewlett-Packard Company Device 135b

        Flags: bus master, fast devsel, latency 0, IRQ 11

        Memory at d8000000 (32-bit, non-prefetchable) [size=4K]

        Capabilities: [c8] Power Management version 2

        Capabilities: [d0] Message Signalled Interrupts: Mask- 64bit+ Count=1/1 Enable-

        Capabilities: [e0] Express Legacy Endpoint, MSI 00

        Capabilities: [100] Advanced Error Reporting

                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSVoil-

                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSVoil-

                UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSVoil-

                CESta:  RxErr+ BadTLP+ BadDLLP+ Rollover- Timeout- NonFatalErr-

                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-

                AERCap: First Error Pointer: 14, GenCap- CGenEn- ChkCap- ChkEn-

        Capabilities: [140] Device Serial Number 93-99-a3-ff-ff-de-18-00

```

```

# ls -al /lib/modules/2.6.27-gentoo-r10/net/wireless/

total 116

drwxr-xr-x 2 root root   4096 2009-04-13 11:45:32 ./

drwxr-xr-x 3 root root   4096 2009-04-13 11:45:32 ../

-rw-r--r-- 1 root root 104584 2009-04-13 11:45:30 ipw3945.ko

# modprobe ipw3945

FATAL: Module ipw3945 not found.

 * Starting ipw3945d ...

chown: cannot access `/sys/bus/pci/drivers/ipw3945/00*/cmd': No such file or directory

chmod: cannot access `/sys/bus/pci/drivers/ipw3945/00*/cmd': No such file or directory                                 [ ok ]

```

Some settings:

```

# grep WLAN /usr/src/linux-2.6.27-gentoo-r10/.config

# CONFIG_WLAN_PRE80211 is not set

CONFIG_WLAN_80211=y

# CONFIG_USB_NET_RNDIS_WLAN is not set

# grep WIRELESS /usr/src/linux-2.6.27-gentoo-r10/.config

CONFIG_WIRELESS_EXT=y

# CONFIG_WIRELESS_EXT_SYSFS is not set

# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set

# equery list ipw3945

[ Searching for package 'ipw3945' in all categories among: ]

 * installed packages

[I--] [  ] net-wireless/ipw3945-1.2.2-r1 (0)

[I--] [  ] net-wireless/ipw3945-ucode-1.14.2 (0)

[I--] [  ] net-wireless/ipw3945d-1.7.22-r5 (0)

```

Last edited by curmudgeon on Thu May 28, 2009 7:13 pm; edited 1 time in total

----------

## erik258

 *Quote:*   

> 
> 
> # ls -al /lib/modules/2.6.27-gentoo-r10/net/wireless/
> 
> total 116
> ...

 

That oughtn't be!  Something got messed up.  I've done it before, don't know how, on my laptop, had the same problem with the e100 driver.  Think it might be an inconsistency caused by clock drift; I saw warnings.  Anyhow, check your uname, and make sure /usr/src/linux is pointing to where you think it's pointing to.  

If you can build but not load the kernel, something's gone wrong.

----------

## curmudgeon

 *erik258 wrote:*   

> 
> 
> Think it might be an inconsistency caused by clock drift
> 
> 

 

Running ntpd, so no drift.

 *erik258 wrote:*   

> check your uname, and make sure /usr/src/linux is pointing to where you think it's pointing to.

 

```

$ uname -a

Linux system 2.6.27-gentoo-r10 #1 SMP Mon Apr 13 09:22:19 UTC 2009 i686 Intel(R) Core(TM)2 CPU T5200 @ 1.60GHz GenuineIntel GNU/Linux

$ ls -al /usr/src/

total 20

drwxr-xr-x  5 root root 4096 2009-04-13 10:59:29 ./

drwxr-xr-x 16 root root 4096 2009-04-13 07:37:56 ../

-rw-r--r--  1 root root    0 2007-04-19 23:54:04 .keep

lrwxrwxrwx  1 root root   23 2009-04-13 10:59:29 linux -> linux-2.6.27-gentoo-r10/

drwxr-xr-x 22 root root 4096 2009-04-12 22:27:35 linux-2.6.25-gentoo-r8/

drwxr-xr-x 23 root root 4096 2009-04-14 04:33:52 linux-2.6.27-gentoo-r10/

drwxr-xr-x 23 root root 4096 2009-04-13 10:50:31 linux-2.6.27-gentoo-r8/

```

----------

## cwr

The last time this bit me the module couldn't be rebuilt when required

(on boot ?) because of directory permissions.  Might be worth relaxing

them.

Will

----------

## curmudgeon

 *cwr wrote:*   

> The last time this bit me the module couldn't be rebuilt when required (on boot ?) because of directory permissions.  Might be worth relaxing them.

 

Directory and module (and parents) are world readable. Every other module loads fine.

----------

## erik258

Well, there must be some inconsistency between the module and the kernel itself ... I suppose you've tried rebuilding the kernel modules and reinstalling them with 

```
sudo make modules && sudo make modules_installl
```

I have a feeling you'll have a lot better luck once you get that module loaded.

----------

## curmudgeon

 *erik258 wrote:*   

> I suppose you've tried rebuilding the kernel modules and reinstalling them with 
> 
> ```
> sudo make modules && sudo make modules_installl
> ```
> ...

 

Indeed I did. In fact with the gcc upgrade, and the xorg-xserver upgrade, I recently did emerge -ev world, then recompiled the kernel after that, and then rebuilt the modules (after rebooting into the new kernel) after that.

 *erik258 wrote:*   

> I have a feeling you'll have a lot better luck once you get that module loaded.

 

I doubt it, but then I am just a pessimist when it comes to these things. :)

----------

## d2_racing

Hi, first of all, the ipw3945 is long gone and dead actually, so you need to run this :

```

# emerge -C ipw3945 ipw3945-ucode ipw3945d

# emerge -av iwl3945

```

Also, can you reboot and post this :

```

# lsmod

# ifconfig -a

# iwconfig

# cd /usr/src/linux

# cat .config | grep -i 802

# cat .config | grep -i kill

# cat .config | grep -i iwl

```

You should post also this :

```

# cat /etc/conf.d/net

# cat /etc/wpa_supplicant/wpa_supplicant.conf

# cat /etc/udev/rules.d/70-persistent-net.rules

```

----------

## erik258

 *Quote:*   

>  (after rebooting into the new kernel) 

 

Seems like a strange approach, I don't think it would cause the problem, unless you didn't update the symlink and built modules for the wrong kernel or something.  

 *curmudgeon wrote:*   

> 
> 
>  *Quote:*    
> 
> I doubt it, but then I am just a pessimist when it comes to these things. :)

 

So am I, but accurate as your moniker may be, I can't have you spreading the idea that linux can't do wireless!  Here we are at the precipice of a linux golden age, and you're filling people's heads with the idea that it takes a person 3 years to set up wireless!  

Of course, in the gentoo world, 3 years isn't too bad I guess.  

I never managed to get a couple of cards working; I had a ralink that worked only spottily back in '05, although apparently the drivers have been completely rewritten since then, and also have had the usual rash of problems with broadcom and intel wireless cards, and even prism cards, which are supposed to work so well.  Only atheros cards have been guaranteed to cooperate over the years - and some of the new ones, clearly, differ, so that's not really a safe chipset, either.  

I've also seen a number of wireless configurations work splendidly out of the box, too.  But even super-easy distros like ubuntu seem to lack a solid approach to wireless.  

I look forward to seeing the results of some educated input on the matter....

----------

## cwr

I've been looking for a working wireless PCI card for a few years now; anything

that will do Master or Ad-Hoc mode.  The RT2500 seems nearest, though every

time the drivers (now RT2x00, I think) get near completion the kernel interface

changes and the developers have to start again.  Still, it looks as if there may

be working drivers some time this year.

I've tried a couple of other cards, but I messed up on the research, and linux

can't handle either of them.  The one card that mostly works is a Lucent/Orinoco

Silver PCMCIA card, and my desktop doesn't have a PCMCIA socket.  Even that

card can't handle most modern access points, since its too old.  Probably a PCI/PCMCIA

card is the answer for the desktop, but the story has always been "the next release

of the drivers will work".

Wireless is a pretty weak point in Linux, but there doesn't seem any real way out;

manufacturers are building to the lowest possible cost, and simply not releasing

the hardware information to allow drivers to be written.  The first wireless card

maker who releases working, reliable, open-source Linux drivers is going to

clean up.

Will

----------

## curmudgeon

 *d2_racing wrote:*   

> Hi, first of all, the ipw3945 is long gone and dead actually

 

If it is long gone and dead how come it is still in portage? :)

 *d2_racing wrote:*   

> 
> 
> ```
> 
> # emerge -av iwl3945
> ...

 

```

# emerge -av iwl3945

These are the packages that would be merged, in order:

Calculating dependencies... done!

emerge: there are no ebuilds to satisfy "iwl3945".

```

I don't see anything that looks right. Is this in an overlay?

 *d2_racing wrote:*   

> Also, can you reboot and post this :

 

With the warning that I haven't installed the package you mentioned above:

```

# lsmod

Module                  Size  Used by

#

(I build in everything I can - the only other modules I have are for VMware, which I don't have running now).

# ifconfig -a

dummy0    Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx

          BROADCAST NOARP  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx

          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0

          inet6 addr: fe80::216:36ff:febd:9334/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:536322 errors:0 dropped:0 overruns:0 frame:0

          TX packets:962253 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:100

          RX bytes:38566823 (36.7 MiB)  TX bytes:1273755523 (1.1 GiB)

          Memory:da000000-da020000

ip6tnl0   Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00

          NOARP  MTU:1460  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sit0      Link encap:IPv6-in-IPv4

          NOARP  MTU:1480  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Wow! What is starting all of those other interfaces (dummy0, ip6tnl0, and sit0)? I probably don't want them all enabled by default (and they don't start automatically on my other machine).

# iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

dummy0    no wireless extensions.

sit0      no wireless extensions.

ip6tnl0   no wireless extensions.

$ grep -i 802 .config

# CONFIG_VLAN_8021Q is not set

CONFIG_CFG80211=y

CONFIG_NL80211=y

# CONFIG_MAC80211 is not set

CONFIG_IEEE80211=y

# CONFIG_IEEE80211_DEBUG is not set

# CONFIG_IEEE80211_CRYPT_WEP is not set

CONFIG_IEEE80211_CRYPT_CCMP=y

CONFIG_IEEE80211_CRYPT_TKIP=y

# CONFIG_WLAN_PRE80211 is not set

CONFIG_WLAN_80211=y

$ grep -i kill .config

# CONFIG_RFKILL is not set

$ grep -i iwl .config

# CONFIG_IWLWIFI_LEDS is not set

$ dog /etc/conf.d/net

config_eth0=( '192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0' )

routes_eth0=('default via 192.168.0.254')

(I didn't put anything wireless related in yet, because I couldn't even get the module loaded).

I have wireless-tools installed instead of wpa_supplicant. The Changelog of the package seems to indicate that it will now work (at least somewhat) with WPA, though external documentation doesn't confirm this.

$ dog /etc/udev/rules.d/70-persistent-net.rules

# This file was automatically generated by the /lib/udev/write_net_rules

# program, probably run by the persistent-net-generator.rules rules file.

#

# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x8086:0x109a (e1000)

SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="xx:xx:xx:xx:xx:xx", NAME="eth0"

```

Thank you. Hope this helps.

----------

## curmudgeon

 *erik258 wrote:*   

>  *Quote:*    (after rebooting into the new kernel) 
> 
> Seems like a strange approach, I don't think it would cause the problem, unless you didn't update the symlink and built modules for the wrong kernel or something.

 

I try for caution in things like this. :)

At least something "sees" the module:

```

$ /sbin/modinfo ipw3945

filename:       /lib/modules/2.6.27-gentoo-r10/net/wireless/ipw3945.ko

license:        GPL

author:         Copyright(c) 2003-2006 Intel Corporation

version:        1.2.2mpr

description:    Intel(R) PRO/Wireless 3945 Network Connection driver for Linux

srcversion:     4F948E46E2B2CCDDA82A71B

alias:          pci:v00008086d00004227sv*sd*bc*sc*i*

alias:          pci:v00008086d00004222sv*sd*bc*sc*i*

depends:

vermagic:       2.6.27-gentoo-r10 SMP mod_unload CORE2

parm:           antenna:select antenna (1=Main, 2=Aux, default 0 [both]) (int)

parm:           disable:manually disable the radio (default 0 [radio on]) (int)

parm:           associate:auto associate when scanning (default 0 off) (int)

parm:           auto_create:auto create adhoc network (default 1 on) (int)

parm:           led:enable led control (default 1 on)

 (int)

parm:           channel:channel to limit associate to (default 0 [ANY]) (int)

parm:           rtap_iface:create the rtap interface (1 - create, default 0) (int)

parm:           mode:network mode (0=BSS,1=IBSS,2=Monitor) (int)

```

 *erik258 wrote:*   

>  *curmudgeon wrote:*   
> 
> I doubt it, but then I am just a pessimist when it comes to these things. :) 
> 
> So am I, but accurate as your moniker may be, I can't have you spreading the idea that linux can't do wireless!
> ...

 

I try not to spread that idea (except in help forums :) ).

Usually, I get a bit farther than this, though. :(

I had heard that this was supposed to be a "good" card, but what do I know?

Progress has seemed slow compared to say ethernet cards (I remember when it took a lot of work the get some of those working under linux, but now it is just automatic, and almost always problem-free).

----------

## d2_racing

For the record, it's :

```

# emerge -av iwl3945-ucode

```

Also, did you select the iwl3945 module inside the kernel ?

```

# cd /usr/src/linux

# cat .config | grep -i iwl

```

If not, enable the module and recompile your kernel and reboot.

Also, can you post this :

```

# cat /etc/udev/rules.d/70-persistent-net.rules

```

----------

## curmudgeon

 *d2_racing wrote:*   

> For the record, it's :
> 
> ```
> 
> # emerge -av iwl3945-ucode
> ...

 

OK. Thanks.

 *d2_racing wrote:*   

> Also, can you post this :
> 
> ```
> 
> # cat /etc/udev/rules.d/70-persistent-net.rules
> ...

 

Did that above, too, but to repeat:

```

$ dog /etc/udev/rules.d/70-persistent-net.rules

# This file was automatically generated by the /lib/udev/write_net_rules

# program, probably run by the persistent-net-generator.rules rules file.

#

# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x8086:0x109a (e1000)

SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:16:36:bd:93:34", NAME="eth0"

```

Edited (found the in kernel driver source).

----------

## curmudgeon

OK, I have everything installed now, and at least something can see the card during boot:

```

Apr 17 07:27:02 system iwl3945: Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux, 1.2.26k

Apr 17 07:27:02 system iwl3945: Copyright(c) 2003-2008 Intel Corporation

Apr 17 07:27:02 system iwl3945 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

Apr 17 07:27:02 system iwl3945 0000:02:00.0: setting latency timer to 64

Apr 17 07:27:02 system iwl3945: Detected Intel Wireless WiFi Link 3945ABG

Apr 17 07:27:02 system iwl3945: Tunable channels: 11 802.11bg, 13 802.11a channels

Apr 17 07:27:02 system phy0: Selected rate control algorithm 'iwl-3945-rs'

Apr 17 07:27:02 system iwl3945 0000:02:00.0: PCI INT A disabled

```

Revisiting past requests:

```

$ /sbin/ifconfig

eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx

          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0

          inet6 addr: fe80::216:36ff:febd:9334/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:728 errors:0 dropped:0 overruns:0 frame:0

          TX packets:560 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:100

          RX bytes:67779 (66.1 KiB)  TX bytes:96733 (94.4 KiB)

          Memory:da000000-da020000

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

```

Much better. :)

```

$ /sbin/iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

dummy0    no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11abg  ESSID:""

          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated

          Tx-Power=0 dBm

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B

          Power Management:off

          Link Quality:0  Signal level:0  Noise level:0

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

sit0      no wireless extensions.

ip6tnl0   no wireless extensions.

```

Also much better. :)

```

$ grep -i 802 /usr/src/linux-2.6.27-gentoo-r10/.config

# CONFIG_VLAN_8021Q is not set

CONFIG_CFG80211=y

CONFIG_NL80211=y

CONFIG_MAC80211=y

CONFIG_MAC80211_RC_PID=y

CONFIG_MAC80211_RC_DEFAULT_PID=y

CONFIG_MAC80211_RC_DEFAULT="pid"

# CONFIG_MAC80211_MESH is not set

# CONFIG_MAC80211_LEDS is not set

# CONFIG_MAC80211_DEBUG_MENU is not set

# CONFIG_IEEE80211 is not set

# CONFIG_WLAN_PRE80211 is not set

CONFIG_WLAN_80211=y

# CONFIG_MAC80211_HWSIM is not set

$ grep -i kill /usr/src/linux-2.6.27-gentoo-r10/.config

# CONFIG_RFKILL is not set

# CONFIG_IWL3945_RFKILL is not set

$ grep -i iwl /usr/src/linux-2.6.27-gentoo-r10/.config

CONFIG_IWLWIFI=y

# CONFIG_IWLCORE is not set

# CONFIG_IWLWIFI_LEDS is not set

# CONFIG_IWLAGN is not set

CONFIG_IWL3945=y

# CONFIG_IWL3945_RFKILL is not set

# CONFIG_IWL3945_SPECTRUM_MEASUREMENT is not set

# CONFIG_IWL3945_LEDS is not set

# CONFIG_IWL3945_DEBUG is not set

```

Do I need anything else configured? I can probably fight this for a little while myself before getting stuck again. :)

----------

## d2_racing

Hi, after that, you should post this :

```

# cat /etc/conf.d/net

# cat /etc/wpa_supplicant/wpa_supplicant.conf

```

Also, can you post this :

```

# iwlist scan

```

----------

## d2_racing

Your /etc/conf.d/net should be like this at least :

```

#WPA_SUPPLICANT

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

config_wlan0=( "dhcp" )

```

----------

## erik258

 *cwr wrote:*   

> I've been looking for a working wireless PCI card for a few years now; anything
> 
> that will do Master or Ad-Hoc mode.  The RT2500 seems nearest, though every
> 
> time the drivers (now RT2x00, I think) get near completion the kernel interface
> ...

 

May I recommend Atheros cards, especially older cards?  They do very well and the drivers are mainstreamed.  Although intel cards like this one and broadcoms too theoretically should work well these days and are also in the kernel.  

 *Quote:*   

> 
> 
> ...I've tried a couple of other cards, but I messed up on the research, and linux
> 
> can't handle either of them.  The one card that mostly works is a Lucent/Orinoco
> ...

 

That's one of the cards I never got working!  Funny, huh? I must have missed something I guess.

 *Quote:*   

> 
> 
> ...Wireless is a pretty weak point in Linux, but there doesn't seem any real way out;
> 
> manufacturers are building to the lowest possible cost, and simply not releasing
> ...

 

Hmm... Atheros opened up quite a bit pretty early on, it all wasn't opened, but worked really well back in '05 at least when I got my first wireless hardware.  I think the very first were the prism cards, but they're pretty much extinct now days.  And old, outdated, like you said.  Intel I heard made a commitment to start working with the open driver concept a little better and open its drivers, and i was of the understanding that these in-kernel intel drivers were the result? 

Anyhow the ndiswrapper thing has done well in the past, but I dislike it for it's poorer performance and ickiness.  

Anyhow, wireless support is still lacking, I agree - but to be fair, wireless in windows isn't so great either.  Maybe it's just me and my secondhand-hardware approach, but finding up-to-date drivers online is next to impossible.  Argh, I hate it.  After a few years linux becomes so much more cooperative.

----------

## d2_racing

@curmudgeon, I can help you to configure your /etc/wpa_supplicant/wpa_supplicant.conf

The only thing that I need is the configuration of your Access point and it's the iwlist scan command that will give me the info that you need to configure your wpa_supplicant program.

----------

## cwr

 *erik258 wrote:*   

> 
> 
> May I recommend Atheros cards, especially older cards?  They do very well and the drivers are mainstreamed.  Although intel cards like this one and broadcoms too theoretically should work well these days and are also in the kernel.  
> 
> 

 

Yes, the trouble is finding which chipset a card contains, and then finding the exact version of the card.  I've looked

for Intel PCI cards, for instance, and not been able to find them at all.  Nor can I find an Atheros card any more;

in fact one card I bought was supposed to be an Atheros, but wasn't.  The best bet seems to be new hardware,

a modern laptop with an Intel Centrino chipset.

Will

----------

## Xamien

whoops

----------

## curmudgeon

 *d2_racing wrote:*   

> Also, can you post this :
> 
> ```
> 
> # iwlist scan
> ...

 

I am still getting absolutely nowhere with this

```

# ifconfig -a

dummy0    Link encap:Ethernet  HWaddr d2:ce:ca:a1:10:24

          BROADCAST NOARP  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 00:16:36:bd:93:34

          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::216:36ff:febd:9334/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:8040638 errors:0 dropped:0 overruns:0 frame:0

          TX packets:6998965 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:100

          RX bytes:487467721 (464.8 MiB)  TX bytes:3350260684 (3.1 GiB)

          Memory:da000000-da020000

ip6tnl0   Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00

          NOARP  MTU:1460  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:1024 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1024 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:1795996 (1.7 MiB)  TX bytes:1795996 (1.7 MiB)

sit0      Link encap:IPv6-in-IPv4

          NOARP  MTU:1480  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:18:de:a3:99:93

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wmaster0  Link encap:UNSPEC  HWaddr 00-18-DE-A3-99-93-65-74-00-00-00-00-00-00-00-00

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# iwlist scan

lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

dummy0    Interface doesn't support scanning.

wmaster0  Interface doesn't support scanning.

wlan0     Interface doesn't support scanning : Network is down

sit0      Interface doesn't support scanning.

ip6tnl0   Interface doesn't support scanning.

# ifconfig wlan0 up

SIOCSIFFLAGS: No such device

```

----------

## sera

```
cd /etc/init.d/

ln -s net.lo net.wlan0

/etc/init.d/net.wlan0 start
```

To bring up your interface and provide a means to do it automatically in future.

----------

## cwr

I've given up on Linux wireless cards and got an Asus WL-330gE; not much more

expensive, and small enough to go in a laptop bag.  I suspect that the only reliable

wireless drivers are those for Intel Centrino, for which you need modern hardware;

neither my laptop nor my desktop qualify, but the Asus seems to work pretty well

with both.  Another piece of kit is a nuisance, but the Asus is pretty effective once

configured.

Will

----------

## wjb

I have the same wireless device as you but somehow got through this without too much grief. I think I stumbled on the gentoo wiki entry for iwlwifi, which gave me a few suggestions.

Just had a little play around - I commented out all the wlan0 stuff in my /etc/conf.d/net file - on reboot, although iwconfig showed wlan0 with signs of life, iwlist scan said nothing doing. This is pretty much what you're reporting. Have you got anything in the /etc/conf.d/net for wlan0 yet?

----------

## curmudgeon

 *d2_racing wrote:*   

> @curmudgeon, I can help you to configure your /etc/wpa_supplicant/wpa_supplicant.conf
> 
> The only thing that I need is the configuration of your Access point and it's the iwlist scan command that will give me the info that you need to configure your wpa_supplicant program.

 

I hope I have everything together here.

```

$ dog /etc/conf.d/net

modules=( 'wpa_supplicant' )

config_wlan0=( 'dhcp' )

wpa_supplicant_wlan0='-Dwext'

$ dog /etc/wpa_supplicant/wpa_supplicant.conf

ap_scan=1

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

network={

    bssid=00:11:22:33:44:55

    psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef

    }

$ /sbin/iwlist wlan0 scanning

wlan0     Scan completed :

          Cell 01 - Address: 00:11:22:33:44:55

                    ESSID:""

                    Mode:Master

                    Channel:1

                    Frequency:2.412 GHz (Channel 1)

                    Quality=96/100  Signal level:-30 dBm  Noise level=-127 dBm

                    Encryption key:on

                    IE: Unknown: 0009000000000000000000

                    IE: Unknown: 010882848B960C121824

                    IE: Unknown: 030101

                    IE: Unknown: 0406000200000000

                    IE: Unknown: 050400030000

                    IE: Unknown: 2A0100

                    IE: Unknown: 32043048606C

                    IE: WPA Version 1

                        Group Cipher : TKIP

                        Pairwise Ciphers (1) : TKIP

                        Authentication Suites (1) : PSK

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s

                              48 Mb/s; 54 Mb/s

                    Extra:tsf=0000000148db817e

                    Extra: Last beacon: 3786ms ago

```

I just spent another four hours fighting this. I keep getting things like this:

```

wlan0: dhcpcd 4.0.7 starting

wlan0: waiting for carrier

wlan0: timed out

```

wpa_cli forever shows "scanning" with no way that I can see to get beyond that.

I hope I am (finally) getting close on this. Thanks to everyone for your help.

----------

## swimmer

You could try 

```
wpa_supplicant_wlan0="-Dwext -c /etc/wpa_supplicant/wpa_supplicant.conf"
```

 ... and is "ap_scan=1" really needed?

HTH

swimmer

----------

## curmudgeon

 *swimmer wrote:*   

> You could try 
> 
> ```
> wpa_supplicant_wlan0="-Dwext -c /etc/wpa_supplicant/wpa_supplicant.conf"
> ```
> ...

 

Nothing.

/var/log/messages shows this:

```

May 25 03:03:00 system iwl3945 0000:02:00.0: PCI INT A disabled

May 25 03:03:01 system iwl3945 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

May 25 03:03:01 system iwl3945 0000:02:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

May 25 03:03:01 system ADDRCONF(NETDEV_UP): wlan0: link is not ready

May 25 03:03:01 system wlan0: direct probe to AP 66:77:88:99:aa:bb try 1

May 25 03:03:01 system wlan0: Failed to config new BSSID to the low-level driver

May 25 03:03:01 system wlan0: Failed to config new SSID to the low-level driver

May 25 03:03:01 system wlan0: direct probe to AP 00:00:00:00:00:00 try 2

May 25 03:03:01 system wlan0: direct probe to AP 00:00:00:00:00:00 try 3

May 25 03:03:01 system wlan0: direct probe to AP 00:00:00:00:00:00 timed out

```

It first tries to connect to some random access point (I don't have anything in wpa_supplicant.conf except for the network I need to connect to), and then it tries to connect to all zeroes (yes, the log really says that).

----------

## swimmer

Hmm - I read your previous posts again and saw that you have the network drivers compiled into the kernel ... I'd compile at least the card driver as a module then it's easier to handle any modifications in the config and just reload the modules.

And you read the wiki did you?  :Wink: 

HTH

swimmer

----------

## curmudgeon

 *swimmer wrote:*   

> Hmm - I read your previous posts again and saw that you have the network drivers compiled into the kernel ... I'd compile at least the card driver as a module then it's easier to handle any modifications in the config and just reload the modules.

 

I have a strong preference for compiling things into the kernel, but I am certainly willing to try that for debugging purposes.

 *swimmer wrote:*   

> And you read the wiki did you? ;-)

 

Actually, I did not. I think the wiki spent a lot of time in the ether before it finally got restored. A good resource (mostly because everything is in one place. I have read virtually all of that though over the past few years, but nothing helps.

What is wpa_cli supposed to do?

I just get this:

```

# wpa_cli

wpa_cli v0.6.4

Copyright (c) 2004-2008, Jouni Malinen <j@w1.fi> and contributors

This program is free software. You can distribute it and/or modify it

under the terms of the GNU General Public License version 2.

Alternatively, this software may be distributed under the terms of the

BSD license. See README and COPYING for more details.

Selected interface 'wlan0'

Interactive mode

> <2>CTRL-EVENT-SCAN-RESULTS

<2>CTRL-EVENT-SCAN-RESULTS

<2>CTRL-EVENT-SCAN-RESULTS

<2>CTRL-EVENT-SCAN-RESULTS

[repeats forever]
```

And if I type status, all I get is:

```

status

wpa_state=SCANNING

```

Is there any way of getting more detailed (debug) information?

----------

## curmudgeon

I had access to a different machine today (one with a usb wireless adapter), and tried that one. It behaved the same, except that it briefly connected one time (I can't get it to connect again). Here are some of the relevant lines from the log file:

```

May 24 16:34:58 system usb 2-1: new full speed USB device using uhci_hcd and address 2

May 24 16:34:58 system usb 2-1: configuration #1 chosen from 1 choice

May 24 16:34:58 system usb 2-1: reset full speed USB device using uhci_hcd and address 2

May 24 16:34:58 system zd1211rw 2-1:1.0: eth1

May 24 16:35:15 system dhcpcd[3928]: eth1: dhcpcd 4.0.7 starting

May 24 16:35:16 system zd1211rw 2-1:1.0: firmware version 4725

May 24 16:35:16 system zd1211rw 2-1:1.0: zd1211b chip 0ace:1215 v4810 full 00-02-72 AL2230_RF pa0 g--NS

May 24 16:35:16 system ADDRCONF(NETDEV_UP): eth1: link is not ready

May 24 16:35:16 system dhcpcd[3928]: eth1: waiting for carrier

May 24 16:35:46 system dhcpcd[3928]: eth1: timed out

May 24 16:48:53 system dhcpcd[4153]: eth1: dhcpcd 4.0.7 starting

May 24 16:48:53 system dhcpcd[4153]: eth1: waiting for carrier

May 24 16:49:23 system dhcpcd[4153]: eth1: timed out

May 24 16:55:23 system dhcpcd[4216]: eth1: dhcpcd 4.0.7 starting

May 24 16:55:23 system ADDRCONF(NETDEV_UP): eth1: link is not ready

May 24 16:55:23 system dhcpcd[4216]: eth1: waiting for carrier

May 24 16:55:53 system dhcpcd[4216]: eth1: timed out

May 24 18:00:54 system rc-scripts: WARNING:  net.eth1 has already been started.

May 24 18:01:10 system dhcpcd[3940]: eth1: dhcpcd 4.0.7 starting

May 24 18:01:10 system dhcpcd[3940]: eth1: waiting for carrier

May 24 18:01:40 system dhcpcd[3940]: eth1: timed out

May 24 18:04:36 system dhcpcd[3979]: eth1: dhcpcd 4.0.7 starting

May 24 18:04:36 system dhcpcd[3979]: eth1: waiting for carrier

May 24 18:05:07 system dhcpcd[3979]: eth1: timed out

May 24 18:08:47 system dhcpcd[3998]: eth1: dhcpcd 4.0.7 starting

May 24 18:08:47 system dhcpcd[3998]: eth1: waiting for carrier

May 24 18:09:17 system dhcpcd[3998]: eth1: timed out

May 24 18:11:04 system dhcpcd[4032]: eth1: dhcpcd 4.0.7 starting

May 24 18:11:04 system dhcpcd[4032]: eth1: waiting for carrier

May 24 18:11:34 system dhcpcd[4032]: eth1: timed out

May 24 18:37:16 system rc-scripts: status:  inactive

May 24 18:37:33 system ADDRCONF(NETDEV_UP): eth1: link is not ready

May 24 18:38:52 system dhcpcd[5042]: eth1: dhcpcd 4.0.7 starting

May 24 18:38:52 system dhcpcd[5042]: eth1: waiting for carrier

May 24 18:39:22 system dhcpcd[5042]: eth1: timed out

May 24 18:44:33 system SoftMAC: Open Authentication completed with 00:11:22:33:44:55

May 24 18:44:33 system ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready

May 24 18:44:33 system wpa_cli: interface eth1 CONNECTED

May 24 18:44:35 system dhcpcd[5562]: eth1: dhcpcd 4.0.7 starting

May 24 18:44:35 system dhcpcd[5562]: eth1: broadcasting for a lease

May 24 18:44:35 system dhcpcd[5562]: eth1: offered 192.168.0.2 from 192.168.0.1

May 24 18:44:35 system dhcpcd[5562]: eth1: checking 192.168.0.2 is available on attached networks

May 24 18:44:40 system dhcpcd[5562]: eth1: carrier lost

May 24 18:44:40 system SoftMAC: Open Authentication completed with 00:11:22:33:44:55

May 24 18:44:40 system dhcpcd[5562]: eth1: carrier acquired

May 24 18:44:40 system dhcpcd[5562]: eth1: rebinding lease of 192.168.0.2

May 24 18:44:40 system dhcpcd[5562]: eth1: acknowledged 192.168.0.2 from 192.168.0.1

May 24 18:44:41 system dhcpcd[5562]: eth1: leased 192.168.0.2 for 86400 seconds

May 24 18:44:44 system eth1: no IPv6 routers present

May 24 19:39:28 system dhcpcd[5586]: eth1: carrier lost

May 24 19:39:28 system wpa_cli: interface eth1 DISCONNECTED

May 24 19:39:30 system dhcpcd[5586]: eth1: received SIGTERM, stopping

May 24 19:40:04 system SoftMAC: Open Authentication completed with 00:11:22:33:44:55

May 24 19:40:04 system wpa_cli: interface eth1 CONNECTED

May 24 19:40:06 system dhcpcd[13862]: eth1: dhcpcd 4.0.7 starting

May 24 19:40:06 system dhcpcd[13862]: eth1: broadcasting for a lease

May 24 19:40:07 system dhcpcd[13862]: eth1: offered 192.168.0.2 from 192.168.0.1

May 24 19:40:07 system dhcpcd[13862]: eth1: checking 192.168.0.2 is available on attached networks

May 24 19:40:12 system dhcpcd[13862]: eth1: acknowledged 192.168.0.2 from 192.168.0.1

May 24 19:40:12 system dhcpcd[13862]: eth1: leased 192.168.0.2 for 86400 seconds

May 25 19:31:02 system usb 2-1: new full speed USB device using uhci_hcd and address 3

May 25 19:31:02 system usb 2-1: configuration #1 chosen from 1 choice

May 25 19:31:02 system usb 2-1: reset full speed USB device using uhci_hcd and address 3

May 25 19:31:02 system zd1211rw 2-1:1.0: eth1

May 25 19:31:02 system zd1211rw 2-1:1.0: firmware version 4725

May 25 19:31:02 system zd1211rw 2-1:1.0: zd1211b chip 0ace:1215 v4810 full 00-02-72 AL2230_RF pa0 g--NS

May 25 19:31:02 system ADDRCONF(NETDEV_UP): eth1: link is not ready

May 25 19:34:36 system ADDRCONF(NETDEV_UP): eth1: link is not ready

```

----------

## swimmer

Hmm - are you sure that your router is accepting incoming clients? I'd check that possibility as well and make sure that clients can connect to the router ...

Another option is to not use dynamic but static IP-addresses ...  makes life easier and faster in an home environment where you just have a few known clients connecting  :Wink: 

Did you compile the driver as a module already? 

And give it a try without ap_scan=1?

wpa_cli is the CommandLineInterface for wpa_supplicant btw - it's very helpful for finding out what's going on ... just type 'help' once you've started it  :Wink: 

And if the status is scanning you can use 'scan_results' to see what APs are visible for your network client anyway ...

HTH

swimmer

----------

## curmudgeon

 *swimmer wrote:*   

> Hmm - are you sure that your router is accepting incoming clients? I'd check that possibility as well and make sure that clients can connect to the router ...

 

Definitely. Windoze clients connect without any problem, and I saw that other Linux client connect once (and someone running Ubuntu also connected right away).

 *swimmer wrote:*   

> Another option is to not use dynamic but static IP-addresses ...  makes life easier and faster in an home environment where you just have a few known clients connecting ;-)

 

You have assumed (incorrectly) that I am in a home environment. :) I don't need wireless at home. I need it now (on the road) to connect at places I stay and meet people.

That said, I know the most urgent access point I want to connect with right now will accept static addresses, so I gave it a try (no change).

 *swimmer wrote:*   

> Did you compile the driver as a module already?

 

I have something going on with the machine where I can't reboot right now, but I will give it a try as soon as I can.

 *swimmer wrote:*   

> And give it a try without ap_scan=1?

 

I changed that a couple of days ago based on what I read (most likely based on your comments and the wiki :) ).

 *swimmer wrote:*   

> wpa_cli is the CommandLineInterface for wpa_supplicant btw - it's very helpful for finding out what's going on ... just type 'help' once you've started it ;-)

 

I don't find it too helpful. :) I want more detail.

 *swimmer wrote:*   

> And if the status is scanning you can use 'scan_results' to see what APs are visible for your network client anyway ...

 

Same as always:

```

> scan_results

bssid / frequency / signal level / flags / ssid

00:11:22:33:44:55       2412    226     [WPA-PSK-TKIP]

```

From the other machine, I could at least see connection attempts. On this machine, I just have (other than a couple of stray attempts to other access points) attempts to 00:00:00:00:00:00 (even though I have nothing in wpa_supplicant.conf except for the one access point):

```

May 25 13:33:10 system ADDRCONF(NETDEV_UP): wlan0: link is not ready

May 25 13:33:10 system wlan0: Failed to config new BSSID to the low-level driver

May 25 13:33:10 system wlan0: Failed to config new SSID to the low-level driver

May 25 13:33:10 system wlan0: direct probe to AP 00:00:00:00:00:00 try 2

May 25 13:33:10 system wlan0: direct probe to AP 00:00:00:00:00:00 try 3

May 25 13:33:10 system wlan0: direct probe to AP 00:00:00:00:00:00 timed out

May 25 19:01:05 system ADDRCONF(NETDEV_UP): wlan0: link is not ready

May 26 03:55:24 system iwl3945 0000:02:00.0: PCI INT A disabled

May 26 03:55:25 system iwl3945 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

May 26 03:55:25 system iwl3945 0000:02:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

May 26 03:55:25 system ADDRCONF(NETDEV_UP): wlan0: link is not ready

May 26 03:55:26 system wlan0: Failed to config new BSSID to the low-level driver

May 26 03:55:26 system wlan0: Failed to config new SSID to the low-level driver

May 26 03:55:26 system wlan0: direct probe to AP 00:00:00:00:00:00 try 2

May 26 03:55:26 system wlan0: direct probe to AP 00:00:00:00:00:00 try 3

May 26 03:55:26 system wlan0: direct probe to AP 00:00:00:00:00:00 timed out

May 26 04:06:52 system iwl3945 0000:02:00.0: PCI INT A disabled

May 26 04:10:39 system iwl3945 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

May 26 04:10:39 system iwl3945 0000:02:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

May 26 04:10:39 system ADDRCONF(NETDEV_UP): wlan0: link is not ready

May 26 04:10:40 system wlan0: Failed to config new BSSID to the low-level driver

May 26 04:10:40 system wlan0: Failed to config new SSID to the low-level driver

May 26 04:10:40 system wlan0: direct probe to AP 00:00:00:00:00:00 try 2

May 26 04:10:40 system wlan0: direct probe to AP 00:00:00:00:00:00 try 3

May 26 04:10:40 system wlan0: direct probe to AP 00:00:00:00:00:00 timed out

```

What is causing the "link is not ready" messages? They look important to me.

----------

## d2_racing

When you have this can you post that :

```

# iwconfig

# lsmod

# wpa_cli status

```

----------

## curmudgeon

 *d2_racing wrote:*   

> When you have this can you post that :
> 
> ```
> 
> # iwconfig
> ...

 

```

# iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

dummy0    no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11abg  ESSID:""

          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated

          Tx-Power=15 dBm

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B

          Encryption key:off

          Power Management:off

          Link Quality:0  Signal level:0  Noise level:0

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

sit0      no wireless extensions.

# lsmod

Module                  Size  Used by

# wpa_cli status

Selected interface 'wlan0'

wpa_state=SCANNING
```

Obviously it seems strange that the module is not getting loaded.

I don't know much about using modules, but when I tried to load it, I get this:

```

# modprobe iwl3945

FATAL: Error inserting iwl3945 (/lib/modules/2.6.28-gentoo-r5/kernel/drivers/net/wireless/iwlwifi/iwl3945.ko): Invalid argument

```

Nothing interesting in the log (I have posted all of those messages before).

Edited to add:

I want to try to debug the wireless attempts on the other computer (with the USB adapter).

Everything looks identical to this one, except that the module (zd1211rw) does load (size 53572, used by 0).

----------

## curmudgeon

I must have done something wrong trying to build this as a module. This looks completely hopeless:

```

# /etc/init.d/net.wlan0 start

 * Starting wlan0

SIOCSIFFLAGS: No such device

SIOCSIFFLAGS: No such device

 *   Starting wpa_supplicant on wlan0 ...

SIOCSIFFLAGS: No such device

SIOCSIFFLAGS: No such device

Could not set interface 'wlan0' UP                               [ ok ]

 *   Starting wpa_cli on wlan0 ...                               [ ok ]

 *     Backgrounding ...

```

----------

## swimmer

Ah - so you were able to compile everything as a module now? And you switched kernel? Good  :Wink: 

You ran 

```
depmod -a && update-modules
```

 after compiling the modules?

Can you post the output of 

```
grep 'iwl|80211' /etc/modprobe.conf
```

swimmer

----------

## curmudgeon

 *swimmer wrote:*   

> Ah - so you were able to compile everything as a module now? And you switched kernel? Good ;-)
> 
> You ran 
> 
> ```
> ...

 

No, I didn't know I was supposed to do that, but I did it now. :)

 *swimmer wrote:*   

> Can you post the output of 
> 
> ```
> grep 'iwl|80211' /etc/modprobe.conf
> ```
> ...

 

Easy to do because it is empty:

```

# grep 'iwl|80211' /etc/modprobe.conf

#

```

I did finally get the module loaded.

```

# lsmod

Module                  Size  Used by

iwl3945                72284  0

```

Nothing else has changed, though.

----------

## d2_racing

Hi, can you post this :

```

# rmmod iwl3945

# modprobe iwl3945

# dmesg | tail

# iwconfig

```

----------

## curmudgeon

 *d2_racing wrote:*   

> Hi, can you post this :
> 
> ```
> 
> # rmmod iwl3945
> ...

 

The first two didn't produce any output.

Then:

```

# dmesg | tail

iwl3945: Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux, 1.2.26k

iwl3945: Copyright(c) 2003-2008 Intel Corporation

iwl3945 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

iwl3945 0000:02:00.0: setting latency timer to 64

iwl3945: Detected Intel Wireless WiFi Link 3945ABG

iwl3945: Tunable channels: 11 802.11bg, 13 802.11a channels

phy1: Selected rate control algorithm 'iwl-3945-rs'

iwl3945 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

iwl3945 0000:02:00.0: firmware: requesting iwlwifi-3945-1.ucode

ADDRCONF(NETDEV_UP): wlan0: link is not ready

# iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

dummy0    no wireless extensions.

sit0      no wireless extensions.

ip6tnl0   no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11abg  ESSID:""

          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated

          Tx-Power=15 dBm

          Retry min limit:7   RTS thr:off   Fragment thr=2352 B

          Encryption key:off

          Power Management:off

          Link Quality:0  Signal level:0  Noise level:0

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

----------

## d2_racing

Can you post this :

```

# uname -a

# equery list iwl

# equery list ipw

# lsmod

```

----------

## curmudgeon

 *d2_racing wrote:*   

> Can you post this :
> 
> ```
> 
> # uname -a
> ...

 

```

# uname -a

Linux system 2.6.28-gentoo-r5 #2 SMP Tue May 26 14:21:55 UTC 2009 i686 Intel(R) Core(TM)2 CPU T5200 @ 1.60GHz GenuineIntel GNU/Linux

# equery list iwl

[ Searching for package 'iwl' in all categories among: ]

 * installed packages

[I--] [  ] net-wireless/iwl3945-ucode-15.28.1.8 (0)

# equery list ipw

[ Searching for package 'ipw' in all categories among: ]

 * installed packages

# lsmod

Module                  Size  Used by

iwl3945                72284  0

```

----------

## swimmer

Perhaps trying the latest iwl3945-ucode-15.32.2.9 ?

Not sure about that but you could give it a try indeed ... after emerging it you have to reload the module and see if it changes anything ...

HTH

swimmer

----------

## d2_racing

I think that the latest iwl3945-ucode is compatible only with the kernel 2.6.29....

----------

## pigeon768

/etc/conf.d/net is not actually required. The scripts will automatically select good values if you don't have any. I'd recommend leaving it blank until you know you need it.

I personally can't make sense of wpa_cli - fortunately, wpa_gui is simple. wpa_gui is a good first step to figure out what you need to put in /etc/wpa_supplicant/wpa_supplicant.conf

----------

## swimmer

 *d2_racing wrote:*   

> I think that the latest iwl3945-ucode is compatible only with the kernel 2.6.29....

 Are you sure about that d2_racing? I'm using the  latest iwl4965-ucode since quite some time already for all kind of kernels ... gentoo-sources in any case but not only 2.6.29 but also for 2.6.28 ...

----------

## d2_racing

To be sure, install the package and at the end, I have a big warning on my Gentoo testing box that says if need to double check your kernel version, because you may need to use the slotted version of the package.

I don't have the message in front of me, but it's something like this.

----------

## curmudgeon

I think I have made some progress here. :)

Somebody gave me an ubuntu livecd to try, and I put it in the other machine (with the USB wireless adapter), and it connected almost instantly. I just typed in the ssid and passphrase.

Again, it is easier for me to do dubugging with that machine, because it is not doing any real "work" right now.

This obviously seemed like a configuration issue, so I started looking through the logs.

I noticed it was using the same version of wpa_supplicant (0.6.4), but /var/log/wpa_supplicant.log did not seem very helpful:

```

CTRL-EVENT-SCAN-RESULTS

CTRL-EVENT-SCAN-RESULTS

CTRL-EVENT-SCAN-RESULTS

Trying to associate with 00:11:22:33:44:55 (SSID='thetarget' freq=2412 MHz)

Associated with 00:11:22:33:44:55

WPA: Key negotiation completed with 00:11:22:33:44:55 [PTK=TKIP GTK=TKIP]

CTRL-EVENT-CONNECTED - Connection to 00:11:22:33:44:55 completed (auth) [id=0 id_str=]

CTRL-EVENT-SCAN-RESULTS

CTRL-EVENT-SCAN-RESULTS

CTRL-EVENT-SCAN-RESULTS

```

So I looked at  /var/log/syslog:

```

May 27 05:10:21 ubuntu NetworkManager: <info>  Activation (wlan0) starting connection 'thetarget'

May 27 05:10:21 ubuntu NetworkManager: <info>  (wlan0): device state change: 3 -> 4

May 27 05:10:21 ubuntu NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...

May 27 05:10:21 ubuntu NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) started...

May 27 05:10:21 ubuntu NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...

May 27 05:10:21 ubuntu NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.

May 27 05:10:21 ubuntu NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) starting...

May 27 05:10:21 ubuntu NetworkManager: <info>  (wlan0): device state change: 4 -> 5

May 27 05:10:21 ubuntu NetworkManager: <info>  Activation (wlan0/wireless): connection 'thetarget' has security, and secrets exist.  No new secrets needed.

May 27 05:10:21 ubuntu NetworkManager: <info>  Config: added 'ssid' value 'thetarget'

May 27 05:10:21 ubuntu NetworkManager: <info>  Config: added 'scan_ssid' value '1'

May 27 05:10:21 ubuntu NetworkManager: <info>  Config: added 'key_mgmt' value 'WPA-PSK'

May 27 05:10:21 ubuntu NetworkManager: <info>  Config: added 'psk' value '<omitted>'

May 27 05:10:21 ubuntu NetworkManager: <info>  Config: added 'proto' value 'WPA RSN'

May 27 05:10:21 ubuntu NetworkManager: <info>  Config: added 'pairwise' value 'TKIP CCMP'

May 27 05:10:21 ubuntu NetworkManager: <info>  Config: added 'group' value 'WEP40 WEP104 TKIP CCMP'

May 27 05:10:21 ubuntu NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) complete.

May 27 05:10:21 ubuntu NetworkManager: <info>  Config: set interface ap_scan to 1

May 27 05:10:21 ubuntu NetworkManager: <info>  (wlan0): supplicant connection state change: 1 -> 2

May 27 05:10:22 ubuntu NetworkManager: <info>  (wlan0): supplicant connection state change: 2 -> 3

May 27 05:10:22 ubuntu kernel: [  312.647391] wlan0: authenticate with AP 00:11:22:33:44:55

May 27 05:10:22 ubuntu kernel: [  312.649546] wlan0: authenticated

May 27 05:10:22 ubuntu kernel: [  312.649567] wlan0: associate with AP 00:11:22:33:44:55

May 27 05:10:22 ubuntu kernel: [  312.654537] wlan0: RX AssocResp from 00:11:22:33:44:55 (capab=0x431 status=0 aid=1)

May 27 05:10:22 ubuntu kernel: [  312.654556] wlan0: associated

May 27 05:10:22 ubuntu NetworkManager: <info>  (wlan0): supplicant connection state change: 3 -> 4

May 27 05:10:22 ubuntu NetworkManager: <info>  (wlan0): supplicant connection state change: 4 -> 5

May 27 05:10:22 ubuntu NetworkManager: <info>  (wlan0): supplicant connection state change: 5 -> 6

May 27 05:10:22 ubuntu NetworkManager: <info>  (wlan0): supplicant connection state change: 6 -> 7

May 27 05:10:22 ubuntu NetworkManager: <info>  Activation (wlan0/wireless) Stage 2 of 5 (Device Configure) successful.  Connected to wireless network 'thetarget'.

May 27 05:10:22 ubuntu NetworkManager: <info>  Activation (wlan0) Stage 3 of 5 (IP Configure Start) scheduled.

May 27 05:10:22 ubuntu NetworkManager: <info>  Activation (wlan0) Stage 3 of 5 (IP Configure Start) started...

May 27 05:10:22 ubuntu NetworkManager: <info>  (wlan0): device state change: 5 -> 7

May 27 05:10:22 ubuntu NetworkManager: <info>  Activation (wlan0) Beginning DHCP transaction.

May 27 05:10:22 ubuntu NetworkManager: <info>  dhclient started with pid 7747

May 27 05:10:22 ubuntu NetworkManager: <info>  Activation (wlan0) Stage 3 of 5 (IP Configure Start) complete.

May 27 05:10:22 ubuntu dhclient: Internet Systems Consortium DHCP Client V3.1.1

May 27 05:10:22 ubuntu dhclient: Copyright 2004-2008 Internet Systems Consortium.

May 27 05:10:22 ubuntu dhclient: All rights reserved.

May 27 05:10:22 ubuntu dhclient: For info, please visit http://www.isc.org/sw/dhcp/

May 27 05:10:22 ubuntu dhclient:

May 27 05:10:22 ubuntu dhclient: wmaster0: unknown hardware address type 801

May 27 05:10:22 ubuntu NetworkManager: <info>  DHCP: device wlan0 state changed (null) -> preinit

May 27 05:10:22 ubuntu dhclient: wmaster0: unknown hardware address type 801

May 27 05:10:22 ubuntu dhclient: Listening on LPF/wlan0/00:22:44:66:88:aa

May 27 05:10:22 ubuntu dhclient: Sending on   LPF/wlan0/00:22:44:66:88:aa

May 27 05:10:22 ubuntu dhclient: Sending on   Socket/fallback

May 27 05:10:26 ubuntu dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4

May 27 05:10:29 ubuntu dhclient: DHCPOFFER of 192.168.0.2 from 192.168.0.1

May 27 05:10:29 ubuntu dhclient: DHCPREQUEST of 192.168.0.2 on wlan0 to 255.255.255.255 port 67

May 27 05:10:29 ubuntu dhclient: DHCPACK of 192.168.0.2 from 192.168.0.1

May 27 05:10:29 ubuntu NetworkManager: <info>  DHCP: device wlan0 state changed preinit -> bound

May 27 05:10:29 ubuntu NetworkManager: <info>  Activation (wlan0) Stage 4 of 5 (IP Configure Get) scheduled...

May 27 05:10:29 ubuntu NetworkManager: <info>  Activation (wlan0) Stage 4 of 5 (IP Configure Get) started...

May 27 05:10:29 ubuntu NetworkManager: <info>    address 192.168.0.2

May 27 05:10:29 ubuntu NetworkManager: <info>    prefix 24 (255.255.255.0)

May 27 05:10:29 ubuntu NetworkManager: <info>    gateway 192.168.0.1

May 27 05:10:29 ubuntu NetworkManager: <info>    nameserver '192.168.0.1'

May 27 05:10:29 ubuntu NetworkManager: <info>  Activation (wlan0) Stage 5 of 5 (IP Configure Commit) scheduled...

May 27 05:10:29 ubuntu NetworkManager: <info>  Activation (wlan0) Stage 4 of 5 (IP Configure Get) complete.

May 27 05:10:29 ubuntu NetworkManager: <info>  Activation (wlan0) Stage 5 of 5 (IP Configure Commit) started...

May 27 05:10:29 ubuntu avahi-daemon[6593]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.0.2.

May 27 05:10:29 ubuntu avahi-daemon[6593]: New relevant interface wlan0.IPv4 for mDNS.

May 27 05:10:29 ubuntu avahi-daemon[6593]: Registering new address record for 192.168.0.2 on wlan0.IPv4.

May 27 05:10:29 ubuntu dhclient: bound to 192.168.0.2 -- renewal in 35562 seconds.

May 27 05:10:30 ubuntu NetworkManager: <info>  (wlan0): device state change: 7 -> 8

May 27 05:10:30 ubuntu NetworkManager: <debug> [1243401030.339338] periodic_update(): Roamed from BSSID 00:11:22:33:44:55 (thetarget) to 00:11:22:33:44:55 (thetarget)

May 27 05:10:30 ubuntu NetworkManager: <info>  Policy set 'thetarget' (wlan0) as default for routing and DNS.

May 27 05:10:30 ubuntu NetworkManager: <info>  Activation (wlan0) successful, device activated.

May 27 05:10:30 ubuntu NetworkManager: <info>  Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete.

```

I didn't see anything the first couple of times, but finally I paid more attention to these lines:

```

May 27 05:10:21 ubuntu NetworkManager: <info>  Config: added 'ssid' value 'thetarget'

May 27 05:10:21 ubuntu NetworkManager: <info>  Config: added 'scan_ssid' value '1'

May 27 05:10:21 ubuntu NetworkManager: <info>  Config: added 'key_mgmt' value 'WPA-PSK'

May 27 05:10:21 ubuntu NetworkManager: <info>  Config: added 'psk' value '<omitted>'

May 27 05:10:21 ubuntu NetworkManager: <info>  Config: added 'proto' value 'WPA RSN'

May 27 05:10:21 ubuntu NetworkManager: <info>  Config: added 'pairwise' value 'TKIP CCMP'

May 27 05:10:21 ubuntu NetworkManager: <info>  Config: added 'group' value 'WEP40 WEP104 TKIP CCMP'

```

So I copied all of those into /etc/wpa_supplicant/wpa_supplicant.conf, and tried again (back on the iwl machine). This time it worked!

I am going to do a bit more testing on the other machine to try to figure out exactly which line was the key one.

----------

## d2_racing

In fact, post your old configuration and your new one.

----------

## curmudgeon

 *d2_racing wrote:*   

> In fact, post your old configuration and your new one.

 

I have had so many "old" configurations, I hardly know which one to post. :)

It looks like (despite all of my previous efforts) I still had a lot of things wrong.

For the old one, let's go with the one I posted earlier on this page:

```

ap_scan=1 

ctrl_interface=/var/run/wpa_supplicant 

ctrl_interface_group=0

network={ 

    bssid=00:11:22:33:44:55 

    psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef 

    }

```

I had some deprecated syntax for the control inteface as well as the unnecessary ap_scan parameter.

It actually looks (after more hours of testing just for my curiosity) that the scan_ssid line was the vital missing piece.

So now:

```

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=dialout

network={

    ssid="thetarget"

    psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef 

    scan_ssid=1

    }

```

I want to thank everyone SO much for their help. This has been frustrating me for a LONG time.

----------

## d2_racing

I'm glad that you have solved your problem.

----------

## curmudgeon

 *d2_racing wrote:*   

> I'm glad that you have solved your problem.

 

So am I (that will give me some time to work on plenty of OTHER problems that I have on a half-dozen various computers :) ).

----------

## swimmer

Glad to hear it's working now  :Wink: 

----------

