# wireless range in linux shorter than in windows

## Stefano Crocco

I'm having problems with connecting my new laptop with a wireless network. I setup everything as described in the Gentoo Handbook and, as long as the laptop is near (about 6 metres) from the access point, everything works correctly. However, if I move the laptop farther than that, it looses contact with the AP and can't find it anymore. At first, I thought that after 6 metres, the signal becomes too weak, but I found out that booting in Windows from the same laptop, I could access the network without problems farther than 6 metres from the AP. So it seems that either I configured incorrectly something (this is the first time I deal with wireless) or there is some limitation with the linux driver for my hardware, in which case I can only wait and hope it gets fixed.

I tried searching google and this forum, but found nothing useful. I also tried tweaking the configuration files in any way I could think of without success. Now I'm asking anyone with more experience in wireless networking than myself for some advice on this issue.

This is my system:

Hardware

 wireless adapter: broadcom BCM4313 802.11b/g/n

 access point: Netgear 2200

Software

 kernel: gentoo-sources-3.3.0, with the brcmsmac driver built as a module

 wpa_supplicant: 0.7.3-r5

 /etc/conf.d/net (the laptop also has an ethernet port, eth0):

```

modules="dhcpcd wpa_supplicant"

dns_servers_eth0="62.211.69.170 212.48.4.30 192.168.0.1"

dhcp_eth0="nodns"

wpa_supplicant_wlan0="-Dnl80211"

```

 /etc/wpa_supplicant/wpa_supplicant.conf:

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=10

ap_scan=1

country=IT

network={

  ssid="MYSSID"

  key_mgmt=NONE

}

```

This is the output from wpa_supplicant when started (with the -d flag) outside the 6-metres radius

from the AP

```

Initializing interface 'wlan0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'

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

Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'

ctrl_interface='/var/run/wpa_supplicant'

ctrl_interface_group='10'

ap_scan=1

country='IT'

filter_ssids=1

Priority group 0

   id=0 ssid='NETGEAR09'

netlink: Operstate: linkmode=1, operstate=5

Own MAC address: e4:d5:3d:02:b6:9e

wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x46c059 key_idx=0 set_tx=0 seq_len=0 key_len=0

wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x46c059 key_idx=1 set_tx=0 seq_len=0 key_len=0

wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x46c059 key_idx=2 set_tx=0 seq_len=0 key_len=0

wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x46c059 key_idx=3 set_tx=0 seq_len=0 key_len=0

RSN: flushing PMKID list in the driver

Setting scan request: 0 sec 100000 usec

WPS: UUID based on MAC address - hexdump(len=16): f8 ed 5d 95 de 5a 5b a1 a7 6d 0d 42 26 1b cf c7

EAPOL: SUPP_PAE entering state DISCONNECTED

EAPOL: Supplicant port status: Unauthorized

EAPOL: KEY_RX entering state NO_KEY_RECEIVE

EAPOL: SUPP_BE entering state INITIALIZE

EAP: EAP entering state DISABLED

EAPOL: Supplicant port status: Unauthorized

EAPOL: Supplicant port status: Unauthorized

ctrl_interface_group=10

Added interface wlan0

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

State: DISCONNECTED -> SCANNING

Starting AP scan for wildcard SSID

Scan requested (ret=0) - scan timeout 10 seconds

nl80211: Event message available

nl80211: Scan trigger

CTRL_IFACE monitor attached - hexdump(len=22): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 36 31 30 2d 33 32 00

RX ctrl_iface - hexdump_ascii(len=10):

     49 4e 54 45 52 46 41 43 45 53                     INTERFACES      

RX ctrl_iface - hexdump_ascii(len=18):

     47 45 54 5f 43 41 50 41 42 49 4c 49 54 59 20 65   GET_CAPABILITY e

     61 70                                             ap              

CTRL_IFACE: GET_CAPABILITY 'eap' 

RX ctrl_iface - hexdump_ascii(len=6):

     53 54 41 54 55 53                                 STATUS          

RX ctrl_iface - hexdump_ascii(len=13):

     4c 49 53 54 5f 4e 45 54 57 4f 52 4b 53            LIST_NETWORKS   

RX ctrl_iface - hexdump_ascii(len=22):

     47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 64 69   GET_NETWORK 0 di

     73 61 62 6c 65 64                                 sabled          

CTRL_IFACE: GET_NETWORK id=0 name='disabled'

EAPOL: disable timer tick

EAPOL: Supplicant port status: Unauthorized

nl80211: Event message available

nl80211: New scan results available

Received scan results (0 BSSes)

BSS: Start scan result update 1

New scan results available

CTRL_IFACE monitor send - hexdump(len=22): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 36 31 30 2d 33 32 00

Selecting BSS from priority group 0

Try to find WPA-enabled AP

Try to find non-WPA AP

No suitable network found

Setting scan request: 5 sec 0 usec

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

RX ctrl_iface - hexdump_ascii(len=6):

     53 54 41 54 55 53                                 STATUS          

RX ctrl_iface - hexdump_ascii(len=22):

     47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 64 69   GET_NETWORK 0 di

     73 61 62 6c 65 64                                 sabled          

CTRL_IFACE: GET_NETWORK id=0 name='disabled'

RX ctrl_iface - hexdump_ascii(len=13):

     4c 49 53 54 5f 4e 45 54 57 4f 52 4b 53            LIST_NETWORKS   

RX ctrl_iface - hexdump_ascii(len=22):

     47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 64 69   GET_NETWORK 0 di

     73 61 62 6c 65 64                                 sabled          

