# Problem connecting to wireless AP [SOLVED]

## daniel1988

Several days ago, it used to work fine. Since my ISP changed the way to connect to the Internet from vpn to PPPoE, I had to upgrade some packages, and now, it won't access the AP I need.

```
gentoo daniel1988 # genlop --list --date 14 days ago

 * sys-apps/sysvinit

     Thu Jun 28 23:58:26 2007 >>> sys-apps/sysvinit-2.86-r8

     Fri Jun 29 00:00:04 2007 >>> sys-apps/debianutils-2.17.5

     Fri Jun 29 00:00:40 2007 >>> sys-apps/mktemp-1.5

     Fri Jun 29 00:00:47 2007 >>> virtual/init-0

     Fri Jun 29 00:03:34 2007 >>> sys-apps/baselayout-1.12.9-r2

     Fri Jun 29 00:06:22 2007 >>> sys-apps/module-init-tools-3.2.2-r3

     Sun Jul  1 14:37:32 2007 >>> net-dialup/ppp-2.4.4-r4

     Mon Jul  2 12:58:30 2007 >>> net-wireless/wireless-tools-29_pre10

```

In range of my grid antenna, there are two APs I can connect: "centurion" & "Crkvica-2". While in windows I can connect to both of them, in Gentoo I can't connect to "centurion" (which I actually need to connect).

```
gentoo daniel1988 # iwlist scan

lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

wlan0     Scan completed :

          Cell 01 - Address: 00:14:78:74:14:34

                    ESSID:"Crkvica-1"

                    Mode:Master

                    Frequency:2.427 GHz (Channel 4)

                    Bit Rates:1 Mb/s

                    Bit Rates:2 Mb/s

                    Bit Rates:5.5 Mb/s

                    Bit Rates:11 Mb/s

                    Quality=79/100  Signal level=-68 dBm  Noise level=-256

                    Encryption key:off

          Cell 02 - Address: 00:02:6F:33:C7:DE

                    ESSID:"hemonet03"

                    Mode:Master

                    Frequency:2.412 GHz (Channel 1)

                    Bit Rates:1 Mb/s

                    Bit Rates:2 Mb/s

                    Bit Rates:5.5 Mb/s

                    Bit Rates:11 Mb/s

                    Quality=27/100  Signal level=-118 dBm  Noise level=-25

                    Encryption key:off

          Cell 03 - Address: 00:14:78:73:31:C8

                    ESSID:"Crkvica-2"

                    Mode:Master

                    Frequency:2.452 GHz (Channel 9)

                    Bit Rates:1 Mb/s

                    Bit Rates:2 Mb/s

                    Bit Rates:5.5 Mb/s

                    Bit Rates:11 Mb/s

                    Quality=1/100  Signal level=-81 dBm  Noise level=-256 

                    Encryption key:off

          Cell 04 - Address: 00:40:96:46:31:26

                    ESSID:"centurion"

                    Mode:Master

                    Frequency:2.442 GHz (Channel 7)

                    Bit Rates:1 Mb/s

                    Bit Rates:11 Mb/s

                    Quality=28/100  Signal level=-117 dBm  Noise level=-25

                    Encryption key:off
```

```
gentoo daniel1988 # iwconfig wlan0 essid "Crkvica-2"

gentoo daniel1988 # iwconfig wlan0

wlan0     IEEE 802.11b  ESSID:"Crkvica-2"  

          Mode:Managed  Frequency:2.452 GHz  Access Point: 00:14:78:73:31:C8   

          Bit Rate=11 Mb/s   Sensitivity=80/85  

          Retry:on   Fragment thr:off

          Encryption key:off

          Link Quality=92/100  Signal level=-51 dBm  Noise level=-248 dBm

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

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

```

 everything's fine

```
gentoo daniel1988 # iwconfig wlan0 essid "centurion"

gentoo daniel1988 # iwconfig wlan0

wlan0     IEEE 802.11b  ESSID:"centurion"  

          Mode:Managed  Frequency:2.462 GHz  Access Point: Not-Associated   

          Bit Rate:11 Mb/s   Sensitivity=80/85  

          Retry:on   Fragment thr:off

          Encryption key:off

          Link Quality=1/100  Signal level=-81 dBm  Noise level=-157 dBm

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

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

```

It just changes frequencies and it won't stop on channel 7 (2.442GHz)...

Whole /var/log/messages from boot time since init 6 (and going back to windows   :Mad: ) link

This may be useful:

