# Wi-Fi connection problem, Broadcom BCM4313, wpa_supplicant

## Singularity

Hi. I`m sure that this is some small config that I might miss

I have a laptop with Gentoo.

Wi-Fi module:

```
Network controller: Broadcom Limited BCM4313 802.11bgn Wireless Network Adapter (rev 01)

driver=brcmsmac driverversion=4.9.16-gentoo
```

iw

```
iw wlp7s0b1 info

Interface wlp7s0b1

        ifindex 3

        wdev 0x1

        addr f6:46:f2:d7:da:c9

        type managed

        wiphy 0

        channel 5 (2432 MHz), width: 20 MHz, center1: 2432 MHz
```

/etc/wpa_supplicant/wpa_supplicant.conf

```
# The below line not be changed otherwise wpa_supplicant refuses to work

ctrl_interface=/var/run/wpa_supplicant

# Ensure that only root can read the WPA configuration

ctrl_interface_group=wheel

# Let wpa_supplicant take care of scanning and AP selection

ap_scan=1

update_config=1
```

/etc/conf.d/net

```
config_eno1="dhcp"

dns_domain_lo="corenetwork"

modules_wlp7s0b1="wpa_supplicant"

config_wlp7s0b1="dhcp"
```

Kernel configured according to Gentoo Handbook for NetworkManager and wpa_supplicant.

Linux firmware is also installed.

I can connect to the access point but:

The problems are:

1. Though Wi-Fi connection I cannot ping anything (not 8.8.4.4 neither 192.168.0.1 (default ip of my router))

```
connect: Network is unreachable
```

2. When connection is established I cannot see that ip have been assigned for my laptop though Wpa GUI

Wired internet as well as the same wi-fi on other devices are working perfectly.

Any ideas or suggestions?

----------

## DONAHUE

what is in /etc/resolv.conf ?

what is the output of ifconfig ?

what is the output of dmesg | grep -i brcmsmac ?

----------

## Singularity

 *DONAHUE wrote:*   

> what is in /etc/resolv.conf ?
> 
> what is the output of ifconfig ?
> 
> what is the output of dmesg | grep -i brcmsmac ?

 

/etc/resolv.conf

```
# Generated by dhcpcd from eno1.dhcp

