Finished: CALL FOR TESTERS Intel wireless 5100/5300 iwn(4) driver for FreeBSD

Continue.....

Code:
[root@dduong-freebsd /usr/src/syssvn/freebsd/sys/modules/iwnfw]# make install
===> iwn1000 (install)
install -o root -g wheel -m 555   iwn1000fw.ko /boot/kernel
kldxref /boot/kernel
===> iwn4965 (install)
install -o root -g wheel -m 555   iwn4965fw.ko /boot/kernel
kldxref /boot/kernel
===> iwn5000 (install)
install -o root -g wheel -m 555   iwn5000fw.ko /boot/kernel
kldxref /boot/kernel
===> iwn5150 (install)
install -o root -g wheel -m 555   iwn5150fw.ko /boot/kernel
kldxref /boot/kernel
===> iwn6000 (install)
install -o root -g wheel -m 555   iwn6000fw.ko /boot/kernel
kldxref /boot/kernel

Code:
[root@dduong-freebsd /usr/src/syssvn/freebsd/sys/modules/iwnfw]# cd ../iwn
[root@dduong-freebsd /usr/src/syssvn/freebsd/sys/modules/iwn]# env CFLAGS=-I$PWD/../../ make
Warning: Object directory not changed from original /usr/src/syssvn/freebsd/sys/modules/iwn
@ -> /usr/src/sys
machine -> /usr/src/sys/amd64/include
awk -f @/tools/makeobjops.awk @/kern/device_if.m -h
awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h
awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h
cc -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I/usr/src/syssvn/freebsd/sys/modules/iwn/../../ -I. -I@ -I@/contrib/altq -finline-limit=8000 
--param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  
-mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector 
-std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith 
-Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /usr/src/syssvn/freebsd/sys/modules/iwn/../../dev/iwn/if_iwn.c
ld  -d -warn-common -r -d -o if_iwn.ko if_iwn.o
:> export_syms
awk -f /sys/conf/kmod_syms.awk if_iwn.ko  export_syms | xargs -J% objcopy % if_iwn.ko
objcopy --strip-debug if_iwn.ko

Code:
[root@dduong-freebsd /usr/src/syssvn/freebsd/sys/modules/iwn]# make install
install -o root -g wheel -m 555   if_iwn.ko /boot/kernel
kldxref /boot/kernel

Code:
[root@dduong-freebsd /usr/src/syssvn/freebsd/sys/modules/iwn]# ls -l /boot/kernel/if_iwn*
-r-xr-xr-x  1 root  wheel  136160 Dec 27 12:47 /boot/kernel/if_iwn.ko
-r-xr-xr-x  1 root  wheel  430616 Dec 27 12:07 /boot/kernel/if_iwn.ko.symbols
 
dduong, use proper tags for posting output! System output requires
Code:
, not [quote].

