# Intel 3945 can't connect

## verruckt

New install on an hp laptop with intel 3945 wireless. I've followed the how to's that i could find, and have read through the forums for this particular chipset. I think my problem is that I've read too much, and have started corrupting my progress. I've been at this for several hours now and my brain is fried.

I've read the gentoo wireless wiki

http://www.gentoo-wiki.info/HARDWARE_ipw3945

the wireless doc

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4

and like I said, through as many posts as i could bear to read. I have made progress though. Doing an 'iwlist scan', will produce the ap's in my vicinity, and I can see mine which has an ssid of "ocsiC". It's set to auto connect, but refuses to connect. I'm guessing that becasue i can scan and see results, my card is working fine. But that I have jacked up the configuration somewhere, somehow. On my ap i've turned off all encryption, and am only using mac filtering for security. I have the mac address entered into my ap. 

I'm tired and my brain is fried. Any suggestions on what I might have screwed up?Last edited by verruckt on Mon Jan 19, 2009 7:06 pm; edited 2 times in total

----------

## d2_racing

Hi, first of all, I can help you  :Razz: 

```

# emerge --info

# lspci -v

# dmesg | grep -i iwl

# equery list iwl

# lsmod

# ifconfig -a

# iwconfig 

# cat /etc/conf.d/net

# cat /etc/wpa_supplicant/wpa_supplicant.conf

# iwlist scan

```

So with that, I know what is going on with your IPW3945ABG.

----------

## SlashBeast

use iwl3945 (better than ipw, imho) and emerge wicd (easy, gnome/kde/xfce-free network menager) and use. http://en.gentoo-wiki.com/wiki/Iwlwifi

----------

## d2_racing

The wiki says ipw, but it use iwl.

----------

## verruckt

 *d2_racing wrote:*   

> Hi, first of all, I can help you 
> 
> ```
> 
> # emerge --info
> ...

 

Here goes...

emerge --info

```
System uname: 2.6.27-gentoo-r7 i686 Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz

Timestamp of tree: Sun, 18 Jan 2009 01:45:01 +0000

app-shells/bash: 3.2_p17-r1

dev-lang/python: 2.4.4-r1

dev-python/pycrypto: 2.0.1-r6

sys-apps/baselyout: 1.12.11.1

sys-apps/sandbox: 1.2.18.1-r2

sys-devel/autoconf: 2.61-r1

sys-devel/automake: 1.10.1

sys-devel/binutils: 2.19-r1

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool: 1.5.24

virtual/os-headers: 2.6.23-r3

ACCEPT_KEYWORDS="x86"

CBUILD="1686-pc-linux-gnu"

CFLAGS="-02 -march=i686 -pipe"

CHOST="i686-pc-linux-gnu:

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-02 -march=i686 -pipt"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"

Gentoo_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LDFLAGS="-Wl,-01"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="acl berkdb bzip2 cli cracklib crypt cups dri fortran gdbm gpm iconv ipv6 isdnlog midi mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS=" ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz
```

_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif spelling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"

Unset" CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY[/CODE]

lspci -v

```
-bash: lspci: command not found
```

dmesg | grep -i iwl

```
iwl3945: Intel PRO/Wireless 3945ABG/BG Network Connection driver for Linux, 1.2.26kds

iwl3945: Copyright(c) 2003-2008 Intel Corporation 

iwl3945: 000:10:00.0 PCI INT A -> GSI 17 (level, low) -> IRQ 17

iwl3945: 000:10:00.0 setting latency timer to 64

iwl3945: Detected Intel Wireless WiFi Link 3945ABG

iwl3945: Tunable channels: 11 802.11bg, 13 802.11a channels

phy0: Selected rate control algorithm 'iwl-3945-rs'

iwl3945: 000:10:00.0: PCI INT A disabled

iwl3945: 000:10:00.0: PCI INT A ->GSI 17 (level, log) -> IRQ 17

iwl3945: 000:10:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

firmware: requesting iwlwifi-3945-1.ucode

Registered led device: iwl-phy0:radio

Registered led device: iwl-phy0:assoc

Registered led device: iwl-phy0:RX

Registered led device: iwl-phy0:TX

iwl3945: 000:10:00.0: PCI INT A disabled

iwl3945: 000:10:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

iwl3945: 000:10:00.0: restoring config space at offset 0x1 (was 0x100002, writing 0x100006)

Registered led device: iwl-phy: radio

Registered led device: iwl-phy: assoc

Registered led device: iwl-phy: RX