CTRL_IFACE: GET_NETWORK id=0 name='disabled'

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

Starting AP scan for wildcard SSID

Scan requested (ret=0) - scan timeout 30 seconds

nl80211: Event message available

nl80211: Scan trigger

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

nl80211: Event message available

nl80211: New scan results available

Received scan results (0 BSSes)

BSS: Start scan result update 2

New scan results available

CTRL_IFACE monitor send - hexdump(len=22): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 36 31 30 2d 33 32 00

Selecting BSS from priority group 0

Try to find WPA-enabled AP

Try to find non-WPA AP

No suitable network found

Setting scan request: 5 sec 0 usec

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

RX ctrl_iface - hexdump_ascii(len=6):

     53 54 41 54 55 53                                 STATUS          

RX ctrl_iface - hexdump_ascii(len=22):

     47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 64 69   GET_NETWORK 0 di

     73 61 62 6c 65 64                                 sabled          

CTRL_IFACE: GET_NETWORK id=0 name='disabled'

RX ctrl_iface - hexdump_ascii(len=13):

     4c 49 53 54 5f 4e 45 54 57 4f 52 4b 53            LIST_NETWORKS   

RX ctrl_iface - hexdump_ascii(len=22):

     47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 64 69   GET_NETWORK 0 di

     73 61 62 6c 65 64                                 sabled          

CTRL_IFACE: GET_NETWORK id=0 name='disabled'

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

Starting AP scan for wildcard SSID

Scan requested (ret=0) - scan timeout 30 seconds

nl80211: Event message available

nl80211: Scan trigger

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

nl80211: Event message available

nl80211: New scan results available

Received scan results (0 BSSes)

BSS: Start scan result update 3

New scan results available

CTRL_IFACE monitor send - hexdump(len=22): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 36 31 30 2d 33 32 00

Selecting BSS from priority group 0

Try to find WPA-enabled AP

Try to find non-WPA AP

No suitable network found

Setting scan request: 5 sec 0 usec

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

RX ctrl_iface - hexdump_ascii(len=6):

     53 54 41 54 55 53                                 STATUS          

RX ctrl_iface - hexdump_ascii(len=22):

     47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 64 69   GET_NETWORK 0 di

     73 61 62 6c 65 64                                 sabled          

CTRL_IFACE: GET_NETWORK id=0 name='disabled'

RX ctrl_iface - hexdump_ascii(len=13):

     4c 49 53 54 5f 4e 45 54 57 4f 52 4b 53            LIST_NETWORKS   

RX ctrl_iface - hexdump_ascii(len=22):

     47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 64 69   GET_NETWORK 0 di

     73 61 62 6c 65 64                                 sabled          

CTRL_IFACE: GET_NETWORK id=0 name='disabled'

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

RX ctrl_iface - hexdump_ascii(len=4):

     50 49 4e 47                                       PING            

^CCTRL-EVENT-TERMINATING - signal 2 received

CTRL_IFACE monitor send - hexdump(len=22): 2f 74 6d 70 2f 77 70 61 5f 63 74 72 6c 5f 32 36 31 30 2d 33 32 00

Removing interface wlan0

No keys have been configured - skip key clearing

State: SCANNING -> DISCONNECTED

wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)

netlink: Operstate: linkmode=-1, operstate=5

EAPOL: External notification - portEnabled=0

EAPOL: Supplicant port status: Unauthorized

EAPOL: External notification - portValid=0

EAPOL: Supplicant port status: Unauthorized

No keys have been configured - skip key clearing

CTRL_IFACE wait for attached monitors to receive messages

Cancelling scan request

Cancelling authentication timeout

netlink: Operstate: linkmode=0, operstate=6

```

----------

## ppurka

Did you try the proprietary driver? It is called net-wireless/broadcom-sta. You will need to ensure that you remove brcmsmac from your kernel if you use the proprietary driver.

----------

## Ant P.

Do you have crda installed?

----------

## cach0rr0

broadcom support under linux sucks. badly. 

maybe this is in the process of changing, but broadcom cards have always sucked under linux. 

hearing you are seeing better results in windows is not the lease bit surprising. If you were using an atheros or iwlwifi card? I might be surprised, but broadcom no. 

YMMV, maybe other posters have had better results with these cards, but historically it's been more negative than positive (to the extent ive specifically avoided buying any hardware with a broadcom card in it, since i know im going to be spending my life in linux)

----------

## Stefano Crocco

ppurka: thanks, your suggestion worked. I already knew of the proprietary driver and had already tried and discarded it because it failed to authenticate with the AP (and also because I prefer using open source drivers when possible). However, it seems that when I tried it I did something incorrectly, because now it works and it also seems to have the same range as with windows.

Ant P.: No, I don't have crda installed. After reading your question  I installed it, but I don't know what to do with it now. I looked at its man page and it says it should be automatically used by udev. However, with it installed, nothing changed. What is it suppposed to do? Is there something I should configure to get it working?

cach0rr0: unfortunately, when I bought the laptop I didn't even think that there could be problems with the wireless adapter (actually, I didn't even know how wireless worked).

Thanks everyone for their answer.

----------

## Ant P.

crda is the thing that tells the kernel what power levels/frequencies it's allowed to use. Without it they usually default to some "safe" subset which might've been part of the problem.

----------

## Stefano Crocco

Thanks for the information. I don't have time right now to experiment with this, but I'll do so in the future.

----------