[url=http://forums.freebsd.org/showthread.php?t=8816]Posting and Editing in the FreeBSD Forums[/url]
 
Ok, thanks, module got installed. If you are sure you do NOT have
Code:
device iwn
in you kernel configuration file, the correct driver will be used.
 
You're welcome.

I do have that entry in my custom kernel configuration file. Do I remove that and recompile and install the drivers?
 
Back. Works like a charm and using the wireless right now as I'm typing :)

Thanks for everything! I will continue testing and see if anything pops up.

Code:
iwn0: <Intel(R) PRO/Wireless 5300> mem 0xf2500000-0xf2501fff irq 17 at device 0.0 on pci3
iwn0: MIMO 3T3R, MoW, address 00:21:6a:85:55:e0
iwn0: [ITHREAD]
iwn0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
iwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
iwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
 
Running wpa_supplicant manually?

I've got
Code:
hysteresis# svnversion
27
and if I load if_iwn.ko with the following line in rc.conf:
Code:
ifconfig_wlan0="WPA DHCP"
my wlan0 interface gets created and associates to my network just fine.

However, if I instead have the line:
Code:
ifconfig_wlan0="ssid MIT mode 11g DHCP"
and then manually do
Code:
ifconfig wlan0 destroy
ifconfig wlan0 create wlandev iwn0
wpa_supplicant -dd -i wlan0 -c /etc/wpa_supplicant.conf
the supplicant fails to associate, and I see
Code:
CTRL-EVENT-SCAN-RESULTS
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:18:39:bf:46:0c ssid='423' wpa_ie_len=0 rsn_ie_len=20 caps=0x11
   selected based on RSN IE
   selected WPA AP 00:18:39:bf:46:0c ssid='423'
Trying to associate with 00:18:39:bf:46:0c (SSID='423' freq=2437 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
wpa_driver_bsd_set_auth_alg alg 0x1 authmode 1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04
01 00 00 0f ac 02 00 00
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00
0f ac 04 01 00 00 0f ac 02 00 00
No keys have been configured - skip key clearing
wpa_driver_bsd_set_drop_unencrypted: enabled=1
State: SCANNING -> ASSOCIATING
wpa_driver_bsd_associate: ssid '423' wpa ie len 22 pairwise 3 group 3 key mgmt 1
wpa_driver_bsd_associate: set PRIVACY 1
ioctl[SIOCS80211, op 21, len 42]: No such file or directory
Association request to the driver failed
Setting authentication timeout: 5 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
RSN: Ignored PMKID candidate without preauth flag
EAPOL: disable timer tick
Authentication with 00:18:39:bf:46:0c timed out.
Added BSSID 00:18:39:bf:46:0c into blacklist
No keys have been configured - skip key clearing
State: ASSOCIATING -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
et seq.
That SIOCS80211 has showed up previously, as google will tell, and it was usually operator error relating to the device cloning. Is it not possible to manually run wpa_supplicant like this, or am I just doing something wrong?
 
The settings you made in rc.conf are interfering with what you're are trying to achieve. As soon as you create wlan0 the settings from rc.conf will be applied and that is what wpa_supplicant doesn't like.

Code:
# grep wlan /etc/rc.conf
wlans_iwn0="wlan0"
ifconfig_wlan0="ssid testtest mode 11g 192.168.30.2 up"
# ifconfig wlan0 destroy
# ifconfig wlan0 create wlandev iwn0 wlanmode sta
# ifconfig wlan0
wlan0: flags=8c43<UP,BROADCAST,RUNNING,OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:22:fa:02:d9:b2
        inet6 fe80::222:faff:fe02:d9b2%wlan0 prefixlen 64 tentative scopeid 0x6
        inet 192.168.30.2 netmask 0xffffff00 broadcast 192.168.30.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
        status: no carrier
        ssid testtest channel 3 (2422 Mhz 11g)
        country US authmode OPEN privacy OFF txpower 15 bmiss 10 scanvalid 60
        bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5
        protmode CTS wme bintval 0

To prevent this, you can name the VAP wlan1.

Code:
# ifconfig wlan1 create wlandev iwn0
# wpa_supplicant -Dbsd -iwlan1 -c/etc/wpa_supplicant.conf -dd
 
First of all, I would like to apologize for the long post -- I'm a very unadvanced user with an advanced PC, providing as many details as I can in the hope that some of them might actually be useful.
The advanced PC is a Dell Precision M6400 with an Intel 5300AGN WiFi card. It runs FreeBSD 8.0. I've recompiled the kernel without the ukbd, ums and uhid modules.

I installed the WiFi driver (r27), and then performed the steps described below.

1., Reboot, log in as root, issue the following two commands:

# kldload iwn5000fw
# kldload if_iwn

which generates in /var/log/messages:

Code:
Dec 27 21:55:15  kernel: iwn0: <Intel(R) PRO/Wireless 5300> mem 0xf1ffe000-0xf1ffffff irq 17 at device 0.0 on pci12
Dec 27 21:55:15  kernel: iwn0: MIMO 3T3R, MoW, address 00:16:ea:e3:dc:88
Dec 27 21:55:15  kernel: iwn0: [ITHREAD]
Dec 27 21:55:15  kernel: iwn0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
Dec 27 21:55:15  kernel: iwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
Dec 27 21:55:15  kernel: iwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps

2., Turn the hardware switch on. The Bluetooth LED comes on -- even though the ng_ubt module is not loaded -- the WiFi LED, on the other hand, does not. At the same time, the following messages are generated in /var/log/messages:
Code:
Dec 27 21:55:21  kernel: ugen0.2: <Broadcom> at usbus0
Dec 27 21:55:21  kernel: uhub8: <Broadcom BCM2046B1, class 9/0, rev 2.00/1.00, addr 2> on usbus0
Dec 27 21:55:22  kernel: uhub8: 3 ports with 0 removable, self powered
Dec 27 21:55:22  root: Unknown USB device: vendor 0x413c product 0x8157 bus uhub8
Dec 27 21:55:22  kernel: ugen0.3: <vendor 0x413c> at usbus0
Dec 27 21:55:23  root: Unknown USB device: vendor 0x413c product 0x8158 bus uhub8
Dec 27 21:55:23  kernel: ugen0.4: <vendor 0x413c> at usbus0

3., Issue the command:

# ifconfig iwn0 up scan

which results in the output:

Code:
ifconfig: unable to get scan results

4., Turn the hardware switch off again. This causes a kernel panic and a reboot. Before rebooting, the machine displays a screen for 15 seconds -- the best copy of it that I could make after several tries is below.

Code:
iwn0: RF switch: radio disabled

Fatal trap 12: page fault while in kernel mode
cpuid = 2; apic id =02
fault virtual address   = 0x58
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:ffffffffff80661817
stack pointer           = 0x28:ffffffff80eb741b50
frame pointer           = 0x28:ffffffff80eb741b80
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 0 (iwn0 taskq)
trap number             = 12
panic: page fault
cpuid = 1
uptime: 39s

Cannot dump. Device not defined or unavailable.

(These messages -- as far as I can tell -- are quite similar to those in post #144.)

Turning the hardware switch on _after_ issuing the above ifconfig command also causes the machine to freeze and display a screen similar to the one above, without, however, a reboot.

Finally, just in case this piece of information helps: After

# kldload ukbd
# kldload ums

turning the hardware switch on generates in /var/log/messages:

Code:
Dec 28 14:55:07  kernel: ugen0.2: <Broadcom> at usbus0
Dec 28 14:55:07  kernel: uhub8: <Broadcom BCM2046B1, class 9/0, rev 2.00/1.00, addr 2> on usbus0
Dec 28 14:55:08  kernel: uhub8: 3 ports with 0 removable, self powered
Dec 28 14:55:09  kernel: ugen0.3: <vendor 0x413c> at usbus0
Dec 28 14:55:09  kernel: ukbd0: <vendor 0x413c product 0x8157, class 0/0, rev 2.00/1.00, addr 3> on usbus0
Dec 28 14:55:09  kernel: kbd2 at ukbd0
Dec 28 14:55:09  kernel: ugen0.4: <vendor 0x413c> at usbus0
Dec 28 14:55:09  kernel: ums0: <vendor 0x413c product 0x8158, class 0/0, rev 2.00/1.00, addr 4> on usbus0
Dec 28 14:55:09  kernel: ums0: 3 buttons and [XY] coordinates ID=2

This is the same whether if_iwn is loaded or not. There isn't any usb mouse or keyboard connected to the laptop that I know of.

What have I done wrong? What should I try next? I would really appreciate any help.
 
hlg said:
3., Issue the command:

# ifconfig iwn0 up scan

which results in the output:

Code:
ifconfig: unable to get scan results

As of 8.0 and VAPs correct commands are:
# ifconfig wlan0 create wlandev iwn0
# ifconfig wlan0 up
# ifconfig wlan0 scan


hlg said:
4., Turn the hardware switch off again. This causes a kernel panic and a reboot. Before rebooting, the machine displays a screen for 15 seconds -- the best copy of it that I could make after several tries is below.

Code:
iwn0: RF switch: radio disabled

Fatal trap 12: page fault while in kernel mode
cpuid = 2; apic id =02
fault virtual address   = 0x58
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:ffffffffff80661817
stack pointer           = 0x28:ffffffff80eb741b50
frame pointer           = 0x28:ffffffff80eb741b80
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 0 (iwn0 taskq)
trap number             = 12
panic: page fault
cpuid = 1
uptime: 39s

Thanks for catching this, fix has been committed as revision 28.
 
1., Thank you.
2., Vielen dank.
3., Seems to work. Pretty little blue WiFi indicator light comes on after

# ifconfig wlan0 up

and goes off when hardware switch is turned off. Scanning available networks is possible as well.
4., I tried to follow the instructions of the handbook (http://www.freebsd.org/doc/en/books/handbook/network-wireless.html). Where can I find a more up-to-date description aimed at newbies with limited mental resources like myself?
5., Just pondering: Would a donated 802.11n-capable router bring the possibility of a 802.11n-capable FreeBSD driver closer?
 
Hi,

I'm using revision 28, and I can successfully scan, associate, and recieve an ip via dhcp. however, once I have an IP address, I can't ping anything, and have no connectivity.

here's what I've done:

after compiling and installing the module,

Code:
kldload iwn5000fw
kldload if_iwn

which adds the following to /var/log/messages:
Code:
Dec 28 17:23:25 tezzeret kernel: iwn0: detached
Dec 28 17:25:23 tezzeret kernel: iwn0: <Intel(R) PRO/Wireless 5100> mem 0xf4300000-0xf4301fff irq 17 at device 0.0 on pci3
Dec 28 17:25:23 tezzeret kernel: iwn0: MIMO 1T2R, MoW, address 00:1e:65:6b:33:18
Dec 28 17:25:23 tezzeret kernel: iwn0: [ITHREAD]
Dec 28 17:25:23 tezzeret kernel: iwn0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
Dec 28 17:25:23 tezzeret kernel: iwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
Dec 28 17:25:23 tezzeret kernel: iwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps

I can then do:

Code:
ifconfig wlan0 create wlandev iwn0
ifconfig wlan0 up
ifconfig wlan0 scan

which gives me an accurate listing of the wireless networks in the area.

I then compose this wpa_supplicant config file:
Code:
network={
	ssid="my ssid"
	psk="my psk"
}

and execute wpa_supplicant -i wlan0 -Dbsd -c <path to config>

which yeilds:

Code:
CTRL-EVENT-SCAN-RESULTS
Trying to associate with 00:18:01:ec:f4:ac (SSID='my ssid' freq 2462=MHz)
Associated with 00:18:01:ec:f4:ac
WPA: Key negotiation completed with 00:18:01:ec:f4:ac [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:18:01:ec:f4:ac completed (auth) [id=0 id_str=]

then dhclient wlan0 :
Code:
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.1
bound to 192.168.1.6 -- renewal in 43200 seconds.

so it looks like all is well. but then as stated, I can't ping anything (not even the router) and I have no connectivity. there's nothing helpful in /var/log/messages either. any ideas?
 
I got it working. I believe it was still trying to send pings across the wired interface; I rebooted without having the ethernet cable connected and the wireless worked.
 
hlg said:
5., Just pondering: Would a donated 802.11n-capable router bring the possibility of a 802.11n-capable FreeBSD driver closer?

Sure it would. I will get one myself soon, just have to decide on which one. All APs available at local shops here are either not supporting 11NA or only have a 100 Mbit/s uplink. With theoretical bandwidth up to 300 Mbit/s (haven't seen one with 450 Mbit/s yet) this is kinda .. you know.
 
wobsite said:
I got it working. I believe it was still trying to send pings across the wired interface; I rebooted without having the ethernet cable connected and the wireless worked.

I thought about something like that, just wanted to ask for # ifconfig -a and # netstat -r. Good you got it working though. ;)
 
bschmidt, I haven't been following this thread or the development in svn very closely, but I have one quick question: Is all of this available in FreeBSD-Current? If not, do you have a committer working on committing your changes to the FreeBSD svn repo?
 
joel@ said:
bschmidt, I haven't been following this thread or the development in svn very closely, but I have one quick question: Is all of this available in FreeBSD-Current? If not, do you have a committer working on committing your changes to the FreeBSD svn repo?

I created my SVN repo based on the last commit to HEAD. So, no, none of that is in HEAD. And I am also not aware of anyone working on getting that into the tree, maybe Rui Paulo, as he was the one committing the first changes.
 
>And I am also not aware of anyone working on getting that into the tree, maybe Rui Paulo, as he was the one committing the first changes.

I hope so, this driver is already better than if_rum or if_wpi. Imo a driver for the upcoming FreeBSD 8.1. I couldn't use any Wifi without it, if_rum is a mere mess and this one is almost perfect :)
 
bschmidt said:
I created my SVN repo based on the last commit to HEAD. So, no, none of that is in HEAD. And I am also not aware of anyone working on getting that into the tree, maybe Rui Paulo, as he was the one committing the first changes.
Hm, ok. The driver seems to be in good shape (at least if you count the number of "it works" reports) so it might be a good time to ping Rui again.
 
eyebone said:
3. i tried the also the aircrack-ng suite, now listening for other networks seems so far not to work i guess this would be also the same for injecting, but i didnt test that so far

Can you confirm that there is actually a card/driver which does support that? Looking over the code, I doubt there is, as the output function in net80211 drops every packet while in monitor mode. Monitor mode with tcpdump works though.
 
Back
Top