Registered led device: iwl-phy: TX

iwl3945: Error sending REPLY_LEDS_CMD: iwl3945_enqueue_hcmd failed: -5

Registered led device: iwl-phy: radio

Registered led device: iwl-phy: assoc

Registered led device: iwl-phy: RX

Registered led device: iwl-phy: TX
```

equery list iwl

```
-bash: equery: command not found
```

lsmod

```

Module                    Size          Used by

iwl3945                   150644      0

rfkill                           7832      2 iwl3945
```

ifconfig -a

```

eth0

Link encap:Ethernet HWaddr 00:1A:4B:73:1A:5A

inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0

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

RXbytes: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

inet6addr:  ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 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

RXbytes:812 (812.0 b)  TX bytes:812 (812.0 b)

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:1000

RXbytes:0 (0.0 b)  TX bytes:0 (0.0 b)

wlan0

Link encap:Ethernet HWaddr 00:1C:BF:30:CD:DC

inet addr:192.168.1.107 Bcast:192.168.1.255 Mask:255.255.255.0

inet6addr:fe80::21c:bfff:fe30:cddc/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:18381 errors:0 dropped:0 overruns:0 frame:0

TX packets:16 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RXbytes:1243024 (1.1 Mb)  TX bytes:2592 (2.5Kb)

```

iwconfig

```

lo          no wireless extensions.

eth0          no wireless extensions.

sit0          no wireless extensions.

wmaster0          no wireless extensions.

wlan0

IEEE 802.11abg ESSID:"ocsiC"

Mode:Managed Frequency:2.462 GHz Access Point: *****************

Bit Rate-24Mb/s Tx-Power=14dBm

Retry min limit:7 RTS thr:off Fragment thr=2352 B

Encryption key:off

Power Management: off

Link Quality=93/100 Signal level:-36 dBm Noise level=-82 dBm

Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0

Tx excessive retries:0 Invalid misc:0 Missed beacon:0

```

cat /etc/conf.d/net

```

config_eth0=( "192.168.1.100/24" )

routes_eth0=( "default via 192.168.1.1" )

essid_wlan0="ocsiC"

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0_="-Dwext"

config_wlan0=( "dhcp" )

dhcpcd_wlan0="-t 30" 

preferred_aps=( "ocsiC" )

sleep_scan_DEVICE="1"

sleep_associate_DEVICE="25"

```

cat /etc/wpa_supplicant/wpa_supplicant.conf

```

network={

              ssid="ocsiC"

              key_mgmt=NONE

              priority=-9999999

}

```

iwlist scan

```

lo          Interface doesn't support scanning.

eth0          Interface doesn't support scanning.

sit0          Interface doesn't support scanning.

wmaster0          Interface doesn't support scanning.

*i only put in the info about my AP, it picks up about 20 others in my area*

wlan0

Cell 13 - Address: *************

ESSID:"ocsiC"

Mode:Master

Channel:11

Frequency:2.462 GHz (channel 11)

Quality=92/100 Signal level:-38 dBm Noise level=-82 dBm

Encryptioin key:off

Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s

              24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s

              12 Mb/s; 48 Mb/s

Extra:tsf=00000010d4a7a187

Extra: Last beacon: 12ms ago

```

It seems as though i've been given a dhcp address on the wlan0 interface, and have my essid set correctly. But it just doesn't seem to be connected. Appreciate the help.

Kurt

----------

## d2_racing

Hi, first thing first, we gonna fix your current CFLAGS  :Razz: 

```

CBUILD="1686-pc-linux-gnu" 

CFLAGS="-02 -march=i686 -pipe" 

CXXFLAGS="-02 -march=i686 -pipe" 

```

It's -pipe not -pipt  :Razz: 

----------

## d2_racing

For the lspci command and the equery command, plz install this :

```

# emerge -av pciutils

# emerge -av gentookit

```

After that, plz post this :

```

# lspci -v

# equery list iwl

# lsmod

```

----------

## d2_racing

Now, we gonna try something  :

Unplug your wired cable and change this inside your /etc/conf.d/net 

```

# nano /etc/conf.d/net

```

```

# wired config  :

config_eth0="dhcp"

dhcpcd_eth0="-N"

dns_domain_lo="homenetwork"

#WPA_SUPPLICANT :

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

config_wlan0=( "dhcp" )

```

Now edit this file : 

```

# nano /etc/wpa_supplicant/wpa_supplicant.conf

