Unhandled Exception (in Sink mode using AVRC callbacks) #666
-
Hi! I am getting this backtrace anytime I try to use the AVRC callbacks.
This happens anytime I add the following callbacks into my sketch:
I was previously able to use those callbacks without problem when using the older SDK from Espressif. I am now using pioarduino and have gotten myself up to the SDK version v5.3.2-282-gcfea4f7c98-dirty. I have been troubleshooting jittery clock and wanted to get up to a newer version of the SDK - that did seem to help. As a side effect it TOTALLY helped my connection / disconnection / reconnection issues with Bluetoooth Sources. All those forum posts of people complaining about reconnection - the new SDK totally fixed it btw. Anyhow - I am now trying to get the previous functionality back as far as callbacks and such and running into this trouble now. Here are my versions: |-- ESP32-A2DP @ 1.8.6+sha.e64ca4e Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Ah - here are the callbacks - straight from the sample code.
|
Beta Was this translation helpful? Give feedback.
-
Why don't you just test first with the latest official ESP32 Arduino core ? |
Beta Was this translation helpful? Give feedback.
-
I think thats what Im actually on ... using PlatformIO. platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip Stable versioncurrently espressif Arduino 3.1.1 and IDF 5.3.2.241224 |
Beta Was this translation helpful? Give feedback.
-
Just made a test in Arduino and could not reproduce any issues: It's working perfectly! #include "AudioTools.h"
#include "BluetoothA2DPSink.h"
I2SStream out;
BluetoothA2DPSink a2dp_sink(out);
void avrc_rn_play_pos_callback(uint32_t play_pos) {
Serial.printf("Play position is %d (%d seconds)\n", play_pos, (int)round(play_pos/1000.0));
}
void avrc_rn_playstatus_callback(esp_avrc_playback_stat_t playback) {
switch (playback) {
case esp_avrc_playback_stat_t::ESP_AVRC_PLAYBACK_STOPPED:
Serial.println("Stopped.");
break;
case esp_avrc_playback_stat_t::ESP_AVRC_PLAYBACK_PLAYING:
Serial.println("Playing.");
break;
case esp_avrc_playback_stat_t::ESP_AVRC_PLAYBACK_PAUSED:
Serial.println("Paused.");
break;
case esp_avrc_playback_stat_t::ESP_AVRC_PLAYBACK_FWD_SEEK:
Serial.println("Forward seek.");
break;
case esp_avrc_playback_stat_t::ESP_AVRC_PLAYBACK_REV_SEEK:
Serial.println("Reverse seek.");
break;
case esp_avrc_playback_stat_t::ESP_AVRC_PLAYBACK_ERROR:
Serial.println("Error.");
break;
default:
Serial.printf("Got unknown playback status %d\n", playback);
}
}
void avrc_rn_track_change_callback(uint8_t *id) {
Serial.println("Track Change bits:");
for (uint8_t i = 0; i < 8; i++)
{
Serial.printf("\tByte %d : 0x%x \n",i,id[i]);
}
//An example of how to project the pointer value directly as a uint8_t
uint8_t track_change_flag = *id;
Serial.printf("\tFlag value: %d\n",track_change_flag);
}
void setup() {
Serial.begin(115200);
a2dp_sink.set_avrc_rn_playstatus_callback(avrc_rn_playstatus_callback);
a2dp_sink.set_avrc_rn_play_pos_callback(avrc_rn_play_pos_callback);
a2dp_sink.start("MyMusic");
}
void loop() {
delay(1000); // do nothing
} |
Beta Was this translation helpful? Give feedback.
Why don't you just test first with the latest official ESP32 Arduino core ?
This is the actual release.