# BCM 4318 wireless networking problem



## Gerard (Mar 15, 2016)

FreeBSD 11.0-CURRENT

I am desperately trying to get wireless networking up and running. Everything appears correct; however, the network is never brought UP. I have tried "service netip restart" and rebooting the system, but nothing works.

ifconfig wlan0 list scan
ifconfig: interface wlan0 does not exist

ifconfig -a
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
  options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
  ether 00:1a:a0:89:ca:e4
  inet6 fe80::21a:a0ff:fe89:cae4%em0 prefixlen 64 scopeid 0x1
  inet6 2606:a000:b7c2:1700:21a:a0ff:fe89:cae4 prefixlen 64 autoconf
  inet 192.168.0.9 netmask 0xffffff00 broadcast 192.168.0.255
  nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
  media: Ethernet autoselect (100baseTX <full-duplex>)
  status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
  options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
  inet6 ::1 prefixlen 128
  inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
  inet 127.0.0.1 netmask 0xff000000
  nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
  groups: lo

This is the data I have configured.

/boot/loader.conf
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
zfs_load="YES"
if_bwn_load="YES"  # Broadcom BCM43xx IEEE 802.11 wireless NICs

/etc/rc.conf
## Wireless
siba_bwn0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"

/etc/wpa_supplicant.conf
network={
  ssid="MyNet-2g"
  psk="SECRET_1"
  key_mgmt=WPA-PSK
}

pciconf -lv | grep -B3 -i wireless
  class  = simple comms
siba_bwn0@pci0:2:1:0:  class=0x028000 card=0x100f1043 chip=0x431814e4 rev=0x02 hdr=0x00
  vendor  = 'Broadcom Corporation'
  device  = 'BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller'

kldstat
Id Refs Address  Size  Name
 1  25 0xffffffff80200000 1ecb0c8  kernel
 2  1 0xffffffff820cd000 38a0e0  zfs.ko
 3  2 0xffffffff82458000 caa0  opensolaris.ko
 4  1 0xffffffff82465000 5d178  if_bwn.ko
 5  2 0xffffffff824c3000 e388  siba_bwn.ko
 6  1 0xffffffff82621000 5915  fdescfs.ko
 7  1 0xffffffff82627000 370e  ums.ko
 8  1 0xffffffff8262b000 29e7  uhid.ko

From boot up messages:
siba_bwn0: <Broadcom BCM4318 802.11b/g Wireless> mem 0xfdefe000-0xfdefffff irq 16 at device 1.0 on pci2
bwn0 on siba_bwn0
bwn0: WLAN (chipid 0x4318 rev 9) PHY (analog 3 type 2 rev 7) RADIO (manuf 0x17f ver 0x2050 rev 8)
bwn0: DMA (32 bits)

I have given up. I don't know what I am doing wrong. I have three Windows 10 PRO/64 machines on this wireless network, and they work fine, and I didn't have to pull my hair out trying to get them configured.


----------



## drhowarddrfine (Mar 15, 2016)

Without looking it up, so I could be wrong in your instance, this is a Broadcom issue. Broadcom does not supply drivers for their products so someone needs to reverse engineer their drivers to make things work. Some Broadcom wifi adapters will work with FreeBSD but some don't.

You need to complain to Broadcom but they are #&%@*$%^ and will either ignore you or tell you to #$%&^* cause they are #$%$#@@# people.


----------



## tobik@ (Mar 15, 2016)

The entries in /etc/rc.conf look wrong. Please double check them.
The `ifconfig -a` is meaningless because you're on FreeBSD 11.0-CURRENT where WLAN interfaces only show up once you've created them which you haven't done correctly. To do this at boot make sure you have in /etc/rc.conf:

```
wlans_bwn0="wlan0"
```
 bwn(4) also requires that you've installed net/bwn-firmware-kmod.

https://www.freebsd.org/doc/handbook/network-wireless.html


----------



## woodsb02 (Mar 17, 2016)

tobik said:


> bwn(4) also requires that you've installed net/bwn-firmware-kmod.



Just to ensure we are clear, installing the firmware and loading the kernel module are 2 separate steps.


Install the package bwn-firmware-kmod, or install it from ports net/bwn-firmware-kmod
Load the firmware module into the kernel with the command `# kldload bwn_v4_ucode`

To ensure this is loaded during next book, add the following line to /boot/loader.conf:

```
bwn_v4_ucode_load="YES"
```

You should be able to see that the kernel module has loaded using the kldstat(8) command.

Once you have done this, and have the correct rc.conf(5) and
wpa_supplicant.conf(5) configuration as described in previous posts above, it should
work.

Note that if it doesn't work, you could try instead loading the low power kernel module instead of the one above:
`# kldunload bwn_v4_ucode
# kldload bwn_v4_lp_ucode`

To use the LP module after the next reboot, change the line in
/boot/loader.conf to:

```
bwn_v4_lp_ucode_load="YES"
```

Good luck,
Ben


----------

