iwn(4) problem

Sergey A. Osokin osa at FreeBSD.org
Sat Oct 29 13:15:23 UTC 2011


Hi Matt,

On Sat, Oct 29, 2011 at 12:35:55AM -0700, matt wrote:
> On 10/25/11 12:37, Sergey A. Osokin wrote:
> >
> > I have ThinkPad X1 laptop with iwn(4) network card.
> >
> > %uname -spr
> > FreeBSD 9.0-RC1 amd64
> >
> > % dmesg 
> > iwn0: <Intel(R) Centrino(R) Wireless-N 1000> mem 0xf2500000-0xf2501fff irq 17 at device 0.0 on pci3
> >
> > >From time to time it works well, i.e. on my job, but currently it doesn't work
> > with my small home WiFi/ADSL router D-Link G-604T.
> > Also, in my home network I have two different devices: Galaxy Tab and MacBook Pro 15" and
> > these devices are works well, but ThinkPad with FreeBSD 9.0-RC1 can't connect to WiFi router :-(
> > Also, I tried to use Ubuntu Linux 11.10 LiveCD and the laptop works well with
> > home WiFi network.
> >
> > $ ifconfig iwn0
> > iwn0: flags=8843<UP,BROADCAST,RUNNING,SIMLPLEX,MULTICAST> metric 0 mtu 2290
> > 	ether 8c:a9:82:bd:41:a0
> > 	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> > 	media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
> > 	status: associated
> > $ ifconfig wlan0
> > wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMLPLEX,MULTICAST> metric 0 mtu 1500
> > 	ether 8c:a9:82:bd:41:a0
> > 	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> > 	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
> > 	status: no carrier
> > 	ssid "" channel 5 (2432 Mhz 11g)
> > 	country US authmode WPA privacy ON deftxkey UNDEF txpower 14 bmiss 10
> > 	scanvalid 450 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7
> > 	roam:rate 5 protmode CTS wme roaming MANUAL bintval 200
> >
> > $ ifconfig wlan0 list scan
> > ...
> > ozznet	00:11:95:94:cb:b4    5  54M -73:-95 200 EPSB WPA
> >
> > In /etc/wpa_supplicant.conf I have two network entries (for home and for job) with
> > psk keys.
> >
> > $ more /etc/rc.conf
> > ...
> > wlans_iwn0="wlan0"
> > ifconfig_wlan0="WPA DHCP"
> >
> > More information available upon request.
> >
> Run something like this (it's trying to flush routing table, down the
> interface, and associate. Also, simpler wpa_supplicant.conf is better
> than complex! Make sure psks are actually right :).

My key is right, two other devices (MacBook Pro and Tab with Android 2.2)
works well with my access point.

I ran you program step by step.

> ifconfig wlan0 destroy
> route flush
> mv /etc/resolv.conf /etc/resolv.old
> killall wpa_supplicant
> killall dhclient
> ifconfig wlan0 create wlandev iwn0
> sleep 1
> ifconfig wlan0 scan

I did 

% sudo ifconfig wlan0 ssid ozznet channel 1
% ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 8c:a9:82:bd:41:a0
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        ssid ozznet channel 1 (2412 MHz 11g)
        country US authmode WPA privacy ON deftxkey UNDEF txpower 14 bmiss 10
        scanvalid 450 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7
        roam:rate 5 protmode CTS wme roaming MANUAL bintval 200

x1% ifconfig wlan0 scan
SSID/MESH ID    BSSID              CHAN RATE   S:N     INT CAPS
ozznet           00:11:95:94:cb:b4    1   54M -60:-95  200 EPSB WPA

% sudo ifconfig iwn0
iwn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 8c:a9:82:bd:41:a0
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
        status: associated

> wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B
OK.

Also, in /var/log/messages I found:
Oct 29 16:53:39 x1 wpa_supplicant[31402]: Trying to associate with 00:11:95:94:cb:b4 (SSID='ozznet' freq=2412 MHz)
Oct 29 16:53:49 x1 wpa_supplicant[31402]: Authentication with 00:11:95:94:cb:b4 timed out.
Oct 29 16:53:50 x1 wpa_supplicant[31402]: Trying to associate with 00:11:95:94:cb:b4 (SSID='ozznet' freq=2412 MHz)
Oct 29 16:54:00 x1 wpa_supplicant[31402]: Authentication with 00:11:95:94:cb:b4 timed out.
Oct 29 16:54:00 x1 wpa_supplicant[31402]: Trying to associate with 00:11:95:94:cb:b4 (SSID='ozznet' freq=2412 MHz)

> sleep 4
> dhclient wlan0

% sudo dhclient wlan0
wlan0: no link .............. giving up

> I had the same card daily in FreeBSD since early 2010. Worked perfectly.

When I used this laptop with WPA2 AP at my job - all works well with
simple config in wpa_supplicant.conf like this:

network={
        ssid="JOBNET"
        psk="some text here"
        priority=5
}

> It makes me think it's probably not the card.

Also, as I said before I tried boot on this laptop Ubuntu LiveCD and
wireless worked fine too.

> I actually had a script using dialog for various network configurations
> (home, work) that would clear network configs and reconfigure the
> machine for various roles.

Also, I found following PR http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/142766,
my problem looks similar.

-- 
Sergey A. Osokin
osa at FreeBSD.ORG


More information about the freebsd-wireless mailing list