I am attempting to develop an application for a BlueCreation BC127 bluetooth module and I am running into trouble with the testing and development.
The purpose is to use the BC127 in “Source” mode, streaming audio from a third party music player, via bluetooth A2DP, to a car stereo headunit so that the audio from the BC127 comes out the car speakers. I intend for the BC127 to receive the AVRCP commands from the car stereo head unit when the user presses things like Next, Previous, Pause, and Play, on either the headunit’s touchscreen or steering wheel. Then when my development board sees those commands arrive as notifications on the BC127 serial port, then it will use a different serial port to send appropriate corresponding commands to the third party music player.
I am able to connect to the BC127 and issue commands via serial terminal. I am also able to upgrade the BC127 firmware with a DFU upgrade, I have upgraded it to Melody version 6.1.5, which is the latest one found on this site: bluecreation.com/firmwareupdates.php
For configuring and monitoring the BC127, I am following the BlueCreation manual for the Melody firmware found here: bluecreation.com/MelodyAudi … ction.html
I have also restored the BC127 to factory default settings with the development console serial terminal commands:
When I pair the BC127 with my test vehicle, which is a 2017 Honda Accord with a factory headunit, A2DP audio streams correctly (on link ID 10) and the BC127 registers that an AVRCP connection exists (on link ID 11). So far so good, but I notice the BC127 exhibits the following problems:
When I press “Next Track” or “Previous Track” on the head unit, there is a long pause of random length (as much as 5, 10, 15 or even 30 seconds or more) before the “AVRCP_FORWARD” or “AVRCP_BACKWARD” command appears on the BC127’s serial port.
When the user presses “Pause” or “Play” on the head unit, the corresponding “AVRCP_PAUSE” or “AVRCP_PLAY” commands never reach the BC127 at all.
The above problems do not occur when paring different bluetooth devices such as smartphones to the same headunit (the AVRCP commands are received instantly by the smartphones), so the issue is not caused by the head unit.
I have noticed that if I issue the following commands from the development console:
- SET MUSIC_OLD_AVRCP=ON
… then the car headunit detects the change, and its touchscreen changes to a simpler mode where there is no track metadata on the screen. At this point the “Next Track” and “Previous Track” features work instantly. Though this is not a successful workaround because the “Play” and “Pause” buttons still do not work, the corresponding “AVRCP_PLAY” and “AVRCP_PAUSE” commands still never reach the BC127. Also, it is not a successful workaround because my intention is to continue development to include track metadata, so I do not wish to use the “OLD_AVRCP” mode, I want to use the new mode that includes track metadata.
Additionally, the head unit is stuck in “Pause” mode and its audio is muted, even though audio streaming is successfully occurring. If the user presses either the “Play” button or the “Pause” button on the on stereo headunit, nothing happens and no commands are sent to the BC127 so there is no way for the user to bring the unit out of “Pause” mode or to unmute the audio.
If I issue the following command at the development console:
MUSIC 11 PLAY
Then the head unit goes out of “pause” mode and begins playing the streaming music, and the BC127 receives an “AVRCP_PLAY” command on its serial port. After that, pressing the pause button on the car stereo headunit works… exactly once only, and then neither play or pause works after that, and the head unit is stuck in pause mode again. I have to issue another command at the development console to unlock it again.
This is also not a successful work around because it requires the development console to resume the music after the user has pressed the pause command on the car stereo head unit. Though I could develop software to keep reissuing the command, it would mean that the user is never able to pause the music and his play/pause buttons don’t work as intended: It’s a catch-22.
This whole situation is pointing to there being some kind of bugs in the BC127 firmware. Either that, or I am missing some crucial configuration or setup command that I must issue to the BC127 to fix this, however I would think that the factory settings (which I restored, above) would be sufficient for this to have basic functionality.
Note that I also had similar problems when the BC127 was running earlier version 5 of the melody firmware, before I performed the DFU upgrade, so this isn’t specific to one version of the firmware.
Can anyone help me with this?