# Trouble with intel 4965 wireless network card

## BrummieJim

Hi,

I'm trying to get this card up and running with the iwl4965 driver from the 2.6.24 vanilla kernel  and I can get the kernel to produce the modules and load them, but I never get an eth1 coming up. I've also installed the 4965 firmware. Here's some information

Relevant lines of dmesg

iwl4965: Intel(R) Wireless WiFi Link 4965AGN driver for Linux, 1.1.17kds

iwl4965: Copyright(c) 2003-2007 Intel Corporation

ACPI: PCI Interrupt 0000:0b:00.0[A] -> GSI 17 (level, low) -> IRQ 17

PCI: Setting latency timer of device 0000:0b:00.0 to 64

iwl4965: Detected Intel Wireless WiFi Link 4965AGN

ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 21 (level, low) -> IRQ 21

PCI: Setting latency timer of device 0000:00:1b.0 to 64

nvidia: module license 'NVIDIA' taints kernel.

iwl4965: Tunable channels: 13 802.11bg, 19 802.11a channels

phy0: Selected rate control algorithm 'iwl-4965-rs'

phy0: Failed to initialize wep

x1-6-00-15-c5-86-4f-99 ja # lsmod

Module                  Size  Used by

michael_mic             4608  0

arc4                    4096  0

cryptomgr               5312  0

aes_generic            28272  0

ecb                     5120  0

blkcipher               8004  1 ecb

crypto_algapi          15808  6 michael_mic,arc4,cryptomgr,aes_generic,ecb,blkcipher

scsi_wait_scan          3520  0

s2io                   72312  0

skge                   39760  0

eeprom                  8656  0

i2c_dev                 8392  0

snd_seq_device          8144  0

snd_seq                50112  0

snd_pcm_oss            39456  0

snd_mixer_oss          16640  1 snd_pcm_oss

sco                    12608  0

rfcomm                 36768  0

hidp                   18304  0

bnep                   13504  0

l2cap                  22400  5 rfcomm,hidp,bnep

bluetooth              53444  5 sco,rfcomm,hidp,bnep,l2cap

rfkill                  8340  0

nvidia               8845796  26

snd_hda_intel         350056  2

iwl4965               189160  0

snd_pcm                75080  2 snd_pcm_oss,snd_hda_intel

snd_timer              21960  2 snd_seq,snd_pcm

snd_page_alloc         10192  2 snd_hda_intel,snd_pcm

snd_hwdep               9928  1 snd_hda_intel

mac80211              112972  1 iwl4965

i2c_i801               10332  0

sky2                   44484  0

snd                    52408  12 snd_seq_device,snd_seq,snd_pcm_oss,snd_mixer_oss,snd_hda_intel,snd_pcm,snd_timer,snd_hwdep

cfg80211               14288  1 mac80211

i2c_core               22272  4 eeprom,i2c_dev,nvidia,i2c_i801

I've linked net.eth1 to net.lo and added it to default and here's my /etc/conf.d/net

config_eth0=("dhcp")

dhcp_eth0="nodns nontp nonis"

modules=("wpa_supplicant")

wpa_supplicant_eth1="-Diwl4965"

config_eth1=("dhcp")

dhcp_eth1="nodns nontp nonis"

I've checked for other possible devices in /dev i.e. wlan0 but there doesn't seem to be any.

Thanks for any help you can offer with this!

----------

## slackline

Hi Jim,

Just checking the forums, and yours happened to be at the top   :Very Happy: 

Its failing on initialising WEP, and your currently using wpa_supplicant to configure the device.

```

iwl4965: Intel(R) Wireless WiFi Link 4965AGN driver for Linux, 1.1.17kds

iwl4965: Copyright(c) 2003-2007 Intel Corporation

ACPI: PCI Interrupt 0000:0b:00.0[A] -> GSI 17 (level, low) -> IRQ 17

PCI: Setting latency timer of device 0000:0b:00.0 to 64

iwl4965: Detected Intel Wireless WiFi Link 4965AGN

ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 21 (level, low) -> IRQ 21

PCI: Setting latency timer of device 0000:00:1b.0 to 64

nvidia: module license 'NVIDIA' taints kernel.

iwl4965: Tunable channels: 13 802.11bg, 19 802.11a channels

phy0: Selected rate control algorithm 'iwl-4965-rs'

phy0: Failed to initialize wep 

```

and

```

modules=("wpa_supplicant")

wpa_supplicant_eth1="-Diwl4965" 

```

Before jumping straight in with WEP/WPA have you got it working using net-wireless/wireless-tools and no encryption?

The supported hardware for wpa_supplicant (see here) suggests that they may not work (unless your card matches the first line qualifier).

So I'd try it without WEP/WPA (means opening up your network, but it only needs to be for a short period, and having MAC filtering enabled would be useful anyway).  If that works you then need to work out why its failing to initialise WEP.

So, how/where are you setting your key for WEP?

Is your router configured to use WEP and/or WPA?

slack

P.S. - Use bbcode you slacker and thanks for the signature   :Wink: 

----------

## BrummieJim

I think the problems deeper than that, I don't even get a eth1 or anything else to try and bring up and connect.

----------

## slackline

Ahh, sorry, I read through it and assumed that 'cause you'd written /etc/conf.d/net to use eth1 that it was being detected and assigned to that device.

dmesg and lsmod make it look like the driver is loaded okay, but if its not then iwconfig won't return any devices either.

A quick sanity check would be to run iwconfig to see if the driver is loaded and its being assigned to anything else other than eth1/wlan0/anything else, see HARDWARE Wireless - Checking if the driver loaded.

If iwconfig doesn't return anything then the kernel isn't loaded properly, and we'll have to trouble shoot there.

slack

----------

## BrummieJim

Here's the answer, not that it looks good.

x1-6-00-15-c5-86-4f-99 ja # iwconfig

lo        no wireless extensions.

sit0      no wireless extensions.

eth0      no wireless extensions.

----------

## slackline

No that doesn't look good at all   :Sad: 

Your using net-wireless/iwl4965 right?

There's a howto for a different comp, but with the same wireless card (see here).  It says that you configure it the same as ipw3945 which will work with either the net-wireless/ipw3945 driver, or net-wireless/iwlwifi so it might be worth trying it with the iwlwifi driver as opposed to iwl4965 if thats what your using at the moment.

slack

----------

## BrummieJim

To be honest, Iwasn't sure what it meant by

 *Quote:*   

> 
> 
> Now you need to clean up your device names. Problems occur here because some drivers refer to your wireless interface as wlan0, some as ethX. You need to reconfigure /etc/udev/rules.d/70-persistent-net or recreate the rules there (simple).
> 
> 

 

but I'd done the rest of the stuff, aided and abetted by things in the forum.

----------

## slackline

 *BrummieJim wrote:*   

> To be honest, Iwasn't sure what it meant by
> 
>  *Quote:*   
> 
> Now you need to clean up your device names. Problems occur here because some drivers refer to your wireless interface as wlan0, some as ethX. You need to reconfigure /etc/udev/rules.d/70-persistent-net or recreate the rules there (simple).
> ...

 

Ahh, came across this the other day when trying to trouble shoot my wireless network card.

You can delete that file and its recreated when you boot.

What are the contents of the file at present?

If you've not rebooted since getting the driver installed try deleting it, rebooting and seeing if you now have a device.

slack

----------

## BrummieJim

 *Quote:*   

> 
> 
> # This file was automatically generated by the /lib/udev/write_net_rules
> 
> # program, probably run by the persistent-net-generator.rules rules file.
> ...

 

I have rebooted several times since installing everything though, wondering about deleting it a seeing how it goes?

[/quote]

----------

## BrummieJim

Weird, I saw someone else had some success removing and reinstalling the driver i.e.

modprobe -r iwl4965

wait and then,

modprobe iwl4965

x1-6-00-15-c5-86-4f-99 ja # modprobe -r iwl4965

x1-6-00-15-c5-86-4f-99 ja # modprobe  iwl4965

x1-6-00-15-c5-86-4f-99 ja # iwconfig

lo        no wireless extensions.

sit0      no wireless extensions.

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11g  ESSID:""

          Mode:Managed  Channel:0  Access Point: Not-Associated

          Tx-Power=0 dBm

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

          Encryption key: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

x1-6-00-15-c5-86-4f-99 ja # iwlist wlan0 scan

wlan0     Interface doesn't support scanning : Network is down

x1-6-00-15-c5-86-4f-99 ja # ifconfig

eth0      Link encap:Ethernet  HWaddr 00:15:C5:86:4F:99

          inet addr:92.232.214.141  Bcast:255.255.255.255  Mask:255.255.255.0

          inet6 addr: fe80::215:c5ff:fe86:4f99/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:4028824 (3.8 Mb)  TX bytes:383568 (374.5 Kb)

          Interrupt:16

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)

x1-6-00-15-c5-86-4f-99 ja # ifconfig wlan0 up

x1-6-00-15-c5-86-4f-99 ja # ifconfig

eth0      Link encap:Ethernet  HWaddr 00:15:C5:86:4F:99

          inet addr:92.232.214.141  Bcast:255.255.255.255  Mask:255.255.255.0

          inet6 addr: fe80::215:c5ff:fe86:4f99/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:4052162 (3.8 Mb)  TX bytes:384096 (375.0 Kb)

          Interrupt:16

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)

wlan0     Link encap:Ethernet  HWaddr 00:1D:E0:7F:CC:4B

          UP 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-1D-E0-7F-CC-4B-60-00-00-00-00-00-00-00-00-00

          UP BROADCAST RUNNING 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)

x1-6-00-15-c5-86-4f-99 ja # iwlist wlan0 scan

wlan0     Scan completed :

          Cell 01 - Address: 00:18:4D:F8:5E:F0

                    ESSID:"SKY03209"

                    Mode:Master

                    Channel:1

                    Frequency:2.412 GHz (Channel 1)

                    Quality=46/100  Signal level=-81 dBm  Noise level=-127 dBm

                    Encryption key:on

                    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; 6 Mb/s; 9 Mb/s

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

                              48 Mb/s; 54 Mb/s

                    Extra:tsf=0000000edb1cfb04

So now I've narrowed the problem down, but still can't work it out to come up on boot.

----------

## slackline

 *BrummieJim wrote:*   

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

 

I think it persists across sessions, but if its not present it will be recreated on booting.

Worth copying the current one to a back-up just in case...

```

cp /etc/udev/rules.d/70-persistent-net.rules ~/.

```

slack

----------

## slackline

 *BrummieJim wrote:*   

> Weird, I saw someone else had some success removing and reinstalling the driver i.e.
> 
> ```
> 
> x1-6-00-15-c5-86-4f-99 ja # modprobe -r iwl4965
> ...

 

Wicked, thats some headway then  :Smile: , I reckon deleting the /etc/udev/rules.d/70-persistent-net.rules should sort it out, fingers crossed.

----------

## BrummieJim

nah,it  just replaced the file as is. I think udev isn't writing the rule correctly as the driver's not working correctly, so there's still a problem.

----------

## slackline

 *BrummieJim wrote:*   

> nah,it  just replaced the file as is. I think udev isn't writing the rule correctly as the driver's not working correctly, so there's still a problem.

 

Well you got the driver to work when you inserted it manually, so I don't think its the driver per se thats the problem, but perhaps that udev isn't handling it correctly, what about writing your own custom udev rules then?

A good guide for this is here

Start by looking in /sys/class/net/ to see what devices are listed...

```

ls /sys/class/net/

```

Then use udevinfo to tell you more about the device itself...

```

udevinfo -a -p /sys/class/net/eth0

```

...although obviously you don't need to do it for eth0, but something else that your wireless card is being detected at.

Then follow the above article for writing your own rule (see section on Network Intefaces which inidcates that you don't get a device node, hence why you couldn't find anything in /dev/eth*)

Write your rules to /etc/udev/rules.d/10-local.rules as these will then be processed in favour of anything else on the system.

Let us know how it goes (or if its a bad idea and doesn't lead anywhere!).

slack

P.S. - Welcome to the "Guru" club with your 300th post  :Smile: 

----------

## BrummieJim

just been trying to re-arrange the order of the module loading in /etc/modules.autoload.d/kernel-2.6, but made no difference.

At the moment, 

x1-6-00-15-c5-86-4f-99 ja # ls /sys/class/net

eth0  lo  sit0

so there's nothing for a udev rule to get hold of, I think.

----------

## slackline

Hmm, thats strange, what are the contents of /sys/class/net if you remove and then insert the module manually?

----------

## BrummieJim

D'oh,

x1-6-00-15-c5-86-4f-99 ja # modprobe -r iwl4965

x1-6-00-15-c5-86-4f-99 ja # modprobe  iwl4965

x1-6-00-15-c5-86-4f-99 ja # ls /sys/class/net

eth0  lo  sit0  wlan0  wmaster0

----------

## slackline

Excellent, so you can write a custom rule based on the device now.  Its then a case of sussing out why the module isn't loaded correctly on booting.

Something like...

```

SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="[INSERT YOUR WIRELESS MAC ADDRESS HERE]", NAME="eth1"

```

...should do it.

We'll get there soon   :Smile: 

P.S. - the "Code" tags ([ code] and [ /code] with out the spaces after the opening brackets) are handy for delineating between text and code.

----------

## slackline

Hi Jim,

Just found this which suggests that it may be a problem with the cryptographic modules thats preventing the module from being loaded properly (see posts near top from reify and gnilor, although I couldn't find any follow up indicating whether ensuring the modules listed are loaded worked).

In fact the later pages of that thread may contain some useful info if you've not already used them.

Off home now, but will be online this pm.  When are you heading out (if you haven't done so already)?

slack

----------

## BrummieJim

Tried everything now;  still get from dmesg

iwl4965: Detected Intel Wireless WiFi Link 4965AGN

ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 16 (level, low) -> IRQ 16

PCI: Setting latency timer of device 0000:01:00.0 to 64

NVRM: loading NVIDIA UNIX x86_64 Kernel Module  169.12  Thu Feb 14 17:51:09 PST 2008

iwl4965: Tunable channels: 13 802.11bg, 19 802.11a channels

phy0: Selected rate control algorithm 'iwl-4965-rs'

phy0: Failed to initialize wep

iwl4965: Failed to register network device (error -12)

If I modprobe -r iwl4965 and modprobe iwl4965

iwl4965: Detected Intel Wireless WiFi Link 4965AGN

iwl4965: Tunable channels: 13 802.11bg, 19 802.11a channels

phy0: Selected rate control algorithm 'iwl-4965-rs'

it works.

Also added the udev rule, but doesn't seem to have helped.

----------

## slackline

Is that still with wpa_supplicant to configure the interface as per earlier post?

Might be worth trying wireless-tools as an alternative.

There might also be something you can do with /etc/conf.d/bootmisc to "manually" remove and insert the module on booting (akin to doing it yourself after booting really).  Its not an ideal solution as it doesn't really solve why its not working, but would maybe work as a stop gap.

Perhaps you could get more info out of packages using debug options, particularly in the kernel itself.

slack

----------

## slackline

Adding the following lines should do the 'trick'

```

## Remove and insert modeulf ro iwl4965 wireless card

/sbin/modprobe -r iwl4965

/sbin/modprobe iwl4965 

```

slack

----------

## BrummieJim

Yeah, I just hate doing that kind of thing, makes everything messy and you've got to remember when it was done and that you've actually done it. Besides it should work, and I can't see why it isn't.

----------

## slackline

Yep I agree its messy and it was just a work around, but I'm thinking its something to do with the configuration that is making the module be unloaded (since it is actually loading as shown by your dmesg, its just that it then gets unloaded during configuration).

What about using wireless-tools as opposed to wpa_supplicant?

See my first post which links to the wpa_supplicant page and the question about whether your card is actually supported by wpa_supplicant (which I'm not sure it is, and if its not then its not surprising that wpa_supplicant can't configure the card).

----------

## slackline

Here are a few other threads that I've found on the subject (you've probably already read these, but I don't know what you have/haven't read as theres no link, so I thought I'd mention them)

wpa_supplicant and wireless-tools questions, intel 4965

ipw 4965 and wpa_supplicant - mostly working

iwl4965 and wpa_supplicant * Possibly useful info for below from second post in this thread

problems with iwl4965

[SOLVED] Intel IWL4965 Problem * Might be useful given title, looks like it could well be down to cryptographics modules  :Wink: 

What does your wpa_supplicant.conf file look like too?  If you card is supported (and some others seem to have had more success) then there might be some tweaking in that file.

Can you get any more info from your kernel by enabling debugging (or even from wpa_supplicant).

As a complete aside I was reading a book on wireless the other day and it said that one of the main problems with wireless is that the chip manufacturers often change/tweak the specs without changing the reported name of the chip.

----------

## BrummieJim

found the problem with having to reload the iwl4965 driver. Had it when running ~amd64, reinstalled as stable and as soon as I updated from 4.1.2 to 4.2.3 and emerged system, problem returned.

----------

