Commit Graph
5 Commits
Author SHA1 Message Date
ash 9ba48b3f9c Roll back to 2d3a5a9 + CONFIG_BT_ENABLED + double-init patch 2026-07-01 07:06:45 +00:00
ash 762500e227 Fix BLE crash: move all NimBLE calls to Core 0
Root cause: Arduino Core 3.x breaks cross-core NimBLE API calls.
Calling BLEMidiServer.controlChange() from loop() on Core 1 while
NimBLE host runs on Core 0 causes immediate crash.

Fix:
- Move ble_midi_transport.begin() to ble_init_task on Core 0
- All BLE MIDI sends use queue_cc() (cross-core safe flag setter)
- ble_midi_transport.update() processes queued sends on Core 0
- Pin NimBLE-Arduino to v1.4.3 (stable LTS for BLE MIDI)
- Keep CONFIG_BT_ENABLED out of sdkconfig.h (causes double-init)
2026-07-01 06:46:15 +00:00
ash 62d1e430d5 Switch from NimBLE-Arduino to ESP32-BLE-MIDI library
Replace direct NimBLE-Arduino dependency with max22/ESP32-BLE-MIDI
wrapper library (v0.3.2). Rewrite ble_midi_transport to use
BLEMidiServer API instead of raw NimBLEDevice calls.

Removes patch_nimble_device() from pre_build.py — no longer needed
since BT controller init is managed by the library internally.

The library uses NimBLE v1.4.1 internally and configures advertising
without setScanResponse() or setName(), which may resolve the invisible
BLE advertising issue on ESP32-S3.
2026-07-01 06:34:36 +00:00
ash 892e4fe061 Fix: on_receive public, explicit casts for narrowing 2026-06-30 06:19:10 +00:00
ash aea3a28206 Add BLE MIDI transport (feature_bluetooth) 2026-06-30 06:13:36 +00:00