Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32-S3 wiki update suggestion #394

Open
chrisgow opened this issue Nov 19, 2024 · 4 comments
Open

ESP32-S3 wiki update suggestion #394

chrisgow opened this issue Nov 19, 2024 · 4 comments

Comments

@chrisgow
Copy link

Tl;dr The esp-idf framework does not appear to work with these boards. Stick with arduino. All other settings seem to work ok.

After a little experimentation and some frustrations, I have been able to get a handful of ESP32-S3 devices flashed and working with Bermuda 🎉. I've had one S3 running with Bermuda for a few months and I recently decided to add a few more around the house to improve detection. From the time I flashed my first device to my latest devices some documentation has been updated which suggests to use the esp-idf framework. Every time I tried using that framework I was never able to wirelessly connect to the devices after the initial install. I thought this might be useful information to add to the wiki.

@agittins
Copy link
Owner

Hi Chris! Thanks for letting me know what you've found.

I don't have any S3 chips myself, so I'm reliant on other reports at this stage. I notice that the esphome ready-made bluetooth proxy configs also use esp-idf for the m5stack-atom-s3, but they do specify some versions on the framework, I don't know if that might be relevant: https://github.com/esphome/bluetooth-proxies/blob/main/m5stack/m5stack-atom-s3.yaml

The arduino framework is definitely sub-optimal for ble proxies, but if it works and esp-idf doesn't it makes it an easier choice :-) that said, ESPHome recommends esp-idf for the esp32-s3.

When you flashed with esp-idf, did you do the update OTA or via usb connection? It may be worth trying a direct USB connection if you haven't already (it allows esphome to repartition the flash for extra space the BT stack can use). What exact yaml did you use?

I know there is a lot of older info around that just says the s3's don't work, but the esphome bt stack has come a long way in the last year, plus bad config advice is everywhere! I just don't want to add to the out-dated advice out on the web if I can help it, but having accurate info would be really good.

Could you share the exact yaml you tried?

@chrisgow
Copy link
Author

I tried both OTA and via usb connection and I had more luck with the usb connection so I just stuck with that. The yaml I attempted to flash is below which is a combination of the esphome wizard and the ble configuration I used on an older S3 proxy (that also uses the arduino framework):

esphome:
  name: livingroom-bermuda
  friendly_name: livingroom-bermuda

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: esp-idf

# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:
  password: ""

ota:
  - platform: esphome
    password: ""

wifi:
  ssid: "super-secret"
  password: "thepassword"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Livingroom-Bermuda"
    password: "yz61CdtkDqSh"

captive_portal:

bluetooth_proxy:
  active: true  

esp32_ble_tracker:
  scan_parameters:
    active: True # Whether to send scan-request packets to devices to gather more info (like devicename)
    interval: 320ms # suggested 211ms # default 320ms
    window:   300ms # suggested 120ms # default 30ms

@giulianob
Copy link

I'm using the Lolin S3 Mini fine with esp-idf. You might not be specifying the right platform options for your device. For mine, I have to either specify a newer esp-idf version that includes support for lolin_s3_mini or manually configure it like this. The flash_mode option is important:

esphome:
  name: lolin-s3-mini-test
  friendly_name: lolin s3 mini test
  platformio_options:
    board_build.arduino.memory_type: qio_qspi
    board_build.flash_mode: dio
    board_upload.ram_size: 327680
    board_upload_maximum_size: 4193404
    board_upload_speed: 460800
esp32:
  flash_size: 4MB
  variant: esp32s3
  board: esp32-s3-devkitc-1
  framework:
    type: esp-idf

@agittins
Copy link
Owner

agittins commented Dec 2, 2024

@giulianob that's great, thanks!

@chrisgow did you have any luck using those settings?

If you're still having trouble, can you try this as your entire yaml:

esphome:
  name: livingroom-bermuda
  friendly_name: livingroom-bermuda

esp32:
  board: esp32-s3-devkitc-1

packages:
  Bermuda.esp32: github://agittins/bermuda-proxies/packages/bermuda-proxy-esp32-s3-minimal.yaml


# Enable Home Assistant API
api:
  password: ""

ota:
  - platform: esphome
    password: ""

wifi:
  ssid: "super-secret"
  password: "thepassword"

This will pull the config from a repo I've set up, which includes the dio and other options known to be needed and to work with the S3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants