Hi,
Bought a couple of Atom S3Lite.
Programmed these as BlueTooth Proxies, and they are found nicely in HA.
Now the question, can these only proxy ESPHome traffic or should they proxy all kind of BlueTooth traffic?
//Ase
Hi,
Bought a couple of Atom S3Lite.
Programmed these as BlueTooth Proxies, and they are found nicely in HA.
Now the question, can these only proxy ESPHome traffic or should they proxy all kind of BlueTooth traffic?
//Ase
Not sure what you mean by this. Any BT traffic for HA is proxied by them. Make sure and set active to true in the YAML if you need it to act as a proxy for a BT device that requires an active connection (versus something passive like a temperature sensor that just broadcasts it’s data in the open).
Thanks for reply,
What I try is to get some LD2410 BLE to connect thru these proxies because of the distance.
Code is as below on the Atom S3Lite:
esphome:
name: atom-s3-lite_1-2
friendly_name: Atom S3 Lite 1-2
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "REMOVED"
# Over the Air Updates
ota:
password: "REMOVED"
# Wifi Setup
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Bluetooth Proxy
esp32_ble_tracker:
scan_parameters:
interval: 1100ms
window: 1100ms
active: true
bluetooth_proxy:
active: true
Not familiar with those, but if they require an active connection, you need to set the proxy part to active, not the tracker:
bluetooth_proxy:
active: true
I’ll also mention that in my experience, the ESP needs to be fairly close compared to the BT dongle I have physically connected to my HA instance (at least for active connections). I can get halfway across the house with the dongle versus the ESP needs to be in the same room. For passive I can get a little better range.
Think LD2410 is passive, but get no distance help with the 2 Atom proxys.
bluetooth_proxy:
active: true
is in my code, any other ideas?
Can I someway see if anything is connected to the proxys?
Notice the giant red warning at the top. Not sure if it’s the root issue, but changing to the esp-idf framework is recommended.
Also, you seem to be using non-recommended ble tracker scan parameters as seen further down that same page:
“For WiFi-based proxies, changing the interval or window from their default values may result in an unstable WiFi connection. Using the default values for interval and window will usually resolve any instability.”
Edit: also make sure you flash via USB after changing the framework.
Thanks,
Missed that HUGE red note, trying it now.
Why USB flash, wiresly seems working (still programming)?
Update failed, will try USB now.
Because it’s making changes to the underlying firmware (or whatever the correct terminology is) that provides the ability to do OTA updates as well
That fails as well
Strange,
Chaning platform to esp-idf fails the build.
Tried back to Arduino and compilation worked fine…
Maybe try clean build files? Pretty sure I’ve had to do that everytime I’ve switched.
Tried back to esp-idf with same errors, lot of "undified reference to…
How to clean build files?
It’s in the 3 dot menu for the device on the ESPHome page.
Sadly no difference, same failures
Linking /data/atom-s3-lite-1-2/.pioenvs/atom-s3-lite-1-2/firmware.elf
/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: /data/atom-s3-lite-1-2/.pioenvs/atom-s3-lite-1-2/src/esphome/components/esp32_ble_client/ble_client_base.o:(.literal._ZN7esphome16esp32_ble_client13BLEClientBase7connectEv+0x8): undefined reference to `esp_ble_gattc_open'
/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: /data/atom-s3-lite-1-2/.pioenvs/atom-s3-lite-1-2/src/esphome/components/esp32_ble_client/ble_client_base.o: in function `esphome::esp32_ble_client::BLEClientBase::connect()':
/config/esphome/.esphome/build/atom-s3-lite-1-2/src/esphome/components/esp32_ble_client/ble_client_base.cpp:66: undefined reference to `esp_ble_gattc_open'
/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: /data/atom-s3-lite-1-2/.pioenvs/atom-s3-lite-1-2/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.o:(.literal._ZN7esphome17esp32_ble_tracker15ESP32BLETracker9stop_scanEv+0x8): undefined reference to `esp_ble_gap_stop_scanning'
/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: /data/atom-s3-lite-1-2/.pioenvs/atom-s3-lite-1-2/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.o:(.literal._ZN7esphome17esp32_ble_tracker15ESP32BLETracker11start_scan_Eb+0x10): undefined reference to `esp_ble_gap_set_scan_params'
/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: /data/atom-s3-lite-1-2/.pioenvs/atom-s3-lite-1-2/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.o:(.literal._ZN7esphome17esp32_ble_tracker15ESP32BLETracker11start_scan_Eb+0x14): undefined reference to `esp_ble_gap_start_scanning'
/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: /data/atom-s3-lite-1-2/.pioenvs/atom-s3-lite-1-2/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.o: in function `esphome::esp32_ble_tracker::ESP32BLETracker::stop_scan()':
/config/esphome/.esphome/build/atom-s3-lite-1-2/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp:234: undefined reference to `esp_ble_gap_stop_scanning'
/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: /data/atom-s3-lite-1-2/.pioenvs/atom-s3-lite-1-2/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.o: in function `esphome::esp32_ble_tracker::ESP32BLETracker::start_scan_(bool)':
/config/esphome/.esphome/build/atom-s3-lite-1-2/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp:257: undefined reference to `esp_ble_gap_set_scan_params'
/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: /config/esphome/.esphome/build/atom-s3-lite-1-2/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp:260: undefined reference to `esp_ble_gap_start_scanning'
/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: /data/atom-s3-lite-1-2/.pioenvs/atom-s3-lite-1-2/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.o: in function `esphome::esp32_ble_tracker::ESP32BLETracker::loop()':
/config/esphome/.esphome/build/atom-s3-lite-1-2/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp:168: undefined reference to `esp_ble_gap_stop_scanning'
/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: /config/esphome/.esphome/build/atom-s3-lite-1-2/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp:186: undefined reference to `esp_ble_gap_stop_scanning'
collect2: error: ld returned 1 exit status
*** [/data/atom-s3-lite-1-2/.pioenvs/atom-s3-lite-1-2/firmware.elf] Error 1
========================= [FAILED] Took 494.83 seconds =========================
Someone smarter than me might be able to identify the issue. I’m wondering if it’s not compatible with the specific ESP variation you’re specifying (I’ve only ever used generic ESP development boards).
Ben, Thanks a lot!
Great support, so much appriciated!
Lets see if someone else can pitch in?
Was not able to figure out the esp-idf issue.
Went back to Arduino and posted some questions here:
A couple of additional thoughts:
As I mentioned before, the interval and window scan parameters you are using are not the defaults and the documentation explicitly says not to change them from the defaults UNLESS you are using ethernet with the ESP device. I’m guessing this isn’t your root issue, but I can’t see it helping either.
While I’m guessing you might lose some additional ‘features’ of the S3 chip, I would try specifying a generic ESP32 Development board in your YAML and see if it compiles successfully. This is what I use on all my ESP32 boards (although in my case, they ARE just standard development boards). It might be that the specific board variation you are using hasn’t been setup/optimized to use BT Proxy properly.
esp32:
board: esp32dev
framework:
type: esp-idf
I would also suggest ONLY flashing via USB until you get it working to make sure that it fully makes any changes that might not be possible via OTA.
If none of that works, then yeah, I’m out of ideas.