Bluetooth on the Wandboard (bcm4329)

As you might now, I’ve recently bought a Wandboard Quad which is a small RasperryPi-like ARM development board. The difference to my beloved raspberry is, that it has much, much more features and beef (quad core armv7, wifi, sata, bluetooth…).

While another post has already covered getting the Wifi AP mode to run on the wandboard, this post will be around bluetooth (which also involves that particular Broadcom Chip).

The bluetooth-chip on the wandboard (the bcm4329) is connected to the OS via UART and requires the user to load a firmware into the devices ram before it can be used.
On the wandboard, this can be done using the ‘brcm_patchram_plus’-utility included in the firmware package.

After you compiled the utility, you can load the firmware at runtime via

brcm_patchram_plus --scopcm=1,4,0,0,0,0,0,0,0,0 --patchram /bcm4329.hcd --baudrate 3000000 --use_baudrate_for_download /dev/ttymxc2

I got this particular line from here and talked with Tapani on irc about it, it’s fine.

After you loaded the firmware, you’ll have to attach a hci device to the UART, this can be accomplished via

hciattach -n /dev/ttymxc2 any 3000000

I tried to get PAN to work using the method I just described but was not able to get a working connection. After fooling around with it for days, I figured out that you have to change the MAC address of the device at runtime by adding

--bd_addr $MAC_ADDR

(where $MAC_ADDR is a valid MAC address) to the brcm_patchram_plus line. I use a 00:23:76:XX:XX:XX address and everything seems to work fine.
Also, I used bluez4 instead of the normal version 5. Using version 5 I was not able get a PAN connection working.

As usual, ArchLinux ARM users can instead get a PKGBUILD here. After installing, you should add your desired MAC address in /etc/conf.d/bcm4329 to avoid the behaviour I explained above.
If you enable the bluetooth.service, the bcm4329.service should get started automatically.

Hello,

I appreciate your article. I am having trouble getting the module running though. I am able to run through the tutorial, but when I use “hcitool dev” to list the devices connected, there are no devices listed. Does that mean something went wrong?

Is the AP tutorial a requirement to get the bluetooth portion working as well?

Any insight to this would be awesome.

Thanks again,

DOT850

Did you enable the bluetooth service? Is the service running?
Join #wandboard for quick help.

Nope, the AP does not interfere with this in any way.

Thanks for this article and the wifi ap one, they are really helpfull!
Just a quick note,
I had some trouble, including kernel deadlocks in the imx uart driver when running patchram, because of missing sdma firmware

8.

4 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

* Checkbox GDPR is required

*

I agree

Hardware
Aus dem Archiv: keyComfort – Der besondere Fahrradsattel

An dieser Stelle möchte in unserem Sommer-Format “Aus dem Archiv” ein besonders kreatives und ausgefallenes Projekt vorstellen: keyComfort. Um garnicht erst viel Worte zu verlieren, lasse ich einfach das großartige Video unserer Indiegogo Crowdfunding-Kampagne (Web-Archiv 1,2) sprechen: Trotz seiner ansprechenden Ästhetik und professionellen Machart ging die Kampagne weder dort noch …

Hardware
Aus dem Archiv: CNC-Fräse Lightning Talk GPN10

Eigentlich hatten wir, Benibr, ST und ich damals 2010 schon verschiedene Texte zur GPN10, der Gulaschprogrammiernacht des Entropias in Karlsruhe, veröffentlicht. Auch der Talk von ST und Robert hatte erwähnung gefunden. Die Aufzeichnung zu dem Vortrag über die erste, selbstgebaute CNC-Fräse wurde aber leider noch nicht verlinkt oder hier hochgeladen. …

Hardware
Fix a bend bicycle fork

Bend forks are hard to fix — I thought. But to get it somewhat straight is sometimes not that big of a deal! This is the bend fork. It is also the reason that made the bike go to trash before I saved it: To bend the fork back to …