Yet another Bluetooth Firmware: BC04

I was thinking that these common and cheap bluetooth modules have either HC-05 or HC-06 firmware (see this post). Well, I was wrong: there are more! Obviously there many more firmware images available on that British CSR BlueCore4-Ext chip. Mihai Surdeanu contacted me with an updated firmware for a module which has the “BC04” firmware on it. He was so gentle and has sent me an updated Processor Expert component which works with that BC04 firmware :-).

BC04 Firmware

I have found that BC04 on ebay here. Even Farnell has it its store for incredible $60 (!!) while you can get it on eBay for about $10. The ebay link lists as well the available commands (not sure how official this is?). It looks like the BC04 is somewhat between the HC-06 and HC-05: less commands than the HC-05, but master/slave capable as the HC-05. And the BC04 is priced about the same as the HC-05, as both are master and slave capable, while the less expensive HC-06 is ‘slave only’.

Mihai identified several functions which are not available on the BC04, but are are availble on the HC-05. He disabled them in the .chg file of the component:

%if %Firmware='HC06'
  %- HC06 firmware is very limited
  %set btResetDevice Selection never
  ...
%elif %Firmware='BC04'
  %set btQueryLEDOutputPolarityStr Selection never
  %set btSetLEDOutputPolarityStr Selection never
  %set btSetUserPinIO Selection never
  %set btSetUserPinIO Selection never
  %set btSetMultipleUserIOPins Selection never
  %set btQueryMultipleUserIOPinsStr Selection never
  %set btQueryMultipleUserIOPins Selection never
  %set btFindDeviceFromAuthenticatedDeviceListStr Selection never
%else %- HC-05 firmware
...
%endif

He added a new entry to the firmware selection. So now you can choose from HC-05, HC-06 or BC04:

BC04 Bluetooth Firmware Selection

BC04 Bluetooth Firmware Selection

The firmware responds as “BOLUTEK”:

BC04 Terminal Connection

BC04 Terminal Connection (Source: Mihai Surdeanu)

Because the maximum response string is so long, the define in the driver had to be adopted to reflect the increased length:

%if %Firmware='BC04'
/* Note: BC04 firmware responds on AT+VERSION with "BOLUTEK Firmware V2.43, Bluetooth V2.0, HCI V2.1, HCI Rev37, LMPV4,LMP SubV327" */
#define %'ModuleName'%.MAX_RESPONSE_SIZE                       96  /* maximum response size, e.g. "+NAME:abcdef\r\nOK\r\n" */
%else
#define %'ModuleName'%.MAX_RESPONSE_SIZE                       42  /* maximum response size, e.g. "+NAME:abcdef\r\nOK\r\n" */
%endif

❗ That MAX_RESPONSE_SIZE is used in the driver as local variable on the stack. That was ok with up to 42 characters, but now with 96 this uses a lot of stack space. Until this gets improved, I suggest that you allocate enough stack space to work with this increased stack usage.

Beside of this, several commands are different, like instead of “AT+ADDR” it uses “AT+LADDR”, or instead of “AT+NAME?” it uses “AT+NAME”. You get all the differences if you search for “BC04” in the Processor Expert driver file on GitHub.

Summary

Yet another and different firmware. So if you buy such a bluetooth module, be aware that they are not all the same: different firmware means different commands and different capabilites. But with the Processor Expert Bluetooth component it is easy to switch between different modules. “Multumesc mult” to Mihai for his contribution!

The updated component is available on GitHub.

Happy Bluetoothing 🙂

12 thoughts on “Yet another Bluetooth Firmware: BC04

  1. Pingback: Tutorial: Ultra Low Cost 2.4 GHz Wireless Transceiver with the FRDM Board | MCU on Eclipse

  2. Hi Erich,

    These modules are causing me a lot of headaches :-). The ones I currently have seem to only respond to the shell status at 9600 baud (not 38400 baud). Here’s the response I get from status.

    BT1 :
    Test UART : OK
    Firmware : 2.0-20100601
    Name : HC-05
    Address : 2013:5:313625
    IAC : 9e8b33
    IAM : 1,1,48
    Pairing Key: 1234
    UART Param : 9600,0,0
    BindingAddr: 0:0:0
    LEDPolarity: 1,1
    Scan Param : 1024,512,1024,512
    SNIFF Param: 0,0,0,0
    Encryption : 0,0
    Recent Auth: 1c4b:d6:187f84
    State : PAIRABLE
    Nof Auth. : 6
    I/O Pins : 900
    Role : 0 (slave)
    Connection : 0 (specific address only).

    Can you tell from this response whether I have HC-04, HC-05, or HC-06 modules? I don’t get a response from the module when I try to change the baud rate from the shell using:

    BT1 cmd AT+UART=38400,0,0

    Cheers,
    Vic

    Like

      • Erich, I can capture some waveform data if you think it helps, but it’s not very interesting. I see the Control line go high, then the MCU emits the AT command on the TX line, then by no activity on the RX line, and finally the Control line goes low again. I will email you the capture of me trying to send “AT+UART=38400,0,0”. Whereas if I send the command “AT+UART?” I get activity on both lines and the response from the shell is: “+UART:9600,0,0\r\nOK”

        Like

        • Hi Vic,
          indeed, the captures do not show anything interesting. Are you sure your module is not connected to a host? If you re connected, then whatever you send to the module is sent to the host, so you will not see a response. On the other side: you get a proper response for 9600 baud. Strange.

          Like

      • Interesting, I just sent AT+ORGL and that changed the baud rate to 38400… I still would like to understand what’s happening here :-/

        Like

        • The factory default firmware might be different for different firmware. I remember that I read that the factory baud for the HC-05 module is 38400 (not 9600).

          Like

        • One more thing to consider: depending on the firmware, with the command pin asserted, the module might communicate with a different baud too. So I always try 9600 and 38400.

          Like

  3. Pingback: IEEE802.15.4 for the Zumo Robot | MCU on Eclipse

  4. Hi Erich, at this time what would you recommend for a readily available ~$10 bluetooth module for FRDM-KL25Z/KL46Z? Cheers!

    Like

  5. Pingback: Getting Bluetooth Working with JY-MCU BT_BOARD V1.06 | MCU on Eclipse

What do you think?

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