HOWTO: Intel 4965 AGN Wireless

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

HOWTO: Intel 4965 AGN Wireless

Postby benuski » 2007-08-19 20:59

EDIT: #1: The iwlwifi wifi drivers for both 4965 and 3945 are now in the mainstream kernel, as of 2.6.23, which is now available in Sid. Just install it, and you shouldn't need to do anything else thats described here.

#2: I finally decided to update the top part of this, using information thats from all of the subsequent posts. Although, I would still recommend you read all of the other posts, because I haven't been fiddling with this driver for a couple months, and other people are more knowledgable about this than me.

This howto is to try and get Intel 4965 wifi cards, found in the Santa Rosa chipset, working. Since the iwlwifi driver is not yet in the Debian repositories, to get it to work requires you to download that and compile it yourself. There are a couple of deviations from the normal "Make" "Make install" process to get it to work properly, so here they are.

This Howto assumes a 2.6.22 kernel, which has mac80211 already built in. I assume if you compile and load it for 2.6.21, it should work, but I haven't tested that.

1. Make sure you have linux-headers-2.6.22-1 and linux-source-2.6.22 downloaded from the Debian repositories.

2. Unpacked the linux-source-2.6.22 into the /usr/src folder. This is the same folder that the .tar file is downloaded to.

3. Go here and download the newest 4965-ucode package(or just do an "apt-get install firmware-iwlwifi, with non-free enabled), and the newest iwlwifi package.

4. Then do a "tar xvf" for the ucode package, and then move it into /lib/firmware.

5. Then do a "tar xvf" for the iwlwifi driver. It doesn't matter what directory you do this in, I did it in my /home folder.

6. Then do a "ln -s /usr/src/linux-source-2.6.22 /lib/modules/2.6.22-1-amd64/source"

7. Then cd to your iwlwifi folder, "make" and "make install". That should be all thats necessary.

Any corrections much appreciated, for content as well as style. I've never written a howto before. Also, there are still errors in this driver; for example, on my T61, it requires network manager to be installed and I have to do an "ifdown wlan0" and "ifup wlan0" after I log in. (I've actually gotten it to work with nm-applet now, so I don't have to do this anymore)
Last edited by benuski on 2007-12-05 21:14, edited 3 times in total.
benuski
 
Posts: 234
Joined: 2006-12-24 21:07
Location: Richmond, Va.

Errata

Postby Wojtek » 2007-08-25 12:27

In step 2 one must simply go to /usr/src (after installing the linux-source package) and write:
Code: Select all
tar xjf linux-source-2.6.22.tar.bz2


I'd add a "Step 9", because one needs to:
Code: Select all
modprobe iwl4965

before one can actually use the module :). I'd also add the module name to the /etc/modules file, just in case.