```
daniel1988@gentoo ~ $ eix baselayout

[I] sys-apps/baselayout

     Available versions:  1.11.15-r3 1.12.9-r2 ~1.12.10-r3 ~1.12.10-r4 [M]~1.13.0_alpha12 [M]~2.0.0_alpha1 [M]~2.0.0_alpha2 [M]~2.0.0_alpha2-r1 [M]~2.0.0_alpha3 [M]~2.0.0_alpha3-r1

     Installed versions:  1.12.9-r2(00:03:22 06/29/07)(-bootstrap -build -static unicode)

     Homepage:            http://www.gentoo.org/

     Description:         Filesystem baselayout and init scripts

daniel1988@gentoo ~ $ eix rtl8180

[I] net-wireless/rtl8180

     Available versions:  (~)0.22_pre20050528

     Installed versions:  0.22_pre20050528(14:12:33 08/17/06)(kernel_linux)

     Homepage:            http://rtl8180-sa2400.sourceforge.net

     Description:         Driver for the rtl8180 wireless chipset

daniel1988@gentoo ~ $ eix wireless-tools

[I] net-wireless/wireless-tools

     Available versions:  27-r1 28 (~)29_pre10 ~29_pre14 [M]~29_pre17 ~29_pre20 ~29_pre21

     Installed versions:  29_pre10(12:58:14 07/02/07)(-multicall nls)

     Homepage:            http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html

     Description:         A collection of tools to configure IEEE 802.11 wireless LAN cards

```

Any idea why this happens (and how to solve it)?

TIA,

DanielLast edited by daniel1988 on Mon Aug 06, 2007 2:54 pm; edited 1 time in total

----------

## didymos

Is it possible to use the net-wireless/rtl8187 driver with the card, and if so, have you tried that?  Another idea: try doing iwpriv <your interface> and see if there's some option for background scanning. Disable it if there is and try again.  You may be able to adjust the interval between background scans as well.

----------

## daniel1988

```
daniel1988@gentoo ~ $ eix rtl8187

* net-wireless/rtl8187

     Available versions:  1.10

     Homepage:            http://www.realtek.com.tw

     Description:         Driver for the RTL8187 wireless chipset

```

 I think it's not possible to use that driver with my rtl8180 based wireless card. rtl8180 used to work ok for almost two years.

Now essid centurion switched from channel 7 to channel 6. Now it stops Frequency on channel 6, but it fails to get the MAC adress of AP (Access Point: Not-Associated). New part of /var/log/messages:

```
  2087  Jul 10 23:32:42 gentoo login[7305]: PAM pam_putenv: delete non-existent entry; MAIL

  2088  Jul 10 23:32:52 gentoo login(pam_unix)[7368]: session opened for user daniel1988 by (uid=0)

  2089  Jul 10 23:32:56 gentoo agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.

  2090  Jul 10 23:32:57 gentoo agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode

  2091  Jul 10 23:32:57 gentoo agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode

  2092  Jul 10 23:32:57 gentoo agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.

  2093  Jul 10 23:32:57 gentoo agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode

  2094  Jul 10 23:32:57 gentoo agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode

  2095  Jul 10 23:35:22 gentoo su[7753]: Successful su for root by daniel1988

  2096  Jul 10 23:35:22 gentoo su[7753]: + pts/0 daniel1988:root

  2097  Jul 10 23:35:22 gentoo su(pam_unix)[7753]: session opened for user root by (uid=1000)

  2098  Jul 10 23:35:32 gentoo rtl8180: Bringing up iface

  2099  Jul 10 23:35:32 gentoo rtl8180: Card successfully reset

  2100  Jul 10 23:35:49 gentoo IEEE802.11: Associating with centurion

  2101  Jul 10 23:35:49 gentoo IEEE802.11: Stopping scan

  2102  Jul 10 23:35:49 gentoo IEEE802.11: Sending authentication request

  2103  Jul 10 23:35:49 gentoo IEEE802.11: Received authentication response

  2104  Jul 10 23:35:49 gentoo IEEE802.11: Sending association request

  2105  Jul 10 23:35:50 gentoo IEEE802.11: Association failed

  2106  Jul 10 23:35:50 gentoo IEEE802.11: Associating with centurion

  2107  Jul 10 23:35:50 gentoo IEEE802.11: Stopping scan

  2108  Jul 10 23:35:50 gentoo IEEE802.11: Sending authentication request

  2109  Jul 10 23:35:50 gentoo IEEE802.11: Received authentication response

  2110  Jul 10 23:35:50 gentoo IEEE802.11: Sending association request

  2111  Jul 10 23:35:50 gentoo IEEE802.11: Association failed

  2112  Jul 10 23:35:50 gentoo IEEE802.11: Associating with centurion

  2113  Jul 10 23:35:50 gentoo IEEE802.11: Stopping scan

  2114  Jul 10 23:35:50 gentoo IEEE802.11: Sending authentication request

  2115  Jul 10 23:35:50 gentoo IEEE802.11: Received authentication response

  2116  Jul 10 23:35:50 gentoo IEEE802.11: Sending association request

  2117  Jul 10 23:35:51 gentoo IEEE802.11: Association failed

  2118  Jul 10 23:35:51 gentoo IEEE802.11: Associating with centurion

  2119  Jul 10 23:35:51 gentoo IEEE802.11: Stopping scan

  2120  Jul 10 23:35:51 gentoo IEEE802.11: Sending authentication request

  2121  Jul 10 23:35:51 gentoo IEEE802.11: Received authentication response

  2122  Jul 10 23:35:51 gentoo IEEE802.11: Sending association request

  2123  Jul 10 23:35:51 gentoo IEEE802.11: Association failed

  2124  Jul 10 23:35:52 gentoo IEEE802.11: Associating with centurion

  2125  Jul 10 23:35:52 gentoo IEEE802.11: Stopping scan

  2126  Jul 10 23:35:52 gentoo IEEE802.11: Sending authentication request

  2127  Jul 10 23:35:52 gentoo IEEE802.11: Received authentication response

  2128  Jul 10 23:35:52 gentoo IEEE802.11: Sending association request

  2129  Jul 10 23:35:52 gentoo IEEE802.11: Association failed

  2130  Jul 10 23:35:52 gentoo IEEE802.11: Associating with centurion

  2131  Jul 10 23:35:52 gentoo IEEE802.11: Stopping scan

  2132  Jul 10 23:35:52 gentoo IEEE802.11: Sending authentication request

  2133  Jul 10 23:35:52 gentoo IEEE802.11: Received authentication response

  2134  Jul 10 23:35:52 gentoo IEEE802.11: Sending association request

  2135  Jul 10 23:35:53 gentoo IEEE802.11: Association failed

  2136  Jul 10 23:35:53 gentoo IEEE802.11: Associating with centurion

  2137  Jul 10 23:35:53 gentoo IEEE802.11: Stopping scan

  2138  Jul 10 23:35:53 gentoo IEEE802.11: Sending authentication request

  2139  Jul 10 23:35:53 gentoo IEEE802.11: Received authentication response

  2140  Jul 10 23:35:53 gentoo IEEE802.11: Sending association request

  2141  Jul 10 23:35:53 gentoo IEEE802.11: Association failed

  2142  Jul 10 23:35:53 gentoo IEEE802.11: Associating with centurion

  2143  Jul 10 23:35:53 gentoo IEEE802.11: Stopping scan

  2144  Jul 10 23:35:53 gentoo IEEE802.11: Sending authentication request

  2145  Jul 10 23:35:53 gentoo IEEE802.11: Received authentication response

  2146  Jul 10 23:35:53 gentoo IEEE802.11: Sending association request

  2147  Jul 10 23:35:54 gentoo IEEE802.11: Association failed

  2148  Jul 10 23:35:54 gentoo IEEE802.11: Associating with centurion

  2149  Jul 10 23:35:54 gentoo IEEE802.11: Stopping scan

  2150  Jul 10 23:35:54 gentoo IEEE802.11: Sending authentication request

  2151  Jul 10 23:35:54 gentoo IEEE802.11: Received authentication response

  2152  Jul 10 23:35:54 gentoo IEEE802.11: Sending association request

  2153  Jul 10 23:35:54 gentoo IEEE802.11: Association failed

  2154  Jul 10 23:35:55 gentoo IEEE802.11: Associating with centurion

  2155  Jul 10 23:35:55 gentoo IEEE802.11: Stopping scan

  2156  Jul 10 23:35:55 gentoo IEEE802.11: Sending authentication request

  2157  Jul 10 23:35:55 gentoo IEEE802.11: Received authentication response

  2158  Jul 10 23:35:55 gentoo IEEE802.11: Sending association request

  2159  Jul 10 23:35:55 gentoo IEEE802.11: Association failed

  2160  Jul 10 23:35:55 gentoo IEEE802.11: Associating with centurion

  2161  Jul 10 23:35:55 gentoo IEEE802.11: Stopping scan

  2162  Jul 10 23:35:55 gentoo IEEE802.11: Sending authentication request

  2163  Jul 10 23:35:55 gentoo IEEE802.11: Received authentication response

  2164  Jul 10 23:35:55 gentoo IEEE802.11: Sending association request

  2165  Jul 10 23:35:56 gentoo IEEE802.11: Association failed

```

