The Sparkfun Purpletooth Jamboree board with the BC127 bluetooth chip is being a pain the ass.
It's primary problem at first was that, when I would press a control on the car stereo, such as "next track", there would be a long delay before the command would get sent to the BC127 chip and show up on its serial port. For example "AVRCP_NEXT" would arrive on the BC127 serial port anywhere from 5-30 seconds after I press the button on the stereo.
That's problematic. Especially since I'm sure the problem isn't the car stereo: It does fine when I pair it with a smartphone, commands are instantaneous then.
I tried digging through all the docs on the web, about commands for the BC127, and tried adding a bunch of commands which disabled features that I wasn't using. I trimmed it down to just using an A2DP and AVRCP profile only, and yet I still had the same problem.
After getting confused about how some commands in the docs worked and some commands didn't work, I realized it was because the BC127 chip that ships on that Sparkfun Purpletooth Jamboree board has a way old firmware version on it. It was an old 5.x release candidate from four years ago and they're up to version 6.x now. There are multiple places to get docs on the BC127 on the web, some are PDF and some are interactive web sites, and they're all contradictory because they all refer to different versions. Once I realized that, things started to make more sense.
So I set out to upgrade the BC127 chip to the newest firmware, in hopes that it would fix the slowness problem. This turned out to be a bit of a pain because the sparkfun board does not contain a USB-to-Serial interface. I first tried making the Arduino be a direct-pass-through program that just exchanged data directly back and forth between the BC127 software serial port and the Arduino hardware serial port. Essentally using the Arduino as a USB-serial converter. However that didn't work: The firmware updater initially connected to the board, reported the version, and started the update, but shortly thereafter would die with an error message, no matter what I did to fix it.
So I overnighted an FTDI Basic Board to connect to the Sparkfun board, so I could update it directly. Initially it didn't work and failed to connect to the updater program at all, and displayed nothing on the serial port. I thought I had done something wrong, or that it was just never going to work at all. But then as a last ditch effort, I reflowed the solder on some of the chip mount points on the FTDI basic board and then boom it worked! I could update the BC127 with the latest firmware!
So now I was able to get the BC127 upgraded to the latest firmware, which is version 6.1.5 from this site: https://www.bluecreation.com/firmwareupdates.php
- The commandset is different than the 5.x command set, but I dug through their docs and learned the new commands and updated my Arduino sketch
with the new commands.
However, now the slowness problem is actually *worse* than before. If I press a command on the car stereo, it's many seconds before those commands show up on the BC127 serial port. Sometimes now they don't even show up at all.
But here's something funny. If I issue the following commands:
Then it's really interesting because the commands are now instantaneous! If I press Next Track, the command instantly shows up on the BC127! Unfortunately there are still problems:
1. The car stereo's user interface changes so that the track metadata (artist/title/etc) are not displayed any more. The metadata is not supported in the "OLD_AVRCP" mode.
2. The car stereo is permanently stuck in "pause" mode. Pressing the "Play" button on the car stereo does not work and does not send the AVRCP_PLAY to the BC127.
3. No sound comes out of the audio because it's stuck in pause mode. The audio is muted.
So I'm really stumped here. Anyone have any ideas?
I'm going by this manual:https://www.bluecreation.com/MelodyAudio6/docs/melody_commands.html
In particular, the configuration section here:https://www.bluecreation.com/MelodyAudio6/docs/melody_configuration/general_configuration.html
Anyone see anything in there that might allow this thing to work correctly with my Honda?