Skip to content

[draft] pioarduino: fix tbeam (ESP32 original) support#10235

Merged
vidplace7 merged 1 commit into
meshtastic:pioarduinofrom
cpatulea:pioarduino-tbeam
Apr 22, 2026
Merged

[draft] pioarduino: fix tbeam (ESP32 original) support#10235
vidplace7 merged 1 commit into
meshtastic:pioarduinofrom
cpatulea:pioarduino-tbeam

Conversation

@cpatulea

Copy link
Copy Markdown
Contributor

DRAFT ONLY

Current state of pioarduino branch: https://github.com/meshtastic/firmware/actions/runs/24730901810/job/72346464441

As expected: #9122 (comment)

We asked why ESP32 original still uses Bluedroid: espressif/esp32-arduino-lib-builder#296 (comment) answer is there.

Let's try to handle ESP32 original with external NimBLE-Arduino on Meshtastic side.

State after this PR (still many build errors):

src/nimble/NimbleBluetooth.cpp: In member function 'void BluetoothPhoneAPI::runOnceHandleFromPhoneQueue()':
src/nimble/NimbleBluetooth.cpp:327:35: error: invalid conversion from 'char*' to 'const uint8_t*' {aka 'const unsigned char*'} [-fpermissive]
  327 |             handleToRadio(val.data(), val.size());
      |                           ~~~~~~~~^~
      |                                   |
      |                                   char*
In file included from src/mesh/StreamAPI.h:3,
                 from src/SerialConsole.h:4,
                 from src/DebugConfiguration.h:34,
                 from src/configuration.h:560,
                 from src/nimble/NimbleBluetooth.cpp:1:
src/mesh/PhoneAPI.h:116:47: note:   initializing argument 1 of 'virtual bool PhoneAPI::handleToRadio(const uint8_t*, size_t)'
  116 |     virtual bool handleToRadio(const uint8_t *buf, size_t len);
      |                                ~~~~~~~~~~~~~~~^~~
src/nimble/NimbleBluetooth.cpp: At global scope:
src/nimble/NimbleBluetooth.cpp:415:10: error: 'void NimbleBluetoothToRadioCallback::onWrite(NimBLECharacteristic*)' marked 'override', but does not override
  415 |     void onWrite(BLECharacteristic *pCharacteristic) override
      |          ^~~~~~~
In file included from .pio/libdeps/tbeam/NimBLE-Arduino/src/NimBLEService.h:28,
                 from .pio/libdeps/tbeam/NimBLE-Arduino/src/NimBLEDevice.h:294,
                 from src/nimble/NimbleBluetooth.cpp:16:
.pio/libdeps/tbeam/NimBLE-Arduino/src/NimBLECharacteristic.h:300:18: warning: 'virtual void NimBLECharacteristicCallbacks::onWrite(NimBLECharacteristic*, NimBLEConnInfo&)' was hidden [-Woverloaded-virtual=]
  300 |     virtual void onWrite(NimBLECharacteristic* pCharacteristic, NimBLEConnInfo& connInfo);
      |                  ^~~~~~~
src/nimble/NimbleBluetooth.cpp:415:10: note:   by 'void NimbleBluetoothToRadioCallback::onWrite(NimBLECharacteristic*)'
  415 |     void onWrite(BLECharacteristic *pCharacteristic) override
      |          ^~~~~~~
src/nimble/NimbleBluetooth.cpp: In member function 'void NimbleBluetoothToRadioCallback::onWrite(NimBLECharacteristic*)':
src/nimble/NimbleBluetooth.cpp:433:30: error: 'class NimBLECharacteristic' has no member named 'data'
  433 |             pCharacteristic->data(), pCharacteristic->size());
      |                              ^~~~
src/nimble/NimbleBluetooth.cpp:433:55: error: 'class NimBLECharacteristic' has no member named 'size'
  433 |             pCharacteristic->data(), pCharacteristic->size());
      |                                                       ^~~~
src/nimble/NimbleBluetooth.cpp: At global scope:
src/nimble/NimbleBluetooth.cpp:472:10: error: 'void NimbleBluetoothFromRadioCallback::onRead(NimBLECharacteristic*)' marked 'override', but does not override
  472 |     void onRead(BLECharacteristic *pCharacteristic) override
      |          ^~~~~~
.pio/libdeps/tbeam/NimBLE-Arduino/src/NimBLECharacteristic.h:299:18: warning: 'virtual void NimBLECharacteristicCallbacks::onRead(NimBLECharacteristic*, NimBLEConnInfo&)' was hidden [-Woverloaded-virtual=]
  299 |     virtual void onRead(NimBLECharacteristic* pCharacteristic, NimBLEConnInfo& connInfo);
      |                  ^~~~~~
src/nimble/NimbleBluetooth.cpp:472:10: note:   by 'void NimbleBluetoothFromRadioCallback::onRead(NimBLECharacteristic*)'
  472 |     void onRead(BLECharacteristic *pCharacteristic) override
      |          ^~~~~~
src/nimble/NimbleBluetooth.cpp:582:1: error: expected class-name before '{' token
  582 | {
      | ^
src/nimble/NimbleBluetooth.cpp:583:10: error: 'void NimbleBluetoothSecurityCallback::onPassKeyNotify(uint32_t)' marked 'override', but does not override
  583 |     void onPassKeyNotify(uint32_t passkey) override
      |          ^~~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:620:10: error: 'void NimbleBluetoothSecurityCallback::onAuthenticationComplete(ble_gap_conn_desc*)' marked 'override', but does not override
  620 |     void onAuthenticationComplete(ble_gap_conn_desc *desc) override
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from .pio/libdeps/tbeam/NimBLE-Arduino/src/NimBLEDevice.h:293:
.pio/libdeps/tbeam/NimBLE-Arduino/src/NimBLEServer.h:167:18: warning: 'virtual void NimBLEServerCallbacks::onDisconnect(NimBLEServer*, NimBLEConnInfo&, int)' was hidden [-Woverloaded-virtual=]
  167 |     virtual void onDisconnect(NimBLEServer* pServer, NimBLEConnInfo& connInfo, int reason);
      |                  ^~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:664:10: note:   by 'void NimbleBluetoothServerCallback::onDisconnect(NimBLEServer*, ble_gap_conn_desc*)'
  664 |     void onDisconnect(BLEServer *pServer, struct ble_gap_conn_desc *desc)
      |          ^~~~~~~~~~~~
.pio/libdeps/tbeam/NimBLE-Arduino/src/NimBLEServer.h:157:18: warning: 'virtual void NimBLEServerCallbacks::onConnect(NimBLEServer*, NimBLEConnInfo&)' was hidden [-Woverloaded-virtual=]
  157 |     virtual void onConnect(NimBLEServer* pServer, NimBLEConnInfo& connInfo);
      |                  ^~~~~~~~~
src/nimble/NimbleBluetooth.cpp:640:10: note:   by 'void NimbleBluetoothServerCallback::onConnect(NimBLEServer*, ble_gap_conn_desc*)'
  640 |     void onConnect(BLEServer *pServer, struct ble_gap_conn_desc *desc)
      |          ^~~~~~~~~
src/nimble/NimbleBluetooth.cpp: In member function 'void NimbleBluetooth::startAdvertising()':
src/nimble/NimbleBluetooth.cpp:718:19: error: 'class NimBLEAdvertising' has no member named 'setMinPreferred'
  718 |     pAdvertising->setMinPreferred(0x06); // functions that help with iPhone connections issue
      |                   ^~~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:719:19: error: 'class NimBLEAdvertising' has no member named 'setMaxPreferred'
  719 |     pAdvertising->setMaxPreferred(0x12);
      |                   ^~~~~~~~~~~~~~~
Compiling .pio/build/tbeam/FrameworkArduino/base64.cpp.o
src/nimble/NimbleBluetooth.cpp: In member function 'virtual void NimbleBluetooth::setup()':
src/nimble/NimbleBluetooth.cpp:810:5: error: 'BLESecurity' was not declared in this scope
  810 |     BLESecurity *pSecurity = new BLESecurity();
      |     ^~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:810:18: error: 'pSecurity' was not declared in this scope
  810 |     BLESecurity *pSecurity = new BLESecurity();
      |                  ^~~~~~~~~
src/nimble/NimbleBluetooth.cpp:810:34: error: expected type-specifier before 'BLESecurity'
  810 |     BLESecurity *pSecurity = new BLESecurity();
      |                                  ^~~~~~~~~~~
Compiling .pio/build/tbeam/FrameworkArduino/cbuf.cpp.o
src/nimble/NimbleBluetooth.cpp:811:37: error: 'ESP_BLE_ENC_KEY_MASK' was not declared in this scope
  811 |     pSecurity->setInitEncryptionKey(ESP_BLE_ENC_KEY_MASK | ESP_BLE_ID_KEY_MASK);
      |                                     ^~~~~~~~~~~~~~~~~~~~
Compiling .pio/build/tbeam/FrameworkArduino/chip-debug-report.cpp.o
Compiling .pio/build/tbeam/FrameworkArduino/esp32-hal-adc.c.o
src/nimble/NimbleBluetooth.cpp:811:60: error: 'ESP_BLE_ID_KEY_MASK' was not declared in this scope
  811 |     pSecurity->setInitEncryptionKey(ESP_BLE_ENC_KEY_MASK | ESP_BLE_ID_KEY_MASK);
      |                                                            ^~~~~~~~~~~~~~~~~~~
Compiling .pio/build/tbeam/FrameworkArduino/esp32-hal-bt.c.o
src/nimble/NimbleBluetooth.cpp:815:34: error: 'ESP_IO_CAP_OUT' was not declared in this scope
  815 |         pSecurity->setCapability(ESP_IO_CAP_OUT);
      |                                  ^~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:831:34: error: 'ESP_IO_CAP_NONE' was not declared in this scope; did you mean 'ESP_LOG_NONE'?
  831 |         pSecurity->setCapability(ESP_IO_CAP_NONE);
      |                                  ^~~~~~~~~~~~~~~
      |                                  ESP_LOG_NONE
src/nimble/NimbleBluetooth.cpp:836:16: error: 'setSecurityCallbacks' is not a member of 'NimBLEDevice'
  836 |     BLEDevice::setSecurityCallbacks(new NimbleBluetoothSecurityCallback());
      |                ^~~~~~~~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:841:57: error: 'getDeviceName' is not a member of 'NimBLEDevice'
  841 |     int nameRc = ble_svc_gap_device_name_set(BLEDevice::getDeviceName().c_str());
      |                                                         ^~~~~~~~~~~~~
Compiling .pio/build/tbeam/FrameworkArduino/esp32-hal-cpu.c.o
Compiling .pio/build/tbeam/FrameworkArduino/esp32-hal-dac.c.o
src/nimble/NimbleBluetooth.cpp:841:18: error: 'ble_svc_gap_device_name_set' was not declared in this scope
  841 |     int nameRc = ble_svc_gap_device_name_set(BLEDevice::getDeviceName().c_str());
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp: In member function 'void NimbleBluetooth::setupService()':
src/nimble/NimbleBluetooth.cpp:858:99: error: 'PROPERTY_WRITE' is not a member of 'NimBLECharacteristic'
  858 |         ToRadioCharacteristic = bleService->createCharacteristic(TORADIO_UUID, BLECharacteristic::PROPERTY_WRITE);
      |                                                                                                   ^~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:860:103: error: 'PROPERTY_READ' is not a member of 'NimBLECharacteristic'
  860 |         FromRadioCharacteristic = bleService->createCharacteristic(FROMRADIO_UUID, BLECharacteristic::PROPERTY_READ);
      |                                                                                                       ^~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:862:79: error: 'PROPERTY_NOTIFY' is not a member of 'NimBLECharacteristic'
  862 |             bleService->createCharacteristic(FROMNUM_UUID, BLECharacteristic::PROPERTY_NOTIFY | BLECharacteristic::PROPERTY_READ);
      |                                                                               ^~~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:862:116: error: 'PROPERTY_READ' is not a member of 'NimBLECharacteristic'
  862 |             bleService->createCharacteristic(FROMNUM_UUID, BLECharacteristic::PROPERTY_NOTIFY | BLECharacteristic::PROPERTY_READ);
      |                                                                                                                    ^~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:863:101: error: 'PROPERTY_NOTIFY' is not a member of 'NimBLECharacteristic'
  863 |         logRadioCharacteristic = bleService->createCharacteristic(LOGRADIO_UUID, BLECharacteristic::PROPERTY_NOTIFY |
      |                                                                                                     ^~~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:864:105: error: 'PROPERTY_READ' is not a member of 'NimBLECharacteristic'
  864 |                                                                                      BLECharacteristic::PROPERTY_READ);
      |                                                                                                         ^~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:866:99: error: 'PROPERTY_WRITE' is not a member of 'NimBLECharacteristic'
  866 |         ToRadioCharacteristic = bleService->createCharacteristic(TORADIO_UUID, BLECharacteristic::PROPERTY_WRITE |
      |                                                                                                   ^~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:867:103: error: 'PROPERTY_WRITE_AUTHEN' is not a member of 'NimBLECharacteristic'
  867 |                                                                                    BLECharacteristic::PROPERTY_WRITE_AUTHEN |
      |                                                                                                       ^~~~~~~~~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:868:103: error: 'PROPERTY_WRITE_ENC' is not a member of 'NimBLECharacteristic'
  868 |                                                                                    BLECharacteristic::PROPERTY_WRITE_ENC);
      |                                                                                                       ^~~~~~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:869:103: error: 'PROPERTY_READ' is not a member of 'NimBLECharacteristic'
  869 |         FromRadioCharacteristic = bleService->createCharacteristic(FROMRADIO_UUID, BLECharacteristic::PROPERTY_READ |
      |                                                                                                       ^~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:870:107: error: 'PROPERTY_READ_AUTHEN' is not a member of 'NimBLECharacteristic'
  870 |                                                                                        BLECharacteristic::PROPERTY_READ_AUTHEN |
      |                                                                                                           ^~~~~~~~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:871:107: error: 'PROPERTY_READ_ENC' is not a member of 'NimBLECharacteristic'
  871 |                                                                                        BLECharacteristic::PROPERTY_READ_ENC);
      |                                                                                                           ^~~~~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:873:46: error: 'PROPERTY_NOTIFY' is not a member of 'NimBLECharacteristic'
  873 |             FROMNUM_UUID, BLECharacteristic::PROPERTY_NOTIFY | BLECharacteristic::PROPERTY_READ |
      |                                              ^~~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:873:83: error: 'PROPERTY_READ' is not a member of 'NimBLECharacteristic'
  873 |             FROMNUM_UUID, BLECharacteristic::PROPERTY_NOTIFY | BLECharacteristic::PROPERTY_READ |
      |                                                                                   ^~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:874:50: error: 'PROPERTY_READ_AUTHEN' is not a member of 'NimBLECharacteristic'
  874 |                               BLECharacteristic::PROPERTY_READ_AUTHEN | BLECharacteristic::PROPERTY_READ_ENC);
      |                                                  ^~~~~~~~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:874:92: error: 'PROPERTY_READ_ENC' is not a member of 'NimBLECharacteristic'
  874 |                               BLECharacteristic::PROPERTY_READ_AUTHEN | BLECharacteristic::PROPERTY_READ_ENC);
      |                                                                                            ^~~~~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:876:47: error: 'PROPERTY_NOTIFY' is not a member of 'NimBLECharacteristic'
  876 |             LOGRADIO_UUID, BLECharacteristic::PROPERTY_NOTIFY | BLECharacteristic::PROPERTY_READ |
      |                                               ^~~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:876:84: error: 'PROPERTY_READ' is not a member of 'NimBLECharacteristic'
  876 |             LOGRADIO_UUID, BLECharacteristic::PROPERTY_NOTIFY | BLECharacteristic::PROPERTY_READ |
      |                                                                                    ^~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:877:51: error: 'PROPERTY_READ_AUTHEN' is not a member of 'NimBLECharacteristic'
  877 |                                BLECharacteristic::PROPERTY_READ_AUTHEN | BLECharacteristic::PROPERTY_READ_ENC);
      |                                                   ^~~~~~~~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:877:93: error: 'PROPERTY_READ_ENC' is not a member of 'NimBLECharacteristic'
  877 |                                BLECharacteristic::PROPERTY_READ_AUTHEN | BLECharacteristic::PROPERTY_READ_ENC);
      |                                                                                             ^~~~~~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:896:46: error: 'PROPERTY_READ' is not a member of 'NimBLECharacteristic'
  896 |         (uint16_t)0x2a19, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_NOTIFY);
      |                                              ^~~~~~~~~~~~~
src/nimble/NimbleBluetooth.cpp:896:81: error: 'PROPERTY_NOTIFY' is not a member of 'NimBLECharacteristic'
  896 |         (uint16_t)0x2a19, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_NOTIFY);
      |                                                                                 ^~~~~~~~~~~~~~~
  • does NOT build tbeam yet (but getting closer)
  • NOT build tested on other devices (like Heltec v3) to check they are still buildling
  • NOT intended for merging - just a draft to show my current work and allow others to add to it

@github-actions github-actions Bot added needs-review Needs human review hardware-support Hardware related: new devices or modules, problems specific to hardware labels Apr 22, 2026
@cpatulea

cpatulea commented Apr 22, 2026

Copy link
Copy Markdown
Contributor Author

Maybe a different approach:

Use custom_sdkconfig to set CONFIG_BT_BLUEDROID_ENABLED=n + CONFIG_BT_NIMBLE_ENABLED=y (and all the other needed options, like this: https://github.com/espressif/esp32-arduino-lib-builder/pull/296/changes#diff-60e09f2a18306e7b6f40c2a2f9cf45d8dbd4d70c9fec4fba2c1dcce70067a012

Have not tried this yet, this is a 'personal note' to try it next.

@mverch67

mverch67 commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

I suggest to use a real BluetoothApi base class with virtual methods and derived classes for the Nimble / esp_hosted variants as I did in my PR9526. That would be the cleanest solution from architecture point of view and easier to maintain. This way esp32 devices could use the (old) unmodified proven bluetooth implementation based on the external NimBLE library.

The key is not to use the concrete classes but only the base class:
image

In main-esp32.cpp is the factory implementation that instantiates the proper child class:
image

Here we'll just add the (old) class used for esp32 and everything else works like magic without further #ifdefs

@cpatulea

cpatulea commented Apr 22, 2026

Copy link
Copy Markdown
Contributor Author

custom_sdkconfig to set CONFIG_BT_BLUEDROID_ENABLED=n + CONFIG_BT_NIMBLE_ENABLED=y

Tried this, it does trigger nimble to get built:

*** Add "custom_sdkconfig" settings to IDF sdkconfig.defaults ***
...
Add: CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
Add: # CONFIG_BT_BLUEDROID_ENABLED is not set
Add: CONFIG_BT_NIMBLE_ENABLED=y
...
Compiling .pio/build/tbeam/bt/host/nimble/nimble/nimble/transport/src/transport.c.o
Compiling .pio/build/tbeam/bt/host/nimble/nimble/nimble/host/util/src/addr.c.o
Compiling .pio/build/tbeam/bt/host/nimble/nimble/nimble/host/services/gatt/src/ble_svc_gatt.c.o
...

but the include files are not copied over for esp32:

$ find -name ble_uuid.h
./packages/framework-espidf/components/bt/host/nimble/nimble/nimble/host/include/host/ble_uuid.h
./packages/framework-arduinoespressif32-libs/esp32c6/include/bt/host/nimble/nimble/nimble/host/include/host/ble_uuid.h
./packages/framework-arduinoespressif32-libs/esp32s3/include/bt/host/nimble/nimble/nimble/host/include/host/ble_uuid.h
./packages/framework-arduinoespressif32-libs/esp32p4/include/bt/host/nimble/nimble/nimble/host/include/host/ble_uuid.h
./packages/framework-arduinoespressif32-libs/esp32p4_es/include/bt/host/nimble/nimble/nimble/host/include/host/ble_uuid.h
./packages/framework-arduinoespressif32-libs/esp32c3/include/bt/host/nimble/nimble/nimble/host/include/host/ble_uuid.h
./packages/framework-arduinoespressif32-libs/esp32h2/include/bt/host/nimble/nimble/nimble/host/include/host/ble_uuid.h
./packages/framework-arduinoespressif32-libs/esp32c5/include/bt/host/nimble/nimble/nimble/host/include/host/ble_uuid.h

so the BLE library build fails:

In file included from /home/eigma/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEDescriptor.h:44,
                 from /home/eigma/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLE2901.h:46,
                 from /home/eigma/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLE2901.cpp:43:
/home/eigma/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEUUID.h:65:10: fatal error: host/ble_uuid.h: No such file or directory

[edit] Actually, got it working. It's very hacky for the include paths, but it builds, no changes to NimbleBluetooth, and I have a binary for testing.

b796c55

firmware-tbeam-2.7.23.b796c55.bin.zip

@cpatulea

Copy link
Copy Markdown
Contributor Author

Bluedroid approach recommended by espressif dev:

cpatulea@81b4798

  • Many ifdefs, but maybe it's okay
  • BLEServer::updateConnParams has different signatures - not fixed yet
  • connection handles are different (esp_bd_addr_t vs uint16_t) - not fixed yet

@vidplace7 vidplace7 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this as-is so we can find other ESP32 bugs ❤️
Can always revert if it doesn't pan out in testing.

@vidplace7 vidplace7 marked this pull request as ready for review April 22, 2026 22:33
@vidplace7 vidplace7 merged commit 6847f23 into meshtastic:pioarduino Apr 22, 2026
65 of 71 checks passed
@cpatulea

Copy link
Copy Markdown
Contributor Author

Hahah well all right then :)

@cpatulea cpatulea deleted the pioarduino-tbeam branch April 23, 2026 02:32
@cpatulea

Copy link
Copy Markdown
Contributor Author

firmware-tbeam-2.7.23.b796c55.bin.zip

Report from tester on Discord:

I think it's constantly being reset by the RST or something, but idk if it is just it sleeping and these are verbose logs or if it's actually just in a bootloop. Either way, no meshtastic startup.

rst:0x10 (RTCWDT_RTC_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:0x3f400020,len:331740
ets Jul 29 2019 12:21:46

@cpatulea

Copy link
Copy Markdown
Contributor Author

firmware-tbeam-2.7.23.6847f23.zip

New build with this PR as merged into pioarduino branch, including elf for symbolization if needed.

@mverch67

Copy link
Copy Markdown
Collaborator

I've provided a robot bootloop fix in the pioarduino branch.

@cpatulea

Copy link
Copy Markdown
Contributor Author

firmware-tbeam-2.7.23.e66fcde.zip

New build with robot bootloop fix

@cpatulea

Copy link
Copy Markdown
Contributor Author

e66fcde: boots successfully by Discord tester

message.txt

thebentern added a commit that referenced this pull request May 17, 2026
* Migrate esp32 families to pioarduino platform

* ESP32c6 align text.handler_execute same as C3

* Use pioarduino `develop`

The latest fixes and the latest bugs!

* preliminary esp32p4.ini

* pioarduino: Update LovyanGFX

Includes Manuel's recent commit

* pioarduino 3.3.6

* pioarduino 3.3.6 *release*

chasing the release

* pioarduino: Fix OG ESP32 duplicate libs

* pioarduino: T-Beam 1W CDC mode

* pioarduino: disable network provisioning (wifiprov)

* pioarduino: use legacy esptoolpy naming (forward-compatible)

* Update lovyangfx from `develop` commit to 1.2.19

* fix esp32p4.ini

* check for esp32 w/ wifi

* esp32-p4 specific adaptations

* Switch to meshtastic/esp32_https_server fork (idf5 branch)

* don't ignore esp_lcd

* config for MUI

* fix/workaround SDMMC

* revert a6f6175, update to 3.3.8

* enable esp_hosted for esp32-p4 (experimental)

* Pioarduino 55.03.38-1

* NimBLE-Arduino -> Arduino "BLE" (3.3.x) migration (#10164)

* NimBLE-Arduino -> Arduino "BLE" (3.3.x) migration

* More NimBLE

* Fix Device Name in ATT Read Request (0x2A00).

Device Name is exposed in two places:

- Advertisement data: this is set properly in startAdvertising.
- GATT attribute Device Name (0x2A00). This one is handled internally in NimBLE
  and comes from ble_svc_gap_device_name_set. This is set initially, but then
  BLEDevice::createServer calls ble_svc_gap_init which resets the device name.
  This causes the device to apparently "change name after pairing":

< ACL Data TX:... flags 0x00 dlen 7  #113 [hci0] 14.241149
      ATT: Read Request (0x0a) len 2
        Handle: 0x0003 Type: Device Name (0x2a00)
> ACL Data RX: Handle 2048 flags 0x02 dlen 11             #115 [hci0] 14.269050
      ATT: Read Response (0x0b) len 6
        Value[6]: 6e696d626c65   # "nimble"

Workaround this by setting the device name once again after
BLEDevice::createServer.

* Temporarily lower CORE_DEBUG_LEVEL to INFO to avoid triggering an apparent ESP-IDF Bluetooth bug when re-connecting to Pixel 8 Android devices.

Initial pairing works, but after ESP32 is rebooted, phone fails to reconnect. Meshtastic app shows it as disconnecting immediately. LightBlue shows a more detailed error "Peripheral Connection - Warning: onConnectionStatusChange: status 61" (0x3D - MIC Failure).

Bug report to Espresssif: espressif/esp-idf#18126 (comment)

* Temporarily disable ble_gap_set_data_len, causes crash with Pixel 8 Android reconnect.

Crash looks like this:
  [ 11966][E][BLEAdvertising.cpp:341] setScanResponseData(): ble_gap_adv_rsp_set_data: 22
  [ 11975][E][BLEAdvertising.cpp:1554] start(): Host reset, wait for sync.
  ERROR | ??:??:?? 11 BLE failed to start advertising
  Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

  Core  0 register dump:
  PC      : 0x420e6190  PS      : 0x00060730  A0      : 0x820e158b  A1      : 0x3fce50c0
  A2      : 0x00000000  A3      : 0x3fcb8600  A4      : 0x3fcb85cc  A5      : 0x00000000
  A6      : 0x00000000  A7      : 0x00000c03  A8      : 0x00000000  A9      : 0x3fce50b0
  A10     : 0x0000000e  A11     : 0x00000000  A12     : 0x00000010  A13     : 0x3fce50e0
  A14     : 0x00000c03  A15     : 0x00000001  SAR     : 0x0000001e  EXCCAUSE: 0x0000001c
  EXCVADDR: 0x00000000  LBEG    : 0x400570e8  LEND    : 0x400570f3  LCOUNT  : 0x00000000

  Backtrace: 0x420e618d:0x3fce50c0 0x420e1588:0x3fce5110 0x420dfe87:0x3fce5200 0x420dfefb:0x3fce5220 0x420dff3f:0x3fce5240 0x4219602b:0x3fce5260 0x4037b0e5:0x3fce5280 0x4201edf3:0x3fce52a0

Connection seems fast enough even without this. We'll investigate the
reason for the crash and re-enable once it's safe.

---------

Co-authored-by: Catalin Patulea <cronos586@gmail.com>

* Add extension from pioarduino nag
"Jason2866.esp-decoder"

* Cleanup after merge

* ESP32: Disable classic bluetooth

* Cleanup: Fix ADC channels on new variants

* InkHUD: Fix type casting for message size in saveToFlash method

inkhud compiles again!

* update p4 esp_hosted for BT

* I thought I fixed this

* fix linker error using response file (p4 only)

* fix infinite loop

* Fix Power.cpp check warning

Local variable 'config' shadows outer variable [shadowVariable]

* Build ESP32 original with NimBLE ('custom_sdkconfig' approach). (#10235)

* Re-enable littlefs json manifest

This works locally again :)
Not sure what changed

* Re-add tool-mklittlefs

* sensecap indicator fixes after upgrade arduino-esp & lovyanGFX libs

* hackaday fix

* robot tbeam cache error fix

Co-authored-by: Copilot <copilot@github.com>

* trunk fmt

* ignore trunk

* BLEDevice::deinit() added

Co-authored-by: Copilot <copilot@github.com>

* platformio-custom: Modify mtjson target dependency to prevent fake-success. (#10291)

Co-authored-by: Copilot <copilot@github.com>

* Fix ESP32-C6 linker errors.

Align .text.handler_execute section to 4 bytes and update watchdog timer core mask configuration

Co-authored-by: Copilot <copilot@github.com>

* tlora-c6: Disable Screen

MESHTASTIC_EXCLUDE_SCREEN=1 on tlora-c6.

It doesn't have a screen, and this gets it compiling again (saving flash).

* Use mverch's iram_memset hack for all OG-ESP32

* Refactor watchdog timer initialization and handling

* use adc_channel_t in variant.h

* Fix variant headers

* More idiomatic default ethernet that doesn't break the build

* Elecrows: Delete problematic variant.cpp

Not needed after USE_ETHERNET_DEFAULT

---------

Co-authored-by: mverch67 <manuel.verch@gmx.de>
Co-authored-by: Manuel <71137295+mverch67@users.noreply.github.com>
Co-authored-by: Catalin Patulea <cronos586@gmail.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hardware-support Hardware related: new devices or modules, problems specific to hardware needs-review Needs human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants