Firmware For Cheap Bluetooth Modules

Ibluetoothf you’ve ever built anything with a microcontroller, some sort of sensor, and a connection to the outside world, you’re probably wondering how those places in China can pump out cheap electronics for a mere percentage of what it costs you to pull a DIY. It’s not just volume – it’s engineering; if something has Bluetooth, you find a Bluetooth module with a built-in microcontroller so you can write firmware to it.

The BC417 is the System on Chip found in the very popular BlueCore4-Ext Bluetooth module featuring 8Mbits of Flash (75% of which is used for Bluetooth related stuff), somewhere around 12 kB of RAM, with everything run in a virtual machine. [pfalcon] wrote an extremely experimental firmware for this device that allows anyone to create a wireless sensor node for peanuts. These devices are almost as cheap as a bare ATMega, so the possibilities are interesting, to say the least.

At this point, the hardest part of putting custom firmware on these devices is programming them. For that, [Elastic Sheep] comes to the rescue with a parallel port to SPI interface. There’s also a firmware dumper and some breakout boards available. These modules are pretty cheap, and the pitch isn’t too bad, so you might be able to etch your own boards should you want to experiment a little.

Thanks [Peter] for sending this in.

43 thoughts on “Firmware For Cheap Bluetooth Modules

  1. maybe should be “It’s not just volume – it’s engineering – reverse it’s engineering – it’s stolen designs”

    often we may see the numbers scraped off an ic so a company cant go ” hey that is our stolen design”

        1. It’s due to wireless regulation compliance. Locking the module down means that they can get the module FCC/CE/whatever certified, and that certification isn’t invalidated just by sticking it on your own board – since you can’t make the module do things that violate the regs. Otherwise, just by putting the module on your board forces you to pay $$$ to get a full recertification.

    1. I keep several around with both serial and parallel, there are countless uses for these ports. Plus the fact the usb to either if you are using them for timing sensitive situations can cause real problems and the need for a real time clock saves so many headaches.

      1. Me, and what’s more, it is a motherboard for a chip (socketed Kabini) that was only released a couple of months ago. I don’t actually give a damn about the pport, but the board had other desirable features, like an extra two SATA 3 ports and USB3 ports.

    2. He uses a Teensy to supply power to the bluetooth module and as a USB to serial interface but neglects to use the Teensy’s dedicated SPI interface (3.3 V so you don’t need to use voltage dividers)? Instead he uses a parallel port on a computer to emulate SPI. Makes me confused as to whether to scratch my head in confusion or apply face to palm.

      1. I’ve seen some datasheets for the bc417 and also know that it is possible, but wondered why they would not offer a better system for tinkerers to set them to HID mode. I guess it is not so common to use a bluetooth HID stack rather then a serial one and this is were they earn their money. There are solutions out there, but not that cheap or easy to order within Germany, except the RN-42-HID maybe. But 20euros versus 5euros still makes a difference.

  2. FT232HQ and FT2232D support SPI at a level of difficulty of a USB-to-serial converter.

    It is easy to work with and runs both with FTDIs ftdi_libmpsse and the libusb-based open libmpsse. I cleaned up the API a bit and wrote a COM to SPI tool (add a com0com loop and you can control SPI via hterm).

    I can’t see how anyone would still bother using parallel ports. Instead, I encourage everyone to give these chips (or equivalents from other manufacturers) a look.

    ps. some JTAG programmers are also equiped with these chips :)

    1. Because built-in parallel ports just works.
      Minimal fuzz and low level access.
      When USB gets thrown into the mix, things often goes haywire due to the sheer complexity of any USB-to-X converter.
      Same reason some people still uses PS/2 keyboards.

    2. The programming interface for the module is a proprietary protocol over SPI. You might be able to make a SPI interface easily enough, but the closed-source utilities that know how to program the module don’t recognise that hardware. The parallel port is the simplest hardware a user can build that is supported by the CSR tools. Another option is the firmware I linked elsewhere in the comments that requires a specific Launchpad board.

  3. Now if only someone can show me a BIP stack on one of these…lots of bluetooth chips with high bandwidth audio, but not a one with a simple command for image push.

        1. Aren’t they mbed compatible? There’s definitely an mbed dev board for this. Otherwise IIRC the standard dev board is like £80 and comes with a key for the software and access to docs!

  4. These are really old modules, you can get the full tool chain for them when you buy the dev kit digikey part number BCES01-EP-ND. Once you buy that you can get on csr support can get new firmware and more example apps etc..

    My advice is move to Bluetooth SMART- the uEnergy starter kit is $100 for the full tools and firmware (DK-CSR1010-10169-1A-ND digikey), with many example apps including HID keyboard and mouse apps. The modules are £10 from BCDmicro in the UK and probably many other places. This dev board also has an official USB to SPI adapter that you can use in blueflash and can be jumpered off the board for programming Bluecore devices as well as uEnergy devices.

Leave a Reply to WireCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.