Enabling wifi and bluetooth

From Wandboard Wiki
Revision as of 13:31, 30 December 2014 by Tapani (Talk | contribs) (Created page with " How to enable the bcm4329 WIFI and Bluetooth in Linux. == Board file == In board file (or similar) you have to enable power to the WM-BN-BM-02 chip. This is done by enabli...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How to enable the bcm4329 WIFI and Bluetooth in Linux.


Board file

In board file (or similar) you have to enable power to the WM-BN-BM-02 chip. This is done by enabling the power regulator (pull GPIO 1:26 high), enable power (pull GPIO 2:29 high) and reset the chip (pull GPIO 5:2 low for >10ms)


Kernel config

There are at least three drivers for the bcm4329 floating around, the firmwares distributed by the Wandboard project are for the newer FullMac driver (the only one NOT marked as Broadcom 4329 driver in Kconfig). Enable "Broadcom IEEE802.11n embedded FullMAC WLAN driver" and "SDIO bus interface support for FullMAC driver" as modules.

The module will be called

  • brcmutil
  • brcmfmac

And will usually reside in

/lib/modules/3.0.35+/kernel/drivers/net/wireless/brcm80211/

or just

/lib/modules/

Firmware

The bcm4329 requires firmware to be loaded before the wlan interfaces are visible. For the kernels done by Wandboard Team, the firmwares should reside in /lib/firmware/brcm/

Three firmware files are needed:

  • brcmfmac-sdio.txt -- a text file with parameters, some bcm4329 variants calls this NVRAM.txt
  • brcmfmac-sdio.bin -- binary, closed source firmware for the chip.
  • bcm4329.hcd -- Bluetooth firmware

The wlan0 interface should appear after the brcmfmac module is inserted. If module is inserted, and no interface appears, it is usually a sign of failed firmware loading.

Bluetooth

In board file (or similar), one needs to enable power to the BT part of the chip. Do this by pulling GPIO 3,13 high.

The bcm4329 bluetooth requires an additional utility, brcm_patchram_plus, to load firmware.

A simple process to bring up BT and do a scan

# brcm_patchram_plus --timeout=6.00 --patchram /lib/firmware/brcm/bcm4329.hcd --baudrate 921600 --use_baudrate_for_download /dev/ttymxc2
# hciattach /dev/ttymxc2 any 921600
# hciconfig hci0 up
# hcitool -i hci0 scan