ESP32 board Wifi problem

I have a couple of these ESP32 boards:
https://www.dfrobot.com/product-1798.html

They have problems conneting to Wifi. Most of the time they won’t connect at all, but every now and then they do. And even then, they react very slow (I put a switch in the sketch to toggle the onboard LED).
I’ve tried 2 different devices and they both have the same problem. I’ve also tried many different settings inside the sketch. manual_ip, power_save_mode: none, fast_connect: true/false, various board types. So far, nothing helps.

In the past I’ve used Arduino sketches on these boards, and these worked fine with Wifi.

(When I use ESP8266 boards, they work just fine.)

This is the basic sketch:

esphome:
  name: ir-remote

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: "dde33969d5956d7fe1d05f981ac4fa20"

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Ir-Remote Fallback Hotspot"
    password: "rSZIZoN1fFzz"

captive_portal:

# Enable Web
web_server:
  port: 80
  
  
light:
  - platform: binary
    name: "LED"
    output: light_output

output:
  - id: light_output
    platform: gpio
    pin: GPIO02
    inverted: false      

I just got 2 fire bettle 2’s. I had it connected for short periods without any noticeable problems. There is an entry for firebeetle in the esp board type. Idk if that will make a difference.

esp32:
  board: firebeetle32
  framework:
    type: arduino

Insufficient power supply?
Though that would be hard to imagine :grin:

I’ve tried the firebeetle32 board. It seems to connect a little better, but it’s hard to say. It still doesn’t work very well. The LED toggle switch is responding very slowly, it at all.

Update over Wifi always fails halfway:

They mention someting about GPIO02. That’s the LED.
Just to be sure I’ve removed that stuff from the sketch, but it didn’t help.

I get a strong feeling that this board is just poorly supported by esphome. Am I the only one having trouble with it?
Like I said: the boards have run fine with regular Arduino sketches.

Hi ,

Although its is not a solution but it is a simple way to verify if the MCU wifi is having an issue

Assuming the MCU is close to your router , if possible then try to flash directly from ESPhome-flasher ( the window based ) with a ready made firmware to test the wifi ? Try to test outside HA ESPhome If the MCU is for testing only then try something like WLED . it flashes quickly and then you would have access to WIFI right away to test it

I faced same issue with one MCU and it turn out SSID had a typo error with capital letter in the SSID name

Also if you connect the MCU to ESPhome-flasher and press view log , do you see anything related to wifi ?

cheers

I know this is an old post, but for anyboby using the search function …

If you have wi-fi issues when using a module with onboard PCB antennas … do you have it on a breadboard or perfboard ?

Breadboards have metal traces internally connecting the tie points (holes); and other perfboards/protoboards also contain metal for the components to solder to. Radio signals are reflected by metal, making it harder for the board to receive and broadcast clean signals.

The easiest trick is to locate the ESP at the end of the breadboard, so that the antenna is sticking out from the end, like