ESP32-C3 Bluetooth Proxy invalid header: 0xffffffff

Hi all,

i get an error when loading Bluetooth proxy on the ESP32-C3.

I know website says “This option only works for “plain” ESP32 and not for ESP32-C3 or other variants.”, but it is not clear if there is HW limitation or board not supported yet.

The error is invalid header: 0xffffffff which seems to mean that the data is not written onto ESP32-C3.

esphome:
name: esp32ble-proxy-131
platformio_options:
board_build.f_flash: 40000000L
board_build.flash_mode: dio
board_build.flash_size: 4MB

esp32:
board: esp32-c3-devkitm-1
framework:
type: esp-idf
variant: ESP32C3

Cheers

Not sure if you answered your own question. If they say it doesn’t work on ESP32-C3 then…

I was able to make it work. Seems ESPHomeFlasher (i prefer to use as it is very stable and using for years now) has a problem with ESP32-C3 as it writes from 0x00001000 (not sure how it handles boot loader).

Using browser based HomeAssistant ESPHome built in tool it works, it writes from 0x000000 and creates proper bootloader.

Config snippet in case someone else faces install or build problems (BLEProxy requires CONFIG_BT_BLE_42_FEATURES_SUPPORTED) :

esphome:
  name: esp32ble-proxy-131
  platformio_options:
    board_build.flash_mode: dio

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y
  variant: ESP32C3

[12:32:26][C][esp32_ble_tracker:793]: BLE Tracker:
[12:32:26][C][esp32_ble_tracker:794]: Scan Duration: 300 s
[12:32:26][C][esp32_ble_tracker:795]: Scan Interval: 320.0 ms
[12:32:26][C][esp32_ble_tracker:796]: Scan Window: 30.0 ms
[12:32:26][C][esp32_ble_tracker:797]: Scan Type: ACTIVE
[12:32:26][C][esp32_ble_tracker:798]: Continuous Scanning: True
[12:32:26][C][bluetooth_proxy:167]: Bluetooth Proxy:

2 Likes

I’m running a bluetooth proxy on a DFRobot Firebeetle 2 with a ESP32-WROOM-32E so I think this is too broad a statement to say “only plain” but C3 seems explicitly named to be incompatible. The OP got it flashed and running, lets see if it is also actually working.

Nothing here Bluetooth Proxy — ESPHome says bluetooth_proxy doesn’t work on a c3.

But it does say C3 won’t work with the generic profile here:

Yes I know, because the firmware downloadable from that page is compiled for esp32. @nymare has compiled for c3.

Moved further discussion - Device discovery issue into new Topics as this one (Flashing ESP32-C3 is Solved).

I found this topic after having issues configuring Bluetooth Proxy on LOLIN C3 Pico.

But the code found here would not work for me.
In the end I managed to get it to work, sharing here for others:

esphome:
  name: "esp32-xxxx"
  platformio_options: 
    board_build.flash_mode: dio 
    
esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: esp-idf
    sdkconfig_options: 
      CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y 
      CONFIG_BT_BLE_50_FEATURES_SUPPORTED: y
      CONFIG_ESP_TASK_WDT_TIMEOUT_S: "10" 
      variant: ESP32C3

ota:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esphome-Web-xxxx"

esp32_ble_tracker: 
  scan_parameters: 
    active: true 

bluetooth_proxy: 
  active: true 

Adding

esp32_ble_tracker: 
  scan_parameters: 
    interval: 1100ms 
    window: 1100ms 

results in board loosing all connectivity - it cannot connect to wifi and I cannot connect to the fallback hotspot.

Credit goes to digiblur for the extra lines needed.