logo elektroda
logo elektroda
X
logo elektroda

OpenESP32-C3 Bluetooth testing for OpenBeken as BT Coordinator

DeDaMrAz 963 32
ADVERTISEMENT
  • #31 21852129
    insmod
    Level 31  
    Cleaned up a little and added LN882H support (rssi is bugged, enabling powersave 2 will break bt until reboot)

    Current initialization sequence
    BTInit
    BTSetWindowInterval [window ms] [interval ms] (optional)
    BTSetScanMode [isActive] (optional)
    BTStartScan
    startDriver ESPHomeAPI

    ESPHomeAPI can be started without BTInit, but then it won't expose itself as proxy.

    @divadiow do you wish to check it?
    Just add the esphome device by ip in HA.
  • ADVERTISEMENT
  • Helpful post
    #32 21852673
    divadiow
    Level 38  
    something's happening. Tuya TH05 nearby
    Network graph with central node “OpenLN882H…” linked to “Home Assistant” and many MAC-address nodes
    Screenshot of OpenLN882H device page showing Bluetooth info and empty Controls and Logbook sections
    ESPHome dashboard screenshot showing LN882H device info with Controls, Connected devices, and Logbook panels

    Code: Text
    Log in, to see the code
  • #33 21857230
    insmod
    Level 31  
    Found my TLSR sensor. Flashed pvvx ATC firmware and enabled long range.
    BK7238 and LN882H can get advertisements on coded channels, RTL8720C/D can't.
    BK7231N most likely can too.

    Made it so advertisements are passed immediately to HA, because i got some advs on BK7238 with 96 bytes length.
    In esphome protocol - the limit is 62 bytes, but i saw no warnings in HA.
    This also frees some heap reserved for buffer.

    Still no nanopb.

    Enabled PSRAM on RTL8720D in a way that would work on chips without PSRAM. Mapped into heap If it's present.

Topic summary

The discussion centers on Bluetooth testing using the ESP32-C3 as a Bluetooth coordinator for the OpenBeken project. The implementation is based on the bluedroid stack, chosen for compatibility with ESPHome and ease of integration. Challenges include differences in ESP-IDF versions, Bluetooth 4.2 versus Bluetooth 5 and BLE support, and build environment issues such as parsing errors in partitions.csv and Docker build bugs. A working solution has been developed and is available on a GitHub fork, though the code requires cleanup. The conversation also covers coexistence settings between WiFi and Bluetooth, with coexistence ratios like 40% WiFi and 60% Bluetooth discussed. Binary sizes for the RTL8720D platform are noted, with builds around 1053kb without Berry and 1157kb with it. Build system limitations for the RTL8720D, such as the inability to use parallel make (-j), are mentioned. There is interest in adapting the ESPHome API as an alternative to MQTT for communication. Overall, the thread highlights practical issues and solutions in integrating Bluetooth proxy functionality on ESP32-C3 and RTL8720D platforms within the OpenBeken ecosystem.
Summary generated by the language model.
ADVERTISEMENT