```

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=0

#update_config=1

network={ ssid="ocsiC" 

                 key_mgmt=NONE 

                 priority=5

}

```

After that run this :

```

# cd /etc/init.d/net.wlan0 start

# dmesg | tail

# ifconfig -a

# iwconfig

# wpa_cli status

# wpa_cli status

# wpa_cli status

# ping -c 3 www.google.com

```

----------

## verruckt

will do it now, and report back.

----------

## d2_racing

No problem, take your time  :Razz: 

----------

## verruckt

Ok, i've gotten connected. Thank you!   :Very Happy: 

I guess i had one or both the wpa_supplicant.conf and the init.d/net.wlan0 configurations screwed up. Thank you much again D2_racing.   :Very Happy: 

----------

## d2_racing

No problem  :Razz: 

----------

## verruckt

 *d2_racing wrote:*   

> Hi, first thing first, we gonna fix your current CFLAGS 
> 
> ```
> 
> CBUILD="1686-pc-linux-gnu" 
> ...

 

I missed this post of yours...

what file is it, that I would edit these settings?

----------

## d2_racing

it's inside /etc/make.conf

----------

## verruckt

Hmmm...

Oddly my wireless connection has died this evening. Running /etc/init.d/net.wlan0 returns this...

```

Starting wlan0

Starting wpa_supplicant on wlan0 ...

Line 8: Invalid configuration line 'network={ ssid="ocsiC" .

Line 9: Invalid configuration line 'key_mgmt=NONE' .

Line 10: Invalid configuration line 'priority=-5' .

Line 11: Invalid configuration line '}' .

Failed to read or parse configuration '/etc/wpa_supplicant/wpa_supplicant.conf

```

WTH???    :Sad:  [/code]

----------

## d2_racing

Hi, can you post your /etc/wpa_supplicant/wpa_supplicant.conf

----------

## verruckt

Sorry. I forgot to add that my wpa_supplicant.conf didn't change. Still the same.   :Confused: 

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

apscan=0

#update_config=1

network={ ssid="ocsiC"

                           key_mgmt=NONE

                           priority=-5

}

```

----------

## d2_racing

Ok try this one :

```

ctrl_interface=/var/run/wpa_supplicant 

ctrl_interface_group=wheel 

apscan=0 

#update_config=1 

network={ssid="ocsiC" key_mgmt=NONE priority=-5} 

```

Maybe there is some weird white space inside the network config....

----------

## verruckt

Nope, same error. Though the "invalid configuration" lines are changed.

```

* Starting wlan0

*    Starting wpa_supplicant on wlan0 ...

Line 6: Invalid configuration line 'apscan=0'.

Line 8: Invalid configuration line 'network={ ssid="ocsiC" key_mgmt=NONE priority=-5}'.

Failed to read or parse configuration '/etc/wpa_supplicant/wpa_supplican   [ !! ]
```

ON a hunch, i renamed the file, and created a new one. I still get the same error.

----------

## d2_racing

Ok, I see, it's this :

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

apscan=0

#update_config=1

network={ssid="ocsiC" key_mgmt=NONE priority=5} 

```

or remove the priority variable.

----------

## verruckt

Tried removing the "-" from the priority variable, and that didn't help. Got the same error.

Removed the variable altogether, and get the same error.   :Confused: 

----------

## d2_racing

Hi, can you post this :

```

# cd /etc/wpa_supplicant

# ls -la

# cat /etc/conf.d/net

```

----------

## SlashBeast

I think you should try wicd, you only need to support iwl3945 in kernel and emerge wicd, it no need net.wlan0 and /etc/conf.d/net config, It have easy to use wicd-client (in python+gtk2). If you add wicd in runlevel (boot or default) it will be autoconnecting you before X will start.

----------

## verruckt

 *d2_racing wrote:*   

> Hi, can you post this :
> 
> ```
> 
> # cd /etc/wpa_supplicant
> ...

 

here goes...

```

ls -la

-rwxr-xr-x 1 root root 1312 Jan 18 10:37 wpa_cli.sh

-rw-r--r-- 1 root root 131 Jan 20 15:55 wpa_supplicant.conf

-rw-r--r-- 1 root root 280 Jan 20 01:50 wpa_supplicant.old

```

cat /etc/conf.d/net

```

#This black configuration will automatically use DHCP for any net.*

#scripts in /etc/init.d. To create a more complet configuration,

#please review /etc/conf.d/net.example and save your configuration

#in /etc/conf.d/net (this file :]!).

#wired config

config_eth0="dhcp"

dhcpcd_eth0="-N"

dns_domain_lo="homenetwork"

#WPA_SUPPLICANT

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0_="-Dwext"

config_wlan0=( "dhcp" )

```

----------

## verruckt

 *SlashBeast wrote:*   

> I think you should try wicd, you only need to support iwl3945 in kernel and emerge wicd, it no need net.wlan0 and /etc/conf.d/net config, It have easy to use wicd-client (in python+gtk2). If you add wicd in runlevel (boot or default) it will be autoconnecting you before X will start.

 

With GTK though, I'd need xwindows installed and running. I haven't gotten to that point yet.   :Confused: 

----------

## devilheart

 *verruckt wrote:*   

> Nope, same error. Though the "invalid configuration" lines are changed.
> 
> ```
> 
> * Starting wlan0
> ...

 as far as I know, line 6 should be ap_scan=0

not apscan=0

----------

## verruckt

 *devilheart wrote:*   

>  *verruckt wrote:*   Nope, same error. Though the "invalid configuration" lines are changed.
> 
> ```
> 
> * Starting wlan0
> ...

 

Going back through the posts, i think you're right. I changed it ans restarted. But nothing changed.

----------

## d2_racing

Hi, your /etc/conf.d/net is invalide :

```

wpa_supplicant_wlan0_="-Dwext" 

```

Should be like this :

```

wpa_supplicant_wlan0="-Dwext" 

```

----------

## verruckt

 *d2_racing wrote:*   

> Hi, your /etc/conf.d/net is invalide :
> 
> ```
> 
> wpa_supplicant_wlan0_="-Dwext" 
> ...

 

Last night I went back through all the steps that you suggested, and saw that. I changed it and still getting the error about not reading the wpa_supplicant file.

----------

## d2_racing

Can you post your actual :

```

# cat /etc/conf.d/net

# cat /etc/wpa_supplicant/wpa_supplicant.conf

```

----------

## verruckt

 *d2_racing wrote:*   

> Can you post your actual :
> 
> ```
> 
> # cat /etc/conf.d/net
> ...

 

Will do. I'll post them in about an hour and a half,  when i get home from work. Thnx

----------

## verruckt

I don't seem to be able to upload an attachment, guess that options isn't available. I'll PM you a link to the actual files, i can host them at a friends website.

----------

## d2_racing

I saw the file and it's fine.

I don't know what is going on   :Embarassed: 

----------

## d2_racing

We will try something :

```

# rm /etc/wpa_supplicant/wpa_supplicant.conf

# emerge -Cv wpa_supplicant

# emerge -v wpa_supplicant

```

Now edit manually your /etc/wpa_supplicant/wpa_supplicant.conf

```

# nano /etc/wpa_supplicant/wpa_supplicant.conf

```

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=0

network={ssid="ocsiC" key_mgmt=NONE} 

```

----------

## verruckt

 *d2_racing wrote:*   

> We will try something :
> 
> ```
> 
> # rm /etc/wpa_supplicant/wpa_supplicant.conf
> ...

 

Crap almighty    :Shocked: 

I unmerged wpa_supplicant, then added it back. Went in and edited the conf file exactly as you had it, and get an error. 

```

* Starting wlan0

* Starting wpa_supplicant on wlan0 ...

Line 7: Invalid configuration line 'network={ssid="ocsiC" key_mgmt=NONE}

Failed to read or parse configuration '/etc/wpa_supplicant/wpa_supplican [!!]
```

----------

## jaydoc

should it be wpa_supplicant....?

----------

## devilheart

try with this config

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=0

network={

               ssid="ocsiC"

               key_mgmt=NONE

} 
```

----------

## verruckt

 *jaydoc wrote:*   

> should it be wpa_supplicant....?

 

Yes, and it is. It's just that the error, the text is wrapping and not all displayed. But that is the name of the file.

----------

## verruckt

 *devilheart wrote:*   

> try with this config
> 
> ```
> 
> ctrl_interface=/var/run/wpa_supplicant
> ...

 

I formatted my wpa_supplicant.conf file as you put it, and I no longer get that error. However, I get something different...

```
SIOCSIFFLAGS: No such device

Could not set interface 'wlan0' UP

ioctl[SIOCSIWAUTH]: Operation not supported

```

This is new. Not sure what this means?   :Shocked: 

----------

## d2_racing

Can you post this after the error :

```

# ifconfig -a

# iwconfig

# wpa_cli status

```

And this file too :

```

# cat /etc/conf.d/net

```

----------

