BCM2033 based USB Bluetooth dongle and OpenWRT

By Pauli Borodulin
Created 2006-08-30, last updated 2006-08-31

This document provides information on using BCM2033 based USB Bluetooth dongle with OpenWRT White Russian (RC5). This document only describes how to get the dongle working under OpenWRT – rest is up to other guides.

The story

I recently (summer 2006) acquired Asus WL-500g Premium to play with OpenWRT. Since the device has two USB ports, I thought adding a USB Bluetooth dongle would be a nice addition, since then I would be able to have my own private personal area network (PAN). It would then be possible for me to use my network connection over Bluetooth with my PDA (running Familiar/Opie) and cellular phone.

I had acquired Belkin F8T001 USB Bluetooth dongle couple years ago, so I gave it a try. The dongle is based on the Broadcom BCM2033 chip. The chip requires its driver to upload a firmware to the dongle before it can be used. Under Linux 2.6 this is not a problem – the driver is able to upload the firmware automatically using hotplug (afaik). Unfortunately, the driver provided with Linux 2.4 (and used by OpenWRT) does not have this capability. It was obvious that I had to seek for some other solution.

After reading through the BlueZ documentation, I discovered that the BlueZ source contains a utility (bcm203x) for uploading the firmware. Unfortunately, the person who made the BlueZ packages bluez-libs and bluez-utils (version 2.24-1) for OpenWRT didn't include this utility. I had to download the OpenWRT SDK and compile the utility by myself. After I got the utility compiled, I copied it to my OpenWRT, under /usr/sbin. Now I was ready for a firmware hunt!

It is quite usual that the firmware required for some device has to be manually extracted from the official drivers. Manufacturers simply don't see a need to distribute the firmware separately, because you still would need to download the driver too. Fortunately, I did not have to go through extraction, because the firmware is available in the BlueZ firmware package. You can get the package from BlueZ homepage – the package is named bluez-firmware.

I finally had the firmware and the utility to upload the firmware to the dongle. But why upload the firmware manually? OpenWRT comes with hotplug, so I wrote a simple script to upload the firmware to the dongle whenever the dongle is inserted. I placed the script under /etc/hotplug.d/usb and inserted the dongle. It worked. Whee.

Conclusion

BCM2033 based USB Bluetooth dongles require a firmware to be uploaded before use. Under Linux 2.4, the firmware can only be uploaded using bcm203x utility provided with BlueZ. Unfortunately, this utility is not included in the BlueZ packages in official OpenWRT packages (White Russion RC5, packages' version 2.24-1). Setting up the OpenWRT SDK and compiling the bcm203x utility is a difficult task. I decided to put the compiled version of the bcm203x utility on the web so that others would not have to go through the same trouble. Just download the files and follow the instructions.

bcm203x
This is the bcm203x utility for uploading the firmware. Place this under /usr/sbin. It must be executable, so remember also to run chmod a+x /usr/sbin/bcm203x.
02-bcm203x
Hotplug script for automatic firmware uploading. Put this under /etc/hotplug.d/usb.

You will also need the firmware. Download the firmware package from BlueZ homepage and copy files

under /lib/firmware (you may need to create it). Now you are ready for connecting the dongle. If you want to confirm that the firmware is uploaded correctly, install lsusb and run it after connecting the dongle. You should see the following device on the list:

Bus 001 Device 018: ID 0a5c:2001 Broadcom Corp.

If you instead see

Bus 001 Device 019: ID 0a5c:2033 Broadcom Corp. BCM2033 Bluetooth

uploading the firmware didn't work. This is because the dongle will report different device ID after uploading the firmware (this way it wont be uploaded again and again).

After the firmware upload works correctly, install (using ipkg) packages kmod-bluetooth, bluez-libs and bluez-utils. Now test your setup with the following commands:

root@OpenWrt:/usr/sbin# insmod bluez Using /lib/modules/2.4.30/bluez.o root@OpenWrt:/usr/sbin# insmod hci_usb Using /lib/modules/2.4.30/hci_usb.o root@OpenWrt:/usr/sbin# hcid root@OpenWrt:/usr/sbin# hcitool dev Devices: hci0 00:03:C9:2F:3D:1B

If the last command did not report the hardware address of your dongle, something went wrong. Check your set up and try again. If it did report the address – great! Add the bluez and hci_usb modules to your /etc/modules (so that they are loaded on boot) and head to the BlueZ documentation for using BlueZ tools to set up NAP or whatever you want to do with your dongle.

Links