The BM64 Bluetooth Module

A project log for Blue POT

Yet another Bluetooth to Plain Old Telephone adapter. This one drives existing phone lines so you don't have to modify the phone.

dan-julioDan Julio 07/09/2019 at 04:402 Comments

When I started this project I looked at the RN-52 and BC127 Bluetooth audio modules available at Sparkfun.  Some of the comments on the BC127 page made me a little wary of this device and the RN-52 is getting a little long-in-the-tooth so I decided to look at other audio-capable Bluetooth modules.  A search led me to the Microchip BMXX family that are more modern and significantly less expensive (less than half the price for a high-power model and about a third of the price for a lower-power model).  Although it's clear that this family of modules is aimed at stereo headsets and speakers, they also support telephony applications.  I bought one without diving into the specs.  It all worked out but the BM64 module is not without its complications.

Microchip acquired Taiwan-based ISSC for their Bluetooth technology.  The specification and user manuals for the modules are translated to English and pretty basic.  Although they are good at explaining the binary protocol implemented by the serial interface, often it isn't clear what the commands actually do and some features such as the "database" specified in some commands, of which there apparently can be more than one, are not explained anywhere.  I was quickly able to to talk to the module but getting it to do what I wanted took quite a bit of experimentation.

The serial command set is pretty large and broken into two parts, one of which is declared as depreciated but necessary for telephony functions.  Not all module configuration can be done through the serial interface while the module is functional.  One has to download a development environment containing eight Windows applications that are used to configure the module.  The most basic process consists of running the "UI Tool" to configure module behavior, the "DSP Tool" to configure it's audio functionality, the "MPET Tool" to merge the UI and DSP configuration files and the "EEPROM Tool" to write the merged data to the module.  Through trial and error, I found that I had to makes changes to the module behavior to make it amenable for use as an always powered-on handsfree telephony device as opposed to a battery-powered Bluetooth stereo speaker.  I made no changes to the DSP configuration.  My customizations are found in the "bluePOT.ipf" file in the github repository.  This is the combined file and can be directly programmed using the "EEPROM Tool".  The process of using the software tools is documented in the evaluation board user's guide.  Programming occurs through the module's serial port with it put in a special mode at reset.  Blue POT supports this with a jumper that will turn the Teensy into a USB UART at power-on and configure the BM64 for updating.  The Microchip/ISSC EEPROM Tool opens Blue POT as a com port.  The BM64 module must be configured with the "bluePOT.ipf" file in order for it to work with the prototype Teensy firmware.

Ultimately I used a small subset of the serial commands to initiate calls, answer calls and cancel/hangup calls; and process just a pair of event notifications from the module (module status and call status).  The prototype code simply captures these individually but it would probably be better to make a generic driver for the module handling all commands and events to keep a complete state of the module.

One complication came about after I gave the Blue POT as a gift to my partner who uses an iPhone (I used an Android phone to test).  There were a few differences in the way the two phone architectures communicated events and dialed that caused it to fail right away with the iPhone.  One difference I remember is that the default volume the iPhone sets in the BM64 is too low,  The code has to manually tell the BM64 to use a high volume after a call is established.  Fortunately these were easy to overcome and seem backward compatible with Android.  I imagine that there are other issues still remaining with other versions of Android and/or IOS.  I can only imagine the number of phones that car manufacturers have to test their Bluetooth integration with.

I used the BM64 but the BM62 is another, less expensive, possibility.  The BM64 has more features including an I2S serial audio interface.  Theoretically it can connect to the Teensy I2C port through the Audio Library but I think that the BM64 reverts to an 8 KHz sampling rate for telephony that can't be handled by the Audio Library.

The BM64 can store up to eight Bluetooth pairings but only automatically connects to a phone using one of the pairings when it is first powered on.  This is a problem if the phone comes into range after the module has been powered.  It's possible that there is some EEPROM configuration to enable additional reconnect functionality but I couldn't identify it, so Blue POT code stores the current pairing number in EEPROM (Pairing ID) and requests it to attempt to connect with the specified pairing once a minute while the BM64 reports it is not connected.  This ensures that the telephones become functional quickly when the cellphone comes into range.  The first cellphone paired is "0", the second cell paired is "1" and so-on up to the eighth cell at Pairing ID "7".  Blue POT shows up as "Blue POT" during discovery and pairing.


Kshitiz9110 wrote 04/15/2022 at 14:04 point

Hey, I'm also using BM64 rn and I'm facing a problem connecting it to the EEPROM tool, The tool can't recognize the Bluetooth module. How were you able to use the EEPROM tool? Do I have to turn on the Bluetooth module by pressing the MFB button or not? I tried doing it but when I press it the current in the module increases and the voltage comes down can you help me with this please 

  Are you sure? yes | no

Dan Julio wrote 07/31/2022 at 18:49 point

Hello, I apologize as I never got a notification for your comment.  There was a bug in the sketch that prevented putting the module into the correct mode.  It's fixed now.

  Are you sure? yes | no