Hello,
Running the basic example from the BLE-Gamepad-Client library runs fine on NimBLE 2.4.0, but crashes continuously when compiled with version 2.5.0. The error message is the following:
ets Jul 29 2019 12:21:46
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13232
load:0x40080400,len:3028
entry 0x400805e4
ESP_ERROR_CHECK failed: esp_err_t 0x103 (ESP_ERR_INVALID_STATE) at 0x4009361c
file: ".pio/libdeps/esp32/NimBLE-Arduino/src/nimble/porting/npl/freertos/src/npl_os_freertos.c" line 445
func: npl_freertos_callout_init
expression: esp_timer_create(&create_args, &co->handle)
abort() was called at PC 0x4009361f on core 0
Backtrace: 0x400836ad:0x3ffe3a70 0x40093629:0x3ffe3a90 0x40098755:0x3ffe3ab0 0x4009361f:0x3ffe3b30 0x4011bd93:0x3ffe3b50 0x4010a611:0x3ffe3b90 0x401093f7:0x3ffe3bb0 0x400d54b5:0x3ffe3bd0 0x400d37f9:0x3ffe3c00 0x400dfd2f:0x3ffe3c20 0x40082dc1:0x3ffe3c50 0x40079306:0x3ffe3c90 |<-CORRUPTED
ELF file SHA256: d8678c0d8ce3576a
E (343) esp_core_dump_flash: Core dump flash config is corrupted! CRC=0x7bd5c66f instead of 0x0
Rebooting...
The core dump flash error is likely left over from another project.
The hardware is just an ESP32.
The platformio.ini and main.cpp are below. The code in main.cpp is the same as the exaple code on the readme of the library. There is no other user code in the project.
Platform is espressif32 @ 6.7.0
Framework is arduinoespressif32 @ 3.20017.0 (Arduino-ESP32 2.0.17)
platformio.ini
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:esp32]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps =
tbekas/BLE-Gamepad-Client@^0.12.1
;h2zero/NimBLE-Arduino@2.4.0
monitor_speed = 115200
main.cpp
#include <Arduino.h>
#include <BLEGamepadClient.h>
XboxController controller;
void setup(void) {
Serial.begin(115200);
controller.begin();
}
void loop() {
if (controller.isConnected()) {
XboxControlsState s;
controller.read(&s);
Serial.printf("lstick: %.2f,%.2f, rstick: %.2f,%.2f\n",
s.leftStickX, s.leftStickY, s.rightStickX, s.rightStickY);
} else {
Serial.println("controller not connected");
}
delay(100);
}
If it's any help, ChatGPT said
(...) esp_timer_create() returns ESP_ERR_INVALID_STATE only if the timer subsystem has not been initialized yet. Under Arduino, that subsystem should already be initialized before setup() runs, so seeing this from a trivial example is highly abnormal.
Hello,
Running the basic example from the BLE-Gamepad-Client library runs fine on NimBLE 2.4.0, but crashes continuously when compiled with version 2.5.0. The error message is the following:
The core dump flash error is likely left over from another project.
The hardware is just an ESP32.
The platformio.ini and main.cpp are below. The code in main.cpp is the same as the exaple code on the readme of the library. There is no other user code in the project.
Platform is espressif32 @ 6.7.0
Framework is arduinoespressif32 @ 3.20017.0 (Arduino-ESP32 2.0.17)
platformio.ini
main.cpp
If it's any help, ChatGPT said