Now to start your connection (supposing that you're router uses DHCP ip allocation):
Code: Select all
ifconfig wlan0 up
iwconfig wlan0 essid your_essid
dhclient ath0


In order to stop the connection:

Code: Select all
ifconfig wlan0 down


I haven't used network-manager yet and I'm not really into the "network interfaces" files from /etc, so I help myself with scripts which consist of the "start" and "stop" codes above and putting them in /usr/sbin (you'll need to do a "chmod -x" on them prior to execution of couse). I add a line with the name of the starting script to the /etc/rc.local file (prior to the "exit 0" line) and thanks to that I've got access to the net right from the system startup.

Of course this solution is most practical when a laptop is sitting around in the vicinity of the same network. That's why using apps like network-manager is kinda better for the more mobile users ;).

Oh and one other imporant thing. I used the iwlwifi 1.0.0-1 version and the above steps worked correct, but yesterday I've downloaded the newest iwlwifi version (0.1.11) and I've had problems with bringing the module up. The error said that it couldn't find the firmware file and printed out the filename. The problem here was that the .ucode file from the downloaded archives is named "iwlwifi-4965.ucode" while the newest driver looks for a file named "iwlwifi-4965-1.ucode". A simple file rename fixes the job and I think it's a slight bug or typo on the developer's side. Hopefully this will be fixed in the next driver version or we'll see a new ucode version :D

That's all, cheers!
www.younghifi.com
The crazy world of a young audiophile
User avatar
Wojtek
 
Posts: 78
Joined: 2007-06-30 02:30
Location: Warsaw, Poland

Postby enculeurdepoules » 2007-09-02 12:41

Hello!

I am a new user!!

Thanks for your post, however I am having difficulties to makes works my card 4965 agn from Intel.
I have debian 2.6.22 (the unstable one), I took the headers and source (instead of yours amd64 I took -686 having a coreduo2 processor).
so I have the headers 2.6.22-1-686 and the linux-source-2.6.22.

I made everything you said but when I do a "make" on the step 8 (8. Then cd to your iwlwifi folder, "make" and "make install". That should be all thats necessary. )
I get:


make: *** [compatible/kversion] Error 1
debian:~/Desktop/iwlwifi-0.1.14# make clean
Removing stale, temporary, and built files...
debian:~/Desktop/iwlwifi-0.1.14# make
Checking kernel compatibility in:
/lib/modules/2.6.22-1-686/source
* Kernel requires compatibility version:
- Requires IEEE80211_CONF_CHANNEL_SWITCH compat.
- Remove CONFIG_IWLWIFI_HT option if defined
- Remove CONFIG_IWLWIFI_HT_AGG option if defined
Building compatibility version in 'compatible/' directory:
Copying compatible/ from origin/...done
+ Applying: patches/06-csa.patch
Add IEEE80211_CONF_CHANNEL_SWITCH define into iwlwifi.h

Makefile has been modified by generate_compatible,

.........



Anyone can help please???

I have to say I have this card since mars 2007 and impossible to make it run properly... I used it as Wifi once, dont remember how (with ndiswrapper??). But I want to have full features like mode monitor and so on!!


Thanks!
enculeurdepoules
 
Posts: 16
Joined: 2007-09-02 12:34

Postby enculeurdepoules » 2007-09-02 14:36

my new tests:



debian:/home/js# cd Desktop/
debian:/home/js/Desktop# ls
iwlwifi-0.1.14 iwlwifi-4965-ucode-4.44.17 mac80211-10.0.0 NVIDIA-Linux-x86-1.0-9639-pkg1-patched.run
iwlwifi-0.1.14.tgz iwlwifi-4965-ucode-4.44.17.tgz mac80211-10.0.0.tgz
debian:/home/js/Desktop# cd iwlwifi-0.1.14
debian:/home/js/Desktop/iwlwifi-0.1.14# ls
CHANGES dvals GIT_SHA1 ISSUES LICENSE.BSD load origin README.iwlwifi unload
compatible FILES INSTALL LICENSE LICENSE.GPL Makefile patches scripts
debian:/home/js/Desktop/iwlwifi-0.1.14# make
'compatible/' version does not match KSRC. Try 'make clean'.

make: *** [check_version] Error 1
debian:/home/js/Desktop/iwlwifi-0.1.14# make install

Module compatible/iwl4965.ko compatible/iwl3945.ko (s) installed into:
/lib/modules/2.6.22-1-686/kernel/drivers/net/wireless

Don't forget to copy firmware to your hotplug's firmware directory
and have the hotplug tools in place.

See INSTALL for more information.
debian:/home/js/Desktop/iwlwifi-0.1.14# modprobe iwl4965
FATAL: Error inserting iwl4965 (/lib/modules/2.6.22-1-686/kernel/drivers/net/wireless/iwl4965.ko): Invalid module format
debian:/home/js/Desktop/iwlwifi-0.1.14# ./load
Unloaded: mac80211 cfg80211
insmod: error inserting 'compatible/iwl3945.ko': -1 Invalid module format
Load failed.
enculeurdepoules
 
Posts: 16
Joined: 2007-09-02 12:34

Postby Wojtek » 2007-09-02 14:40

I've installed the newest iwlwifi driver on my recompiled 2.6.22 kernel just minutes ago and it worked quite nicely.

From your first post I can deduce that a secondary call to the "make" command would be in order. I had this error too a couple of times and it's nothing wrong. The driver's makefile just signals you that it wants to compile the "compatibility" version of the driver.

Do a "make uninstall", then delete the driver's source directory, unpack it again, do a double "make" and then make install.
www.younghifi.com
The crazy world of a young audiophile
User avatar
Wojtek
 
Posts: 78
Joined: 2007-06-30 02:30
Location: Warsaw, Poland

Postby Wojtek » 2007-09-03 02:23

Oh and BTW, I also have a Core 2 Duo processor in my laptop. Actually, that's one of the reasons that I'm running the amd64 port. You kinda miss out on some of the perks if you stick to i386... even if it's some kind of 686 optimization. Have in mind that 686 supports processor up from the old Pentium Pro till like Pentium III. Well actually the main diff is that you're running a 32bit system on a 64bit capable CPU, why I'm running a 64bit system with 64bit optimized software and if I need to I can run 32bit apps too (64bit mode can emulate 32bit, but not the other way around).

So, these were my 3 cents as a reply to the "instead of yours amd64 I took -686 having a coreduo2 processor" sentence.

Cheers!
www.younghifi.com
The crazy world of a young audiophile
User avatar
Wojtek
 
Posts: 78
Joined: 2007-06-30 02:30
Location: Warsaw, Poland

Postby enculeurdepoules » 2007-09-03 22:58

Wojtek wrote:I've installed the newest iwlwifi driver on my recompiled 2.6.22 kernel just minutes ago and it worked quite nicely.

From your first post I can deduce that a secondary call to the "make" command would be in order. I had this error too a couple of times and it's nothing wrong. The driver's makefile just signals you that it wants to compile the "compatibility" version of the driver.

Do a "make uninstall", then delete the driver's source directory, unpack it again, do a double "make" and then make install.


Many thanks!
I was about to post again when I saw your answer....

yes, you are perfectly right, I just attemped quite a few times and surpringly, it worked!!! I probably made a few make clean and make, make, make and once, no more errors!

Ok!
thanks!
Oh for the "amd64", I attempted once I took Debian 64bits but it says I had not a compatible cpu, I have coreduo2 t7200!
So I took the i686...


I just remark that it does not seems to support injection (with the latest Aircrack suite including aireplay)...
And it also have some bugs wit the way to show the power signals...
I believe the issue is not really related to aircrack because it works well with other cards... probably they does not communicate well with that mac8211 system?? or the drivers?
enculeurdepoules
 
Posts: 16
Joined: 2007-09-02 12:34

Postby Wojtek » 2007-09-04 10:51

Glad to know that it's working for you now :)

Incompatible cpu? That's strange. I used the amd64 etch binary iso and it worked OK. The only thing I had to do is to change a BIOS setting for SATA, mainly from "Enhanced" mode (the one that needs the ahci modules, which appear in 2.6.21, while the installation iso has a 2.6.18 kernel) to "Compatible" mode and everything worked fine. Also, I have a c2d T7300, so it's on the newer Santa Rosa platform.

One approach that you may also try (although I hear it's a bit more advanced, but there are instructions for it on the net) is to get a debian live-cd and install from that by chroot'ing the system to your hard drive. It's kinda a pretty manual approach, but thanks to that you get the live-cd's kernel (2.6.22 I think with today's live's) and all the new packages that you can find on it.

As for the wireless drivers. They still are under heavy development. They can't be considered 100% stable right at the moment. I really don't know what's this "injection" or "aircrack" that you speak of, but in my case, I'm checking the driver's homepage on a weekly basis and when there's a new version I download it and replaced the older one that's working in my system (BTW that's what "make uninstall" is for :P, namely to delete previously installed modules).

PS: do you use IM? You could contact me and we could get more in-depth with your problems :D

cheers
www.younghifi.com
The crazy world of a young audiophile
User avatar
Wojtek
 
Posts: 78
Joined: 2007-06-30 02:30
Location: Warsaw, Poland

Postby jonny_noog » 2007-09-06 03:18

Hello,

I've just installed Lenny on my IBM T60 and I'm currently trying to get the wireless working. I was just wondering if the 2.6.21 kernel that is an update for Lenny has the required mac80211 sub system? Or do I need 2.6.22?
User avatar
jonny_noog
 
Posts: 456
Joined: 2006-12-17 02:28
Location: ~/

Postby enculeurdepoules » 2007-09-06 03:30

jonny_noog wrote:Hello,

I've just installed Lenny on my IBM T60 and I'm currently trying to get the wireless working. I was just wondering if the 2.6.21 kernel that is an update for Lenny has the required mac80211 sub system? Or do I need 2.6.22?

I dont think so...
which wireless do you have anyway?
I think its pre-installed only from the unstable one (2.6.22) or I read something like it might be on the 2.6.21 but does not works for the card we talk about in this topic, the 4965!!
enculeurdepoules
 
Posts: 16
Joined: 2007-09-02 12:34

Postby jonny_noog » 2007-09-06 10:39

Thanks for the reply.

lspci tells me that it's a "Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)".

The laptop is a second hand T60 2008-66m. I had some hardware issues that I had to work out and now that the thing is working properly, it's on to software issues :P.

I originally had etch on it, and tried to compile and install the 2.6.22 kernel using Lavene's guide on this forum and some others I found around the place. I think it compiled OK, but I came unstuck when I tried to boot the new kernel and it gave me the error message as seen in this thread (attempted to kill init!).

I think my problem was something to do with my SATA drive not being recognised properly with the image I made using mkinitrd, so then I tried to make another one using initramfs, but this didn't seem to work for me either. I then figured I was still too much of a noob to be screwing around with compiling kernels and such and I had only succeeded in confusing myself more, so I thought I'd give Lenny a go... And here I am.

I can see there's a lot of information out there on compiling kernels and stuff, but I'm just having a hard time connecting the dots. Is there some information anyone can recommend that is nice and up to date? As I don't think I have the history with Linux to know what methods I should be using and what methods may be out of date. Using initramfs instead of mkinitrd for example.

I also understand that there is a non-free driver available from Intel, is it easier to use this method for getting the wireless working? Does it also need the mac80211 sub system?
User avatar
jonny_noog
 
Posts: 456
Joined: 2006-12-17 02:28
Location: ~/

Postby Wojtek » 2007-09-06 16:49

The mac80211 is built-in the kernel since 2.6.21, so one doesn't need to get the mac80211 driver and compile + install it manually from Intel's linux wireless homepage. Even the stock debian kernels have it enabled, so one doesn't even need to configure the kernel manually if he doesn't want to. Just type in "modprobe mac80211" and there you have it.

Jonny_noog:
If a previous kernel worked for ya, then the newer one should work too (if not better). Kernel images don't have anything to do with SATA controllers in most cases, but they won't boot if you don't have the drivers that you need enabled, that's kinda obvious :). A good replacement for initramfs is yaird.
You should screw around with the kernel for your own good. When I first had a go at it, I've done it like 10 times in the span of 2 days till I got it right. But I took my time, read about almost every option and if I had doubts I used my trusty web browser to look-up info. Later on when I had to manually compile my kernel from scratch (had a format), it only took me 30-40 minutes or so. On my new laptop it was like 2 hours, because the hardware was like 3 years newer than my desktop, so I had to disable some options and enable others, which wasn't needed on my desktop. There aren't any "ultimate" guides, mainly because there's just so much options in the kernel and everybody has a different setup and needs, so it would be quite hard to satisfy anybody with it.

Anyway, you don't need to setup "everything" right away. You can like: change some options, compile it, try if it works, fidget with it some more, then "oops" doesn't work, correct errors, etc. That's the safe way to go for a newbie kernel compiler I think ;).

Getting back to your wireless problems. You have the older version of the wireless chip, the ipw3945. You don't need the iwlwifi driver to run this, although it's also supported. And the mac80211 module is needed only by the iwlwifi driver. So you don't even need the newest kernel to get your wireless running. I think it would be even better if you used the older driver, because it's more stable than iwlwifi, which is still under heavy development. But have in mind that one day the iwlwifi driver will probably replace the older driver.

Everything needed for the ipw3945 is in the debian repos (in contrib). There's the "ipw3945-modules-stock kernel ver" package, which gets you a pre-compiled module binary for your stock kernel and the "ipw3965-source" package, which you can easily compile by the use of the module-assistant package, no matter if your kernels stock or one of "yours", but if you have your own kernel then the ipw3965-modules package won't work and so the module-assistant way is the only one to do this nicely.

How to do the ipw3945 driver through module-assistant? Easy. Install the ipw3945-source and module-assistant package. Run:
Code: Select all
m-a prepare

"m-a" is a shortcut, you can replace it with the full "module-assistant" if you wish ;). This will check if your system has everything needed to compile the modules. If not then m-a will try to download the necessary stuff through apt.
Then if everything's ok, do a:
Code: Select all
m-a a-i ipw3945

This command will unpack the ipw3965 package, compile it, make a package out of it and install on your system. And that's it for the most part, try a "modprobe ipw3945" and see if it works.

Cheers!
www.younghifi.com
The crazy world of a young audiophile
User avatar
Wojtek
 
Posts: 78
Joined: 2007-06-30 02:30
Location: Warsaw, Poland

Postby enculeurdepoules » 2007-09-06 23:58

jonny_noog wrote:

I also understand that there is a non-free driver available from Intel, is it easier to use this method for getting the wireless working? Does it also need the mac80211 sub system?

hi,
that looks weird to me...
Your card is quite old, I mean there is existing drivers for long and its well supported...
Also, I know that it exists some drivers for it that support packet injection under Linux!
So i feel curious if you say that intel has a specific paying version??
Especially when a version is downloadable from their website, and when they also implement another version using for the new mac80211 system (source: http://intellinuxwireless.org/?p=iwlwif ... TO-iwlwifi)

I dont even see why you are trying to use that subsystem because you should have proper drivers available at intel's website for long!!
enculeurdepoules
 
Posts: 16
Joined: 2007-09-02 12:34

Postby jonny_noog » 2007-09-07 00:09

If a previous kernel worked for ya, then the newer one should work too (if not better). Kernel images don't have anything to do with SATA controllers in most cases, but they won't boot if you don't have the drivers that you need enabled, that's kinda obvious. A good replacement for initramfs is yaird.


Hmm, OK cool. I would have to agree that not having the right drivers installed means things won't work is pretty obvious. What's not so obvious for the noob is how one enables drivers for use with the kernel. From the reading and experimentation I have so far done, am I right in understanding that one can either somehow enable a "module" for a driver or have a driver compiled into the kernel? Or is this a non-existant differentiation that I am making? What I don't really understand is all the steps involved If one wishes to use a module, does anything still need to be compiled into the kernel for the module to "hook into" as it were? Or am I just completely off track here?

When I had the 2.6.18 kernel running, my SATA drive was recognised just fine, but then when I tried to boot my compiled 2.6.22 kernel (whose config file had been originally copied from my working 2.6.18 kernel) this is when I had problems. The reading I did seemed to point towards some issue with the SATA drivers but as I had not changed anything in the config in relation to SATA, I really wasn't sure what was going on and I didn't know enough about modules and so on at the time (I guess I stil don't). So I slowly backed away with my hands up :P.

You should screw around with the kernel for your own good.


I know, I want to :). But lack of time is my enemy at the moment. But I'll get around to it.

Thanks for your help anyway, I will try the things you suggest and report back with how I go.
User avatar
jonny_noog
 
Posts: 456
Joined: 2006-12-17 02:28
Location: ~/

Postby Wojtek » 2007-09-07 00:11

enculeurdepoules wrote:Your card is quite old, I mean there is existing drivers for long and its well supported...


As I said in the post above :)

Also, I know that it exists some drivers for it that support packet injection under Linux!


These are the "old" drivers. They won't work for 4965 though. Why do you need packet injection so much?

So i feel curious if you say that intel has a specific paying version??


I think he meant that it's non-free as in "not opensource" and not "payable". Like the NVIDIA drivers.
www.younghifi.com
The crazy world of a young audiophile
User avatar
Wojtek
 
Posts: 78
Joined: 2007-06-30 02:30
Location: Warsaw, Poland

Next

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable