SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By tfabris
#196003
I have a Sparkfun Purpletooth Jamboree board, and it has an interesting problem.

When I pair it with my 2017 Honda Accord factory stereo, it works well for transmitting audio to the car stereo from its line input (in "Source" mode aka "SET CLASSIC_MODE=1").

When I monitor its serial command port, I am able to successfully send configuration commands to it. So far so good.

The problem is that when I press the controls on the car stereo, such as play, pause, next track, or previous track, I expect those commands to be instantly transmitted to the BC127 and have the "AVRCP_PLAY", "AVRCP_PAUSE" etc messages appear right away. However instead, there is often a long delay of several seconds before the command is received by the BC127.

If I press the "play/pause" button on the Jamboree board itself, then the "AVRCP_PLAY" message appears on the serial port instantly. It's only if I used the paired car stereo to send the command that there is the long delay.

And if I pair a different A2DP+AVRCP device to the same stereo, for example if I pair my smartphone to the stereo, the commands do behave instantly on those other devices. So I know it's not the stereo's fault.

I have tried turning off all of the various profiles that I don't need, for instance I have issued all of these commands but the problem still exists:

SET AUTOCONN=1
SET CLASSIC_ROLE=1
SET MUSIC_META_DATA=OFF
SET BLE_ROLE=0
SET ENABLE_SPP=OFF
SET ENABLE_PBAP=OFF
SET ENABLE_MAP=OFF
SET ENABLE_HFP=OFF
SET ENABLE_A2DP=ON
SET ENABLE_AVRCP=ON
SET INPUT_GAIN=8
WRITE
RESET

Any ideas of how to fix this slow command response? My whole purpose behind this project requires the response to be quick.
By tfabris
#196010
Additional information:

The delay appears to be somewhere in the handshaking protocol between the car stereo and the BC127. The reason I say this is because of a particular symptom I see. The symptom is kind of subtle and interesting and hard to describe, but if you saw it, you'd know what I meant.

Let me try to describe it...

When I use the car's touchscreen to play and pause, the car has two icons on the screen: A play icon and a pause icon. This is different from most user interfaces where there is a single icon that toggles between play and pause. On this car, it's two separate icons.

Its user interface tells me whether it's in play mode or pause mode by *highlighting* the corresponding icon. For instance, if I press the play icon, then when it goes into play mode, the play icon becomes highlighted. And if I press the pause icon, then when it goes into pause mode, then the pause icon becomes highlighted.

Normally that process is instantaneous. If I have my cell phone paired with the car stereo, if I press pause, then two things happen instantly: The music pauses instantly and the pause icon becomes highlighted instantly.

However, with the BC127, there is a significant delay in *both* actions: When I press the pause icon, it does *not* highlight right away. There is a pause of a few seconds before it becomes highlighted. And at the exact same instant which it *does* become highlighted, that is the same instant that the "AVRCP_PAUSE" message appears on the BC127's serial port!

In other words, there is some reason that the car stereo think that the BC127 hasn't received the pause command yet, and it doesn't update its UI until it gets confirmation back that the BC127 received the command.

So there is something going on here where the handshaking with the BC127 itself is being slow and problematic. I have tried turning off a bunch of other protocols (as described in my prior post), hoping it was one of those other protocols interfering and slowing it down. Have I missed anything?
By tfabris
#196011
After doing some research I see that the BC127 chip that's supplied on that Purpletooth Jamboree board contains very old firmware, version 5.0 from 2013. The firmware has gone all the way up to 6.1.5 in the intervening years.

So I'm trying to upgrade the firmware ( https://www.bluecreation.com/firmwareupdates.php ) but it's being difficult, giving me the error message "error 88 failcom_connect". Any tips or ideas?
By tfabris
#196024
Okay, I was able to get the BC127 upgraded to the latest firmware, which was version 6.1.5 from this site:
https://www.bluecreation.com/firmwareupdates.php

The commandset is different than the 5.x command set, but that's alright, I dug through their docs and learned 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:
SET MUSIC_OLD_AVRCP=ON
WRITE
RESET

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?