Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
iwl3945 + wpa_supplicant + hardware switch
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Inside
n00b
n00b


Joined: 21 Oct 2002
Posts: 39
Location: Afro-Eurasia

PostPosted: Tue Oct 07, 2008 1:39 pm    Post subject: iwl3945 + wpa_supplicant + hardware switch Reply with quote

Hi everyone!
I've got a problem with wpa_supplicant that bugs me for some time now. If I have the hardware switch turned on before I boot gentoo everything works fine, but when I switch it of and on again or switch it on after gentoo has booted wpa_supplicant can't find any network (wpa_cli status says scanning forever).
To get it back working again I have to switch it off and kill wpa_supplicant, then switch it on again and run /etc/init.d/net.eth1 restart.
I have hotplug, coldplug enabled in /etc/conf.d/rc, ifplugd installed and I use the iwl3945 kernel driver on gentoo-2.6.25-r8.

/etc/conf.d/net
Code:

dns_domain="home"

config_eth0=( "dhcp" )
dhcpcd_eth0="-t 3"

config_eth1=( "dhcp" )
modules_eth1=( "wpa_supplicant" )
wpa_supplicant_eth1="-w -Dwext"



wpa_supplicant.conf
Code:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=0
fast_reauth=1
eapol_version=1
ap_scan=1

network={
        ssid="home"
        bssid=00:0F:EA:84:56:C8
        scan_ssid=1
        proto=WPA
        key_mgmt=WPA-PSK
        pairwise=CCMP
        group=CCMP
        psk=XXXX
        priority=10
}




So, does anyone have any idea what I did wrong?
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Oct 07, 2008 2:18 pm    Post subject: Reply with quote

Hi, first I'm stone to see that you don't use wlan0 ?

Can you post this :

Code:

# lspci
# ifconfig -a
# iwconfig
# rmmod iwl3945
# modprobe iwl3945
# dmesg | tail
Back to top
View user's profile Send private message
Inside
n00b
n00b


Joined: 21 Oct 2002
Posts: 39
Location: Afro-Eurasia

PostPosted: Tue Oct 07, 2008 3:40 pm    Post subject: Reply with quote

Do you think the devicename brakes any scripts? I changed that a while ago when I switched from ipw3945 to iwl3945.

lspci
Code:
00:00.0 Host bridge: Intel Corporation Mobile Memory Controller Hub (rev 03)
00:01.0 PCI bridge: Intel Corporation Mobile PCI Express Root Port (rev 03)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Contoller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)
00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)
00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation Mobile LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corporation Mobile IDE Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation Mobile SATA AHCI Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)
01:00.0 VGA compatible controller: nVidia Corporation Device 0425 (rev a1)
04:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
06:00.0 Mass storage controller: Silicon Image, Inc. Device 3531 (rev 01)
07:04.0 FireWire (IEEE 1394): O2 Micro, Inc. Firewire (IEEE 1394) (rev 02)


ifconfig
Code:
eth0      Link encap:Ethernet  HWaddr 00:03:0d:80:73:b7 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:218 Base address:0xc000

eth1      Link encap:Ethernet  HWaddr 00:13:02:e3:2e:36 
          inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::213:2ff:fee3:2e36/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2034 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2376 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1342365 (1.2 MiB)  TX bytes:428903 (418.8 KiB)

ip6tnl0   Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          NOARP  MTU:1460  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:74 errors:0 dropped:0 overruns:0 frame:0
          TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5316 (5.1 KiB)  TX bytes:5316 (5.1 KiB)

sit0      Link encap:IPv6-in-IPv4 
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wmaster0  Link encap:UNSPEC  HWaddr 00-13-02-E3-2E-36-65-74-00-00-00-00-00-00-00-00 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)



iwconfig
Code:

eth1      IEEE 802.11g  ESSID:"home" 
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:0F:EA:84:56:C8   
          Bit Rate=54 Mb/s   Tx-Power=27 dBm   
          Retry min limit:7   RTS thr:off   Fragment thr=2352 B   
          Encryption key:551C-CEF2-64B7-1D58-32B7-6047-AE0B-AB8E [4]
          Link Quality=93/100  Signal level=-37 dBm  Noise level=-71 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0


dmesg after rmmod && modprobe iwl3945
Code:

iwl3945: Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux, 1.2.23k
iwl3945: Copyright(c) 2003-2007 Intel Corporation
ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 18 (level, low) -> IRQ 18
PCI: Setting latency timer of device 0000:04:00.0 to 64
iwl3945: Detected Intel PRO/Wireless 3945ABG Network Connection
iwl3945: Tunable channels: 13 802.11bg, 23 802.11a channels
phy2: Selected rate control algorithm 'iwl-3945-rs'
udev: renamed network interface wlan0 to eth1
ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 18 (level, low) -> IRQ 18
ADDRCONF(NETDEV_UP): eth1: link is not ready


No connection after that, so I had to run /etc/init.d/net.eth1 restart

dmesg after net.eth1 restart
Code:

ADDRCONF(NETDEV_UP): eth1: link is not ready
eth1: Initial auth_alg=0
eth1: authenticate with AP 00:0f:ea:84:56:c8
eth1: RX authentication from 00:0f:ea:84:56:c8 (alg=0 transaction=2 status=0)
eth1: authenticated
eth1: associate with AP 00:0f:ea:84:56:c8
eth1: RX AssocResp from 00:0f:ea:84:56:c8 (capab=0x431 status=0 aid=1)
eth1: associated
ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
eth1: switched to short barker preamble (BSSID=00:0f:ea:84:56:c8
Back to top
View user's profile Send private message
jcat
Veteran
Veteran


Joined: 26 May 2006
Posts: 1337

PostPosted: Tue Oct 07, 2008 11:12 pm    Post subject: Reply with quote

I believe proper support for both the RF kill switch and the LED is available in 2.6.26, I believe 2.6.25 is limited.

I tried testing version of 2.6.26-r1 and it does work, however there is some other strangeness going that made we want to stay with the current most recent stable versions of Gentoo Sources rather than the testing version. So, for now I remain on 2.6.25-r7




Cheers,
jcat
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1931

PostPosted: Tue Oct 07, 2008 11:22 pm    Post subject: Reply with quote

I have a similar problem. If I switch it off while it's working and switch it back on again, it works. However, if I boot up with he switch off, I have to restart the network. As a solution I have a little script that does a few useful commands through sudo.

I use linux-2.6.27-rc6, and I had the same thing with 2.6.26.
_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Wed Oct 08, 2008 11:29 am    Post subject: Reply with quote

Hi, we gonna need to clean up your previous IPW3945 installation.

First, can you post this :

Code:

# equery list ipw


If you still have something, then emerge -C [package_name]
Also, I'm sure that Udev is crazy :

Code:

# cat /etc/udev/rules.d/70-persistent-net.rules


If you have a line like this :

Code:

# PCI device 0x8086:0x4227 (ipw3945)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:1b:77:4f:4b:1a", NAME="eth1"


Comment it and also, you need to reboot your box and recreate this :

Code:

# cd /etc/init.d
# ln -sfn net.lo net.wlan0


Now, do you still have the problem ?
Back to top
View user's profile Send private message
Inside
n00b
n00b


Joined: 21 Oct 2002
Posts: 39
Location: Afro-Eurasia

PostPosted: Wed Oct 08, 2008 7:36 pm    Post subject: Reply with quote

Jupp, it's still there.

I had nothing left installed from the old driver.

equery list ipw
Code:
one inside # equery list ipw
[ Searching for package 'ipw' in all categories among: ]
 * installed packages
one inside #


I changed the devicename to wlan0, but that didn't do the the trick.

old 70-persistent-net.rules
Code:
# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:03:0d:80:73:b7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x4222 (ipw3945)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:02:e3:2e:36", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:0x4222 (iwl3945)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:02:e3:2e:36", ATTR{type}=="1", KERNEL=="wlan*", NAME="eth1"


new70-persistent-net.rules
Code:
# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:03:0d:80:73:b7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x4222 (ipw3945)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:02:e3:2e:36", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:0x4222 (iwl3945)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:02:e3:2e:36", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
Back to top
View user's profile Send private message
jcat
Veteran
Veteran


Joined: 26 May 2006
Posts: 1337

PostPosted: Thu Oct 09, 2008 5:37 am    Post subject: Reply with quote

Hi,


It's nice that you got your interface names sorted out, but I don't believe that's your problem. It's the kernel!

As in my previous post, you need to use 2.6.26 for proper RF kill switch operation. Unless someone knows otherwise, your requirements won't be met until you start using 2.6.26 instead of 2.6.25.



Cheers,
jcat
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Thu Oct 09, 2008 11:06 am    Post subject: Reply with quote

In fact, you need to use the kernel 2.6.26, but the Iwl3945 really need to communicate with the wlan0 interface.

So, I think that this is part of your problem.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Thu Oct 09, 2008 11:09 am    Post subject: Reply with quote

You will need this inside your kernel :

Code:

(M) RF switch subsystem support
   (M) Input layer to RF switch connector

(*) Wireless LAN
     (*) Wireless LAN (IEEE 802.11)
          (M) Intel Wireless Wifi Core
          (*) IWLWIFI RF kill support
          (M) Intel PRO/Wireless 3945ABG/BG Network Connection
          (*) Enable Spectrum Measurement in iwl3945 drivers
          (*) Enable LEDS features in iwl3945 driver
          (*) Enable full debugging output in iwl3945 driver

(*) LED Class Support
      (*) LED Trigger support


(*) Cryptographic algorithm manager
     (M) SHA1 digest algorithm
     (M) SHA256 digest algorithm
     (M) ECB support
     (M) CBC support
     (M) PCBC support
     (*) AES cipher algorithms
     (*) AES cipher algorithms (i586)
     (*) ARC4 cipher algorithm
     (*) Michael MIC keyed digest algorithm


For the rest, just post if you need help with the kernel 2.6.26.
Back to top
View user's profile Send private message
Inside
n00b
n00b


Joined: 21 Oct 2002
Posts: 39
Location: Afro-Eurasia

PostPosted: Tue Oct 14, 2008 1:39 pm    Post subject: Reply with quote

Thanks! I tried kernel 2.6.26 but without success.
I will try it again when gentoo-sources-2.6.26 go stable.

Thanks anyway!
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Oct 14, 2008 2:22 pm    Post subject: Reply with quote

No problem :P
Back to top
View user's profile Send private message
Mr. Ulmo
n00b
n00b


Joined: 06 Aug 2007
Posts: 9

PostPosted: Thu Oct 16, 2008 3:17 pm    Post subject: iwl3945 ... Reply with quote

Try this:

Code:
cat /sys/class/net/wlan0/device/enable


if it's 0

then try this:

Code:
echo 1 >> /sys/class/net/wlan0/device/enable


this should turn on the hardware.

the path is for my hardware, and you may need to tweak it a bit to get it to work
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum