spp_acceptor crash

peterlspot
Posts: 6
Joined: Thu Mar 29, 2018 11:22 pm

spp_acceptor crash

Postby peterlspot » Sun Apr 15, 2018 11:44 am

I am playing with the spp_acceptor example. I added echo function for the incoming packets like below:

Code: Select all

static void esp_spp_cv(esp_spp_cb_event_t event, esp_spp_cb_param_t *param){

  ...
  case ESP_SPP_DATA_IND_EVT:
#if (SPP_SHOW_MODE == SPP_SHOW_DATA)
    ESP_LOGI(TAG, "ESP_SPP_DATA_IND_EVT len=%d handle=%d", param->data_ind.len, param->data_ind.handle);
    esp_log_buffer_hex("", param->data_ind.data, param->data_ind.len);
#else
    gettimeofday(&time_new, NULL);
    data_num += param->data_ind.len;
    if (time_new.tv_sec - time_old.tv_sec >= 3) {
      print_speed();
    }
#endif
#ifdef CONFIG_ECHO_BACK
    esp_spp_write(param->write.handle, param->data_ind.len,  param->data_ind.data);
#endif
  break;


The client is an Android app which sends 100KB data to esp32 device after user clicking a button. The esp32 will handle the inputs as shown above and send data back to Android app.

Sometimes I can get the following:

Code: Select all

assertion "!list_is_empty(list)" failed: file "/opt/esp/esp-idf/components/bt/bluedroid/osi/list.c", line 82, function: list_front
abort() was called at PC 0x400d4207 on core 0

Backtrace: 0x4008ac48:0x3ffd5580 0x4008ae17:0x3ffd55a0 0x400d4207:0x3ffd55c0 0x400e84e2:0x3ffd55f0 0x400ecf81:0x3ffd5610 0x400e8a82:0x3ffd5660

Rebooting...


With addr2line, we can see the stack trace as below:

Code: Select all

$ xtensa-esp32-elf-addr2line -e build/spp_server.elf -a 0x4008ac48:0x3ffd5580 0x4008ae17:0x3ffd55a0 0x400d4207:0x3ffd55c0 0x400e84e2:0x3ffd55f0 0x400ecf81:0x3ffd5610 0x400e8a82:0x3ffd5660
0x4008ac48
/Users/u/esp/esp-idf/components/esp32/./panic.c:648
0x4008ae17
/Users/u/esp/esp-idf/components/esp32/./panic.c:648
0x400d4207
/Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8)
0x400e84e2
/Users/u/esp/esp-idf/components/bt/bluedroid/osi/list.c:214
0x400ecf81
/Users/u/esp/esp-idf/components/bt/bluedroid/btc/profile/std/spp/btc_spp.c:503
0x400e8a82
/Users/u/esp/esp-idf/components/bt/bluedroid/btc/core/btc_task.c:104


Not sure if this is a bug or my misuse. Please someone to clarify.

Who is online

Users browsing this forum: No registered users and 3 guests