nameserver 192.168.0.1
```

ifconfig

```
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.0.102  netmask 255.255.255.0  broadcast 192.168.0.255

        inet6 fe80::92ce:aa02:dafb:6a5a  prefixlen 64  scopeid 0x20<link>

        ether a0:b3:cc:6d:21:88  txqueuelen 1000  (Ethernet)

        RX packets 4553  bytes 3818193 (3.6 MiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 3998  bytes 477534 (466.3 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 1  (Local Loopback)

        RX packets 58  bytes 2900 (2.8 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 58  bytes 2900 (2.8 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=128<NOARP>  mtu 1480

        sit  txqueuelen 1  (IPv6-in-IPv4)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp7s0b1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

        ether 2a:35:89:f3:19:16  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

dmesg | grep -i brcmsmac

```

[    1.886536] brcmsmac bcma0:1: mfg 4bf core 812 rev 24 class 0 irq 16

[    4.107770] brcmsmac bcma0:1 wlp7s0b1: renamed from wlan0

[    6.016761] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)

[    6.016767] brcmsmac bcma0:1: brcms_ops_config: change power-save mode: false (implement)
```

Thanks

----------

## UberLord

What version of dhcpcd are you using?

What does 

```
dhcpcd -dB wlp7s0b1
```

 do?

----------

## Singularity

 *UberLord wrote:*   

> What version of dhcpcd are you using?
> 
> What does 
> 
> ```
> ...

 

dhcpcd -dB wlp7s0b1

```
dhcpcd-6.11.3 starting

wlp7s0b1: adding address fe80::ae66:730b:dd58:498d

wlp7s0b1: pltime infinity, vltime infinity

wlp7s0b1: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT

wlp7s0b1: executing `/lib/dhcpcd/dhcpcd-run-hooks' CARRIER

DUID 00:01:03:08:20:ad:19:50:00:00:00:00

wlp7s0b1: IAID 03:ac:92:d7

wlp7s0b1: delaying IPv6 router solicitation for 0.9 seconds

wlp7s0b1: delaying IPv4 for 0.6 seconds

wlp7s0b1: soliciting a DHCP lease

wlp7s0b1: sending DISCOVER (xid 0x667ac9fd), next in 3.6 seconds

wlp7s0b1: soliciting an IPv6 router

wlp7s0b1: delaying Router Solicitation for LL address

wlp7s0b1: sending Router Solicitation

wlp7s0b1: offered 192.168.0.105 from 192.168.0.1

wlp7s0b1: sending REQUEST (xid 0x667ac9fd), next in 4.1 seconds

wlp7s0b1: acknowledged 192.168.0.105 from 192.168.0.1

wlp7s0b1: probing address 192.168.0.105/24

wlp7s0b1: probing for 192.168.0.105

wlp7s0b1: ARP probing 192.168.0.105 (1 of 3), next in 1.1 seconds

wlp7s0b1: ARP probing 192.168.0.105 (2 of 3), next in 1.2 seconds

wlp7s0b1: ARP probing 192.168.0.105 (3 of 3), next in 2.0 seconds

wlp7s0b1: sending Router Solicitation

wlp7s0b1: DAD completed for 192.168.0.105

wlp7s0b1: leased 192.168.0.105 for 7200 seconds

wlp7s0b1: renew in 3600 seconds, rebind in 6300 seconds

wlp7s0b1: writing lease `/var/lib/dhcpcd/dhcpcd-wlp7s0b1-Bullet.lease'

wlp7s0b1: adding IP address 192.168.0.105/24 broadcast 192.168.0.255

wlp7s0b1: adding route to 192.168.0.0/24

wlp7s0b1: adding default route via 192.168.0.1

wlp7s0b1: ARP announcing 192.168.0.105 (1 of 2), next in 2.0 seconds

wlp7s0b1: executing `/lib/dhcpcd/dhcpcd-run-hooks' BOUND

wlp7s0b1: ARP announcing 192.168.0.105 (2 of 2)

wlp7s0b1: sending Router Solicitation

wlp7s0b1: sending Router Solicitation

wlp7s0b1: no IPv6 Routers available

wlp7s0b1: carrier lost

wlp7s0b1: executing `/lib/dhcpcd/dhcpcd-run-hooks' NOCARRIER

wlp7s0b1: deleting address fe80::ae66:730b:dd58:498d

wlp7s0b1: deleting route to 192.168.0.0/24

wlp7s0b1: deleting default route via 192.168.0.1

wlp7s0b1: deleting IP address 192.168.0.105/24

wlp7s0b1: executing `/lib/dhcpcd/dhcpcd-run-hooks' EXPIRE

wlp7s0b1: carrier acquired

wlp7s0b1: adding address fe80::ae66:730b:dd58:498d

wlp7s0b1: pltime infinity, vltime infinity

wlp7s0b1: executing `/lib/dhcpcd/dhcpcd-run-hooks' CARRIER

wlp7s0b1: IAID 03:ac:92:d7

wlp7s0b1: delaying IPv6 router solicitation for 0.2 seconds

wlp7s0b1: delaying IPv4 for 0.6 seconds

wlp7s0b1: soliciting an IPv6 router

wlp7s0b1: delaying Router Solicitation for LL address

wlp7s0b1: reading lease `/var/lib/dhcpcd/dhcpcd-wlp7s0b1-Bullet.lease'

wlp7s0b1: rebinding lease of 192.168.0.105

wlp7s0b1: sending REQUEST (xid 0xd1e2ef8a), next in 3.0 seconds

wlp7s0b1: acknowledged 192.168.0.105 from 192.168.0.1

wlp7s0b1: probing address 192.168.0.105/24

wlp7s0b1: probing for 192.168.0.105

wlp7s0b1: ARP probing 192.168.0.105 (1 of 3), next in 1.4 seconds

wlp7s0b1: sending Router Solicitation

wlp7s0b1: ARP probing 192.168.0.105 (2 of 3), next in 1.7 seconds

wlp7s0b1: ARP probing 192.168.0.105 (3 of 3), next in 2.0 seconds

wlp7s0b1: sending Router Solicitation

wlp7s0b1: DAD completed for 192.168.0.105

wlp7s0b1: leased 192.168.0.105 for 7200 seconds

wlp7s0b1: renew in 3600 seconds, rebind in 6300 seconds

wlp7s0b1: writing lease `/var/lib/dhcpcd/dhcpcd-wlp7s0b1-Bullet.lease'

wlp7s0b1: adding IP address 192.168.0.105/24 broadcast 192.168.0.255

wlp7s0b1: adding route to 192.168.0.0/24

wlp7s0b1: adding default route via 192.168.0.1

wlp7s0b1: ARP announcing 192.168.0.105 (1 of 2), next in 2.0 seconds

wlp7s0b1: executing `/lib/dhcpcd/dhcpcd-run-hooks' BOUND

wlp7s0b1: ARP announcing 192.168.0.105 (2 of 2)

wlp7s0b1: sending Router Solicitation

wlp7s0b1: sending Router Solicitation

wlp7s0b1: no IPv6 Routers available

```

And then nothing.

----------

## khayyam

 *Singularity wrote:*   

> 
> 
> ```
> wlp7s0b1: carrier lost
> 
> ...

 

Singularity ... that all suggest the connection to the AP is dropped, and so a driver, radio, wpa_supplicant, or NetworkManager, issue. Are you within close proximity to the AP, are there other wireless devices on the same channel (or much in the way of environmental noise)?

You might want to set '-f /var/log/wpa_supplicant.log -vv' as a param to wpa_supplicant, and check what gets logged. Also, you might remove NetworkManager as a potential source of the issue.

BTW, your /etc/conf.d/net is not used if NetworkManager is in use.

best ... khay

----------

## Singularity

 *Quote:*   

> Singularity ... that all suggest the connection to the AP is dropped, and so a driver, radio, wpa_supplicant, or NetworkManager, issue. Are you within close proximity to the AP, are there other wireless devices on the same channel (or much in the way of environmental noise)?
> 
> You might want to set '-f /var/log/wpa_supplicant.log -vv' as a param to wpa_supplicant, and check what gets logged. Also, you might remove NetworkManager as a potential source of the issue.
> 
> BTW, your /etc/conf.d/net is not used if NetworkManager is in use.
> ...

 

So,

After restarting wpa_supplicant service and run 

```
dhcpcd -dB wlp7s0b1
```

 again - Wi-Fi finally appeared. But it quite slow (aprox 120kb/s). Test on android phone shows 30Mb/s.

Laptop in 50 centimeters from router.

And 

```
dhcpcd -dB wlp7s0b1
```

 output remains the same an in previous post.

----------