and so on....

Driver has crashed my linux box 5 times today (it used to crash the box in the past too, but only when my ISP got problems with AP (usually after rain...)). That happend after executing #iwconfig wlan0 essid centurion a lot of times. The box was dead completely, no keyboard/mouse event could "revive" it, only hard reset.

I've tried iwpriv wlan0 (last command from help 0) with no success. Everything else seemed usless to me. Will post the output of iwpriv wlan0 later, I can't boot it for 6th time today...

Will it help to recompile the driver (rtl8180 ebuild)?

Regards,

Daniel

----------

## daniel1988

```
gentoo daniel1988 # iwpriv wlan0

wlan0     Available private ioctls :

          monitor          (8BE0) : set   2 int   & get   0      

          badcrc           (8BE1) : set   1 int   & get   0      

          forceassoc       (8BE2) : set   1 int   & get   0      

          beaconint        (8BE3) : set   1 int   & get   0      

          prismhdr         (8BE4) : set   1 int   & get   0      

          activescan       (8BE5) : set   1 int   & get   0      
```

What to do with this?

Tried to reemerge rtl8180 package - still the same. It successfully connects on Crkvica-2:

```
gentoo daniel1988 # iwconfig wlan0

wlan0     IEEE 802.11b  ESSID:"Crkvica-2"  

          Mode:Managed  Frequency:2.452 GHz  Access Point: 00:14:78:73:31:C8   

          Bit Rate=11 Mb/s   Sensitivity=80/85  

          Retry:on   Fragment thr:off

          Encryption key:off

          Link Quality:93/100  Signal level:-49 dBm  Noise level:-249 dBm

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

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

gentoo daniel1988 # tail /var/log/messages

Jul 14 15:12:37 gentoo IEEE802.11: Sending association request

Jul 14 15:12:38 gentoo IEEE802.11: Association failed

Jul 14 15:12:38 gentoo IEEE802.11: Associating with Crkvica-2

Jul 14 15:12:38 gentoo IEEE802.11: Stopping scan

Jul 14 15:12:38 gentoo IEEE802.11: Sending authentication request

Jul 14 15:12:38 gentoo IEEE802.11: Received authentication response

Jul 14 15:12:38 gentoo IEEE802.11: Sending association request

Jul 14 15:12:38 gentoo IEEE802.11: Received association response

Jul 14 15:12:38 gentoo IEEE802.11: Successfully associated

Jul 14 15:12:38 gentoo rtl8180: Joining the BSS
```

While it can't connect AP called centurion:

```
gentoo daniel1988 # iwconfig wlan0

wlan0     IEEE 802.11b  ESSID:"centurion"  

          Mode:Managed  Frequency:2.457 GHz  Access Point: Not-Associated   

          Bit Rate:11 Mb/s   Sensitivity=80/85  

          Retry:on   Fragment thr:off

          Encryption key:off

          Link Quality:97/100  Signal level:-38 dBm  Noise level:-253 dBm

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

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

and no new lines in /var/log/messages. Now won't even stop frequency on channel 6  :Sad: . Just to mention one more time, it works fine in windows (it = centurion). It looks like wireless signal is to low under gentoo and that's the reason why it won't stop frequency on channel 6 and get AP's MAC adress. Don't know why  :Sad:  - antenna is always in the same position (no matter win or linux)

Should I fill one bug report on b.g.o and/or on official page of the driver on sf.net? What else to try?

--Daniel

----------

## IvanMajhen

Try this: iwconfig wlan0 rate 1M sens 85

Also there are updated drivers on https://sourceforge.net/forum/?group_id=186406

and svn ebuild: http://overlays.gentoo.org/proj/sunrise/browser/reviewed/net-wireless/rtl818x-svn

Tried ndiswrapper?

Pozdrav iz Hrvatske.

----------

## daniel1988

Sorry for answering so late, I was away....

 *Quote:*   

> Try this: iwconfig wlan0 rate 1M sens 85 

 

nothing

 *Quote:*   

> Tried ndiswrapper? 

 I'd like to avoid ndiswrapper as long as it's possible...

before trying rtl818x-svn, I'd like to try rtl-wifi (I think that it's not the same project as rtl818x-svn, or maybe is...)

http://rtl-wifi.sourceforge.net/wiki/Main_Page

b.g.o: https://bugs.gentoo.org/show_bug.cgi?id=172913

and ebuild from b.g.o: https://bugs.gentoo.org/attachment.cgi?id=115065

```
gentoo rtl-wifi # pwd

/usr/local/portage/net-wireless/rtl-wifi

gentoo rtl-wifi # ebuild rtl-wifi-9999.ebuild digest

: command not foundnet-wireless/rtl-wifi/rtl-wifi-9999.ebuild: line 4: 

!!! ERROR: net-wireless/rtl-wifi-9999 failed.

Call stack:

  ebuild.sh, line 1512:   Called source '/usr/local/portage/net-wireless/rtl-wifi/rtl-wifi-9999.ebuild'

  rtl-wifi-9999.ebuild, line 5:   Called inherit 'eutils' 'subversion' 'linux-in'o' 'linux-mod

  ebuild.sh, line 1234:   Called die

.eclass could not be found by inherit()

!!! If you need support, post the topmost build error, and the call stack if relevant.

```

why it won't digest the ebuild?

----------

## didymos

Looks like your copy got screwed up somehow.  It worked here.

Notice this:  *Quote:*   

> linux-in'o'

 

Should be linux-info.

----------

## daniel1988

Text was ok: "linux-info" was written in file. That was windows prob damn it...I c/p form browser & saved it in notepad, moved it through samba and renamed it in file.ebuild. Later, I c/p-ed that text into new file made with nano & it worked.

Here we go:

```
gentoo daniel1988 # emerge rtl-wifi

Calculating dependencies... done!

>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) net-wireless/rtl-wifi-9999 to /

 * checking ebuild checksums ;-) ...                                      [ ok ]

 * checking auxfile checksums ;-) ...                                     [ ok ]

 * checking miscfile checksums ;-) ...                                    [ ok ]

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/2.6.16-gentoo-r9/build

 * Found sources for kernel version:

 *     2.6.16-gentoo-r9

 * Checking for suitable kernel configuration options...                  [ ok ]

>>> Unpacking source...

 * subversion check out start -->

 *      repository: https://rtl-wifi.svn.sourceforge.net/svnroot/rtl-wifi

svn: PROPFIND request failed on '/svnroot/rtl-wifi'

svn: PROPFIND of '/svnroot/rtl-wifi': Could not resolve hostname `rtl-wifi.svn.s

ourceforge.net': Temporary failure in name resolution (https://rtl-wifi.svn.sour

ceforge.net)

!!! ERROR: net-wireless/rtl-wifi-9999 failed.

Call stack:

  ebuild.sh, line 1615:   Called dyn_unpack

  ebuild.sh, line 752:   Called qa_call 'src_unpack'

  ebuild.sh, line 44:   Called src_unpack

  ebuild.sh, line 1305:   Called subversion_src_unpack

  subversion.eclass, line 274:   Called subversion_fetch

  subversion.eclass, line 177:   Called die

!!! subversion.eclass: can't fetch from https://rtl-wifi.svn.sourceforge.net/svn

root/rtl-wifi.

!!! If you need support, post the topmost build error, and the call stack if rel

evant.

!!! A complete build log is located at '/var/log/portage/net-wireless:rtl-wifi-9

999:20070727-211808.log'.

!!! This ebuild is from an overlay: '/usr/local/portage'
```

How to connect to the svn if I don't have working internet connection...

I downloaded files from svn ( https://rtl-wifi.svn.sourceforge.net/svnroot/rtl-wifi/ ) (one by one) and put them in:

```
gentoo rtl-wifi # pwd

/usr/portage/distfiles/svn-src/rtl-wifi

gentoo rtl-wifi # ls

ChangeLog  ieee80211           rtl8187-dev       rtl818x-newstack

Makefile   rtl8180-sa2400-dev  rtl8187-newstack
```

still the same error code

note:

```
gentoo daniel1988 # lsmod

Module                  Size  Used by

iptable_mangle          2304  0 

xt_state                1792  2 

iptable_filter          2304  1 

nvidia               3925004  8 

r8180                  63116  0 

ieee80211_r8180        31876  1 r8180

ieee80211_crypt_r8180     4612  1 ieee80211_r8180

via_rhine              20996  0 
```

```
gentoo daniel1988 # emerge -aC rtl8180

>>> These are the packages that would be unmerged:

--- Couldn't find 'rtl8180' to unmerge.

>>> No packages selected for removal by unmerge

```

rtl8180 package was already removed, but modules r8180, ieee80211_crypt_r8180 & ieee80211_r8180 are still being loaded (the system was rebooted after unmerge). There are no traces of loading this modules in /etc/modules.autoload.d/kernel-2.6/ .

TIA,

Daniel

----------

## daniel1988

SOLVED!

Laptop > dial-up > internet connection sharing --> emerge -av rtl-wifi  :Smile: 

Now it connects to "centurion"... time to solve PPPoE now, but not in this topic..

Thank you everybody!

--Daniel

----------

