wireless networking iwi0

hi

I'm not having much luck with an iwi0 wireless network inteface card on an old laptop (using NAT on a home network). Here's the background/configuration(s):

FreeBSD 9.0-RELEASE

# ifconfig
Code:
...
iwi0: staus: no carrier


/boot/loader.conf

Code:
if_urtw_load="YES"
legal.intel_iwi.license_ack=1
iwi_bss_load="YES"
iwi_ibss_load="YES"
iwi_monitor_load="YES"
wlan_wep_load="YES"
wlan_tkip_load="YES"
wlan_ccmp_load="YES"


/etc/wpa_supplicant.conf
Code:
ctrl_interface=/var/run/wpa_supplicant
eapol_version=2
ap_scan=1
fast_reauth=1
network={
        ssid="myssid"
        psk="myultrasecretkey"
}

/etc/rc.conf

Code:
hostname="example.example.com"
ifconfig_re0="DHCP"
mouse_enable="YES"
dumpdev="AUTO"
wlans_urtw0="iwi0"
ifconfig_wlan0="WPA SYNCDHCP"



On startup, FreeBSD will automatically connect. It doesn't. I try to ping the router and and external address with no results:

# ping 192.168.0.1
Code:
ping: sendto: No route to host
...
# ping [url]http://www.google.com[/url]
Code:
ping: cannot resolve www.google.com: Host name lookup failure


# ifconfig iwi0 up scan
Code:
iwi0: timeout waiting for (null) firmware initialization to complete
iwi0: could not load boot firmware (null)
ifconfig: unable to get scan results


help :-)
 
In /boot/loader.conf
change:
Code:
if_urtw_load="YES"
to
Code:
if_iwi_load="YES"

And in /etc/rc.conf
You should probably change:
Code:
wlans_urtw0="iwi0"
to
Code:
wlans_wlan0="iwi0"
 
ChalkBored said:
In /boot/loader.conf
change:
Code:
if_urtw_load="YES"
to
Code:
if_iwi_load="YES"

And in /etc/rc.conf
You should probably change:
Code:
wlans_urtw0="iwi0"
to
Code:
wlans_wlan0="iwi0"

Thanks. I made those changes and it still won't ping to either the router or outside the network.
 
I typed the /etc/rc.conf thing backwards.
it should be:
Code:
wlans_iwi0="wlan0"

If that doesn't fix it, see if ifconfig still shows the firmware error.

If it's up but it's status isn't associated, then it's probably an error with /etc/wpa_supplicant

If it's associated, then you should check for problems with the IP address assignment or the default route being wrong. I've had issues with the ethernet configuration clashing with the wireless one.
 
ChalkBored said:
I typed the /etc/rc.conf thing backwards.
it should be:
Code:
wlans_iwi0="wlan0"

If that doesn't fix it, see if ifconfig still shows the firmware error.

Thanks Chalkbored.

Looking through the boot process:
Code:
...
Starting wpa_supplicant
wlan0: no link...iwi0: firmware stuck in state 4, resetting, 
iwi0: radio turned off
iwi0: radio turned off
...giving up

The 'radio turned off' message means the switch I think. Pressing Fn > F2 on an old laptop switches radio signals on or off. With it switched on I still can't get on the network.

If it's up but it's status isn't associated, then it's probably an error with /etc/wpa_supplicant

Again from the boot process:
Code:
iwi0: status: associated


If it's associated, then you should check for problems with the IP address assignment or the default route being wrong. I've had issues with the ethernet configuration clashing with the wireless one.

How do check the IP assignment?
How do I check the default route?
 
ifconfig shows the ip details. Since iwi0 is up and associated, it will show everything through wlan0.

Code:
netstat -rn
will show the routing table.
 
ChalkBored said:
ifconfig shows the ip details. Since iwi0 is up and associated, it will show everything through wlan0.
OK. Are we good with iwi0 up and associated? We could be talking about little green men for all I'm aware of. :\

Code:
netstat -rn
will show the routing table.

$ netstat -rn
reveals:
Code:
Routing tables

Internet: 
Destination	Gateway		Flags	Refs	Use	Netif	Expire
127.0.0.1	link#10		UH	0	28	lo0

Internet6:
...

127.0.0.1 looks like an Apache localhost IP. I don't have Apache installed; it's a clean FreeBSD 9 install. I don't see my router address in there either?
 
c00kie said:
I'm not having much luck with an iwi0 wireless network inteface card on an old laptop (using NAT on a home network). Here's the background/configuration(s):
That's my working setup on:
Code:
% uname -sri
FreeBSD 9.0-RELEASE-p3 GENERIC
for:
Code:
iwi0: <Intel(R) PRO/Wireless 2200BG> mem 0xe0204000-0xe0204fff irq 11 at device 6.0 on pci2


c00kie said:
/boot/loader.conf
Code:
legal.intel_iwi.license_ack="1"


c00kie said:
/etc/wpa_supplicant.conf
Code:
ctrl_interface=/var/run/wpa_supplicant
eapol_version=2
ap_scan=1
fast_reauth=1

network={
        ssid="my_ssid"
        psk="my_psk"
}


c00kie said:
/etc/rc.conf
Code:
wlans_iwi0="wlan0"
ifconfig_wlan0="DHCP WPA country DE"
Change country to yours. Or don't use it. Default is US. Look at:
Code:
ifconfig iwi0 list countries
for valid ones.

BTW:
c00kie said:
Code:
ifconfig iwi0 up scan
You must use wlan0 for the scan:
Code:
ifconfig wlan0 scan

Also look for "Starting wpa_supplicant." and "DHCPREQUEST" in dmesg. e.g.:
Code:
dmesg -a | grep -E "iwi0|wlan0|DHCP|wpa"
 
Wiedmann said:
That's my working setup on:
Code:
% uname -sri
FreeBSD 9.0-RELEASE-p3 GENERIC
for:
Code:
iwi0: <Intel(R) PRO/Wireless 2200BG> mem 0xe0204000-0xe0204fff irq 11 at device 6.0 on pci2



Code:
legal.intel_iwi.license_ack="1"



Code:
ctrl_interface=/var/run/wpa_supplicant
eapol_version=2
ap_scan=1
fast_reauth=1

network={
        ssid="my_ssid"
        psk="my_psk"
}



Code:
wlans_iwi0="wlan0"
ifconfig_wlan0="DHCP WPA country DE"
Change country to yours. Or don't use it. Default is US. Look at:
Code:
ifconfig iwi0 list countries
for valid ones.

BTW:

You must use wlan0 for the scan:
Code:
ifconfig wlan0 scan

Also look for "Starting wpa_supplicant." and "DHCPREQUEST" in dmesg. e.g.:
Code:
dmesg -a | grep -E "iwi0|wlan0|DHCP|wpa"

Thanks. I followed this to the letter. Check, and triple check.

# ifconfig wlan0 scan
Code:
SSID/MESH	ID	BSSID			CHAN	RATE	S:N		INT	CAPS
virginmedia...		a0:21:b7:e4:a9:3e	6	54M	-65:-95		100	EP RSN HTCAP WPS WPA WWE

Ahah, virginmedia is my carrier or ISP - some light at the end of the tunnel. But still:

# ping [url]http://www.google.com[/url]
Code:
iwi0: device timeout
iwi0: device timeout

I'd try:
# dmesg -a | grep -E "iwi0|wlan0|DHCP|wpa"

but can't find the 'pipe symbol' key combination on this keyboard. I've tried every key combination: AltGr, Fn and Shift with top left key just under the Esc.

Boy this is a tough one....
 
c00kie said:
Code:
SSID/MESH	ID	BSSID			CHAN	RATE	S:N		INT	CAPS
virginmedia...		a0:21:b7:e4:a9:3e	6	54M	-65:-95		100	EP RSN HTCAP WPS WPA WWE
What is "ifconfig wlan0" showing you?


c00kie said:
Ahah, virginmedia is my carrier or ISP - some light at the end of the tunnel.
And "virginmedia..." is the ssid in "/etc/wpa_supplicant.conf"?


c00kie said:
I'd try:
# dmesg -a | grep -E "iwi0|wlan0|DHCP|wpa"

but can't find the 'pipe symbol' key combination on this keyboard. I've tried every key combination: AltGr, Fn and Shift with top left key just under the Esc.

With Num-Lock enabled, you can use "Alt 124". (at least looking at "dmesg -a" is working...)


I guess wpa_supplicant or dhclient is failing. You can do a manual test with:
wpa_supplicant -d -i wlan0 -c /etc/wpa_supplicant.conf
dhclient -d wlan0
(ctrl-c to stop dhclient)
 
Wiedmann said:
What is "ifconfig wlan0" showing you?

And "virginmedia..." is the ssid in "/etc/wpa_supplicant.conf"?
Yes.

# ifconfig wlan0
Code:
wlan0: media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid "" channel 6 (2437 MHz 11g)
country US authmode WPA1+WPA2/802.11I privacy OFF txpower 0 bmiss 24

I guess wpa_supplicant or dhclient is failing. You can do a manual test with:

(ctrl-c to stop dhclient)
OK (omitting some details)...

# wpa_supplicant -d -i wlan0 -c /etc/wpa_supplicant.conf
dhclient -d wlan0

Code:
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'

...
ap_scan=1
Priority group 0
	id=0 ssid='virginmedia999999999'

...

EAPOL: Supplicant port status: Unauthorized
EAPOL: Supplicant port status: Unauthorized
Added interface wlan0
State: DISCONNECTED -> SCANNING
Starting AP scan for wildcard SSID

EAOPL: Supplicant port status: Unauthorized
^C

Furthermore even after numerous Ctl-c's - leaving the laptop idle - I get a recurring message:

Code:
iwi0: device timeout
 
Back
Top