Last active
September 11, 2025 12:15
-
-
Save kabakaev/759a3292112225db50b98e2254598793 to your computer and use it in GitHub Desktop.
ESPHome BLE proxy on ESP32-C6 board
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # # This is an esphome configuration file. | |
| # # It is tested on debian-12 and [nanoESP32-C6](https://github.com/wuxx/nanoESP32-C6/blob/master/README_en.md). | |
| # # This configuration should work on any Linux distribution and any ESP32-C6 board though. | |
| # | |
| # # Create and activate python venv, install esphome: | |
| # test -d ./venv || python3 -m venv venv | |
| # source ./venv/bin/activate | |
| # pip install esphome --upgrade | |
| # | |
| # # Connect ESP32-C6 to USB, press and hold "Boot" button, press and release "Reset", release "Boot". | |
| # # Run `sudo dmesg` to find the device name, usually ttyACM0 or ttyACM1. | |
| # # In my case, the message was "cdc_acm 1-4.1.1:1.0: ttyACM1: USB ACM device". | |
| # esphome run --device /dev/ttyACM1 esphome_ble_esp32c6.yaml | |
| # esphome logs --device /dev/ttyACM1 esphome_ble_esp32c6.yaml | |
| esphome: | |
| name: esphome-ble-esp32c6 | |
| platformio_options: | |
| upload_port: /dev/ttyACM1 | |
| framework: espidf | |
| board_build.flash_mode: dio | |
| platform_packages: | |
| - platformio/toolchain-xtensa-esp-elf @ 14.2.0+20241119 | |
| esp32: | |
| variant: esp32c6 | |
| board: esp32-c6-devkitc-1 | |
| framework: | |
| type: esp-idf | |
| version: 5.3.1 # https://github.com/espressif/esp-idf/releases/tag/v5.3.1 | |
| platform_version: 6.9.0 # https://github.com/platformio/platform-espressif32/releases/tag/v6.9.0 | |
| sdkconfig_options: | |
| # CONFIG_ESPTOOLPY_FLASHSIZE_8MB: y | |
| CONFIG_ESPTOOLPY_FLASHSIZE_DETECT: y | |
| COMPILER_OPTIMIZATION_SIZE: y | |
| bluetooth_proxy: | |
| active: true | |
| network: | |
| enable_ipv6: False | |
| # Enable logging | |
| logger: | |
| # Enable Home Assistant API | |
| api: | |
| encryption: | |
| key: !secret home_assistant_api_password | |
| reboot_timeout: 300s | |
| ota: | |
| platform: esphome | |
| password: !secret ota_password | |
| wifi: | |
| networks: | |
| - ssid: !secret wifi1_ssid | |
| password: !secret wifi1_password | |
| - ssid: !secret wifi2_ssid | |
| password: !secret wifi2_password | |
| sensor: | |
| - platform: uptime | |
| type: seconds | |
| name: Uptime Sensor | |
| entity_category: diagnostic | |
| - platform: internal_temperature | |
| entity_category: diagnostic | |
| name: "Internal Temperature" | |
| time: | |
| - platform: sntp | |
| id: sntp_time | |
| timezone: Europe/Berlin | |
| servers: | |
| - 0.pool.ntp.org | |
| - 1.pool.ntp.org |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wifi1_ssid: wifi-2ghz | |
| wifi1_password: cannotRememberThePassword | |
| wifi2_ssid: backup-wifi | |
| wifi2_password: neitherOfThose | |
| mqtt_host: 10.11.12.13 | |
| mqtt_username: esphome | |
| mqtt_password: howAboutThat | |
| api_password: dontEvenTryToGuess | |
| ota_password: dontEvenTryToGuess | |
| home_assistant_api_password: Y2hhbmdlbWV0b3NvbWV2ZXJ5bG9uZ3N0cmluZw== | |
| web_server_auth_username: admin | |
| web_server_auth_password: howCanPeopleRememberSoManyPasswords | |
| latitude: 11.111111 | |
| longitude: 9.999999 |
Author
This was a HUGE help. Thank you! Any possibility of getting wifi 6 (802.11ax) in there? Several of mt BT proxies are in fringe areas, which is why I bought the C6. I've been messing with lambda calls to esp_wifi_set_protocol for a couple of hours but I suck at coding and can't get it going. Thanks again!
Author
I tried to enable 802.11ax on esp32-c6, with both esphome and bare ESP-IDF, to only find that my Unifi U6 Lite does not support 11ax on 2.4GHz.
I'd suggest to check your access point specs first.
If yours have 11ac chip on 2.4GHz too, then it may worth playing with access point settings such as transmit power and channel number. Also, the narrow 20MHz channel width should give slightly longer range than 40MHz.
Can you please provide the code?
Already on a 20Mhz channel (with no other wifi or zigbee near it) and tried
on high power when I was setting it up. U7 Pro Wall here, so it supports
it.
…On Thu, May 22, 2025 at 4:47 PM Alex Kabakaev ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
I tried to enable 802.11ax on esp32-c6, with both esphome and bare
ESP-IDF, to only find that my Unifi U6 Lite does not support 11ax on
2.4GHz.
I'd suggest to check your access point specs first.
If yours have 11ac chip on 2.4GHz too, then it may worth playing with
access point settings such as transmit power and channel number. Also, the
narrow 20MHz channel width should give slightly longer range than 40MHz.
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/kabakaev/759a3292112225db50b98e2254598793#gistcomment-5589878>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXMZGZUC2H3QQECK2AAZ7NL27YZWBBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTGNJXGA4TSMRQU52HE2LHM5SXFJTDOJSWC5DF>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
API Token is not base64 encodederror means that the value ofapi.encryption.keyin line 51 above is not a valid base64 encoding.Most probably, you need to create a
secrets.yamlfile in the same folder, and define the values referenced with!secretprefix.I've updated the gist. See the
secrets.yamlexample above.Then, in Home-Assistant, when you add an
esphomedevice, you'll be asked to enter the base64-encoded passwordY2hhbmdlbWV0b3NvbWV2ZXJ5bG9uZ3N0cmluZw==or whatever you put there.