# Wireless Card



## nikobordx (Mar 12, 2009)

Hi,

Someone know this wireless card:

none1@pci0:2:0:0:	class=0x028000 card=0x12118086 chip=0x42378086 rev=0x00 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = network

This card is in my new computer but i don't what module to load !
Thanks in advance.
Niko.


----------



## nikobordx (Mar 12, 2009)

Sorry after some research on google, i've found it's a:
Intel WiFi Link 5100 AGN

Someone knows if there is a driver being developed ?

Thank you in advance.
Niko.


----------



## Mel_Flynn (Mar 12, 2009)

nikobordx said:
			
		

> none1@pci0:2:0:0:	class=0x028000 card=0x12118086 chip=0x*4237*8086 rev=0x00 hdr=0x00
> vendor     = 'Intel Corporation'
> class      = network




```
grep '4237.*Wireless' /usr/local/share/pciids/pci.ids
        4237  PRO/Wireless 5100 AGN [Shiloh] Network Connection
```

It may work with a driver in development called iwn.
Actually, it won't out of the box, since it will only attach to 4965 models.


----------



## SirDice (Mar 12, 2009)

http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2009-01/msg01268.html

You could try the iwn driver but it's in 8-current.


----------



## nikobordx (Mar 12, 2009)

Thank you.

But it does not work, my card is not recognized !
Do you think, i need to add to "if_iwn.c" my card 4937 ?

Niko


----------



## Mel_Flynn (Mar 12, 2009)

You can try. Let us know if it works. Here's a patch for a recent -CURRENT:

```
Index: sys/dev/iwn/if_iwn.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/iwn/if_iwn.c,v
retrieving revision 1.10
diff -u -r1.10 if_iwn.c
--- sys/dev/iwn/if_iwn.c        13 Feb 2009 16:17:05 -0000      1.10
+++ sys/dev/iwn/if_iwn.c        12 Mar 2009 21:42:36 -0000
@@ -229,6 +229,7 @@
         { 0x8086, 0x422D, "Intel(R) PRO/Wireless 4965BGN" },
         { 0x8086, 0x4230, "Intel(R) PRO/Wireless 4965BGN" },
         { 0x8086, 0x4233, "Intel(R) PRO/Wireless 4965BGN" },
+        { 0x8086, 0x4237, "Intel(R) PRO/Wireless 5100BGN" },
         { 0, 0, NULL }
 };
```
Would be interesting to know if it works, so keep us informed


----------



## nikobordx (Mar 12, 2009)

Ok i have tested and it does not work !

dmesg say:

iwn0: <Intel(R) PRO/Wireless 5100AGN> mem 0xde000000-0xde001fff irq 16 at device 0.0 on pci2
iwn0: Reg Domain: , address 00:21:6b:2b:78:04
iwn0: iwn_read_eeprom_ht40: no entry for channel 124
iwn0: iwn_read_eeprom_ht40: no entry for channel 132
iwn0: iwn_read_eeprom_ht40: no entry for channel 149
iwn0: iwn_read_eeprom_ht40: no entry for channel 157
iwn0: [ITHREAD]
iwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
iwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
iwn0: 11ng MCS: 15Mbps 30Mbps 45Mbps 60Mbps 90Mbps 120Mbps 135Mbps 150Mbps 30Mbps 60Mbps 90Mbps 120Mbps 180Mbps 240Mbps 270Mbps 300Mbps

ifconfig say:

iwn0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
	ether 00:21:6b:2b:78:04
	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
	status: no carrier

After creating interface:

iwn0: flags=8803<UP,BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
	ether 00:21:6b:2b:78:04
	media: IEEE 802.11 Wireless Ethernet autoselect mode 11b
	status: associated
wlan1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:21:6b:2b:78:04
	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
	status: no carrier
	ssid Livebox-C460 channel 4 (2427 Mhz 11b)
	country US authmode OPEN privacy ON deftxkey 1 wepkey 1:104-bit
	txpower 0 bmiss 10 scanvalid 60 wme bintval 0


And when i try to connect:

iwn0: iwn_transfer_firmware: timeout waiting for first alive notice, error 35
iwn0: iwn_init_locked: could not load firmware, error 35
iwn0: iwn_transfer_microcode: could not load boot firmware
iwn0: iwn_transfer_firmware: could not load boot firmware, error 60
iwn0: iwn_init_locked: could not load firmware, error 60
iwn0: error, INTR=20000000<HW_ERROR> STATUS=0x0

I don't understand why the iwn0 interface was "associated" and not wlan1 ?

Do you have somethings else to test ?

Niko


----------



## Mel_Flynn (Mar 13, 2009)

If you accepted the license (see the iwn manpage), then this firmware may not be compatible with the 5100 and you'll have to wait till support gets added to this or a new driver.
You may want to post your the freebsd-current list, they might have more information on this card and the (planned) support for it.


----------



## lyuts (Mar 13, 2009)

I'm using if_wpi and wpifw for my Intel Wireless Card.


----------



## nikobordx (Mar 13, 2009)

if_wpi does not support this new card !


----------



## nikobordx (Mar 13, 2009)

Hi,

I found on the net the file "iwlwifi-5000-ucode-5.4.A.11.tar.gz" which contains "iwlwifi-5000-1.ucode".

How to convert to freebsd firmware?
It's just this command: "b64encode iwlwifi-5000-1.ucode iwlwifi-5000-1.fw.uu > iwlwifi-5000-1.fw.uu"

Thanks,
Niko.


----------



## nikobordx (Mar 13, 2009)

oop's i forgot !

When i test it, i have this message:

```
iwn0: <Intel(R) PRO/Wireless 5100AGN> mem 0xde000000-0xde001fff irq 16 at device 0.0 on pci2
iwn0: Reg Domain: , address 00:21:6b:2b:78:04
iwn0: iwn_read_eeprom_ht40: no entry for channel 124
iwn0: iwn_read_eeprom_ht40: no entry for channel 132
iwn0: iwn_read_eeprom_ht40: no entry for channel 149
iwn0: iwn_read_eeprom_ht40: no entry for channel 157
iwn0: [ITHREAD]
iwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
iwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
iwn0: 11ng MCS: 15Mbps 30Mbps 45Mbps 60Mbps 90Mbps 120Mbps 135Mbps 150Mbps 30Mbps 60Mbps 90Mbps 120Mbps 180Mbps 240Mbps 270Mbps 300Mbps
wlan1: Ethernet address: 00:21:6b:2b:78:04
iwn0: iwn_transfer_firmware: invalid firmware header, main [128504,49152], init [118176,49152] boot 0
iwn0: iwn_init_locked: could not load firmware, error 22
```
Niko


----------



## Mel_Flynn (Mar 13, 2009)

It's not too hard for me to make a patch that enables loading this firmware, however, it still doesn't guarantee the card will work with this driver. I also don't see any indication that a new driver for FreeBSD is in progress or that support for 5100 series is being integrated into iwn, though it seems possible as OpenBSD has done this.
As that diff shows, more work need to be done then just allow the firmware to be loaded.


----------



## nikobordx (Mar 13, 2009)

Hi Mel_Flynn

I'm ok to try your patch !
If it does not work, i will look tomorrow the openbsd code, but i'm not a developer, so i can't guarantee anything!

Niko.


----------



## Mel_Flynn (Mar 14, 2009)

I looked into it more deeply, I can bypass the check (just adjust the IWN_FW_MAIN_TEXT_MAXSZ and friends), but the 5000 series use a different method to load the firmware alltogether, so you'd have to reimplement iwn_transfer_firmware.
These are good reasons to rewrite the driver using a hardware abstraction layer, like Damien did for OpenBSD. There are enough similarities between the cards but also enough differences.


----------



## nikobordx (Mar 14, 2009)

Hi Mel_Flynn,

I don't understand the openbsd code, are you a developper ?
I've you trying to make the patch ?

Niko.


----------



## Mel_Flynn (Mar 14, 2009)

Would be hard for me to do, as I don't have the card in question, so other then "making it compile". I'm waiting to see if your post on the freebsd-current list yields any "I'm working on this" response and maybe my new laptop will have this card, not sure yet.
If I decide to do this, it'll take a few weeks, as I've got other things on my plate.

Seems Brandon is working on it.


----------



## TzunTzai (May 14, 2009)

Any progress?


----------



## nikobordx (May 15, 2009)

Hi,

I know Daniel is working on it.
No news from him, so i think he's busy.

Nicolas.


----------



## TzunTzai (Sep 4, 2009)

Updates?


----------



## nikobordx (Sep 13, 2009)

No news !


----------

