Configuring my ESP32-Wroom-32

Hi!
I am actually opening a new thread because maybe my problem is not related. So let’s start from scratch: I have a ESP32 device which I want to use as a bridge between BT devices and wifi to access Home Assistant.
So I installed ESPhome on HA (on a rpi) and my ESP32 is always offline. As least now it says FF is not supported and I need to use Chrome. Using Chromium, I select Install - Plug into this computer. It shows me CP2104 USB to UART Bridge Controller (ttyUSB0) - Paired. I select it and click Connect. And nothing happens after that.

Any idea what I am missing?

Thank you.
Fred

Some ESP32s require a specific boot sequence:

2 Likes

I run Fedora. Does the button pressing work as well with HA? I didn’t touch any button at all.

Thank you.

It has nothing to do with your operating system. It’s how some esp boards are put into boot loader mode.

You have to put the ESP32 into flash mode by pressing the button while you insert the USB cable to the PC.

It depends on what board you use. There are a lot of different ESP32 boards out there, and most of them need the button press.

But your story doesn’t add up, as you say it’s “offline”. How can that be, if you haven’t flashed it already? Maybe you give us some more deatils, about what board you use, and what (and how) you have done already. :slight_smile:

Hi Patrick!

My story is what it is… indeed I can’t manage to do anything with the board so far and indeed HA tells me it’s offline (though it’s “paired”). This is just what I am seeing. I’m not lying about any of it, I swear :wink:

So the board has actually 2 little buttons on each side of the micro USB port. I thought I downloaded the manual but I’m not convinced it is the right one, considering it’s not mentioning those 2 buttons and their use.

What’s written on the main IC is Espressif - ESP32-WROOM-32. Then on the board itself, if it’s useful, there is also ESP32 DEVKIT WIFI+BLE .

So … which button should I press when connecting the USB cable and flashing it from HA?

As for tom_i, the text intro starts with "are you runnning Windows on your laptop… ", so it seems to be a OS specific solution. That is how I understood it.

Thank you very much for your help.

Fred

This is a 38-pin board and GPIOs are labeled P21, P22, P23 … Two buttons next to micro USB labeled EN and IO0?

No, no, that wasn’t meant offensive, and I wouldn’t say you’re lying. It’s more of a “something seems not right”, where is the error? :wink:

Let’s try this with a fresh start. :slight_smile: So you have an ESP32 board, from your description it should be a dev board. Can you post a link from where you got it? Otherwise can you make a pic? I’m often using these boards, does that look like yours (sorry, only a german speaking link, just work with the pics :wink: )?

Next point. :slight_smile: If you say it’s paired, what do you mean by that? That needs a little more detail, mostly about your environment. You’re running HA how? Venv, HassOS, supervised? :slight_smile:

And ESPHome is installed as addOn or as a standalone version?

How did you get the ESP flashed the first time? It needs to be flashed, otherwise it will no work.

Let’s see, what you answer, depending on that we have a few possibilities to move on. :slight_smile:

And one last note: I think you’re mixing things here. You have HA (rPi), ESPHome (same rPi), an UART dongle (CP2104) and your ESP32 board. The only thing I could see as paired is the UART dongle…

:slight_smile:

Ignore that and read the next bit.

It can be tricky to get ESP32s into boot mode.
i) Power on / connect the ESP
ii) Start the flash tool connecting
iii) Press and hold both buttons on the ESP board
iv) Release the EN button while continuing to hold the IO0 button
v) When the flash tool discovers the device you can release the IO0 button.

2 Likes

Nope… but thank you for the comment as one button is labeled En and the other one… “BOOT”! GPIO is 38 pins but lablelling is GND, RXD, IOxx, SDxx, SVP, SUN, RST, etc - xx being a number.

Maybe the Boot button is the one to press! Yeah!

I’m only going to say this one more time.

No issue at all Patrick, I know between languages (English not being my native language) and tech issues (likewise) it sometimes gets your hair all up! I don’t have much hair… so it’s not up :wink:

So looking at the photo, the smaller chips are differents, layout etc… labeling as well. Unfortunately as I couldn’t get one all by myself, I had to ask my sister to get it for me. Not sure where she got it from (Taobao in China I’d say).

Here is the photo:

Now I am running HA on a Raspbery Pi 4, and ESPhome as an add-on. I did not flash anything as this ‘hit’ me from the start.

When attempting to flash from ESPHome add-on, ESPhome offers a few options, one being having the ESP32 connected to your pc/laptop. When I select this option I get this popup:

So from my understanding the PC detects the board somehow but…

Hopefully I clarified all the missing details.

Thank you everyone for the help.

YOU. HAVE. TO. PUT. THE. ESP. BOARD. IN. BOOT. LOAD. MODE.

1 Like

Ah, I see. That is the usual suspect of ESP32 dev board. :slight_smile:

Now I (hopefully) get what you’re doing. :wink: Your problem is rather simple, these types of ESP boards don’t need any kind of flashing dongle, they just run of the micro USB that is attached to them. Your CP2104 would be needed if you want to flash a standalone chip (without the dev board). :slight_smile:

I would advise the way described below, if you want to flash any ESPxx dev board. If you have a standalone chip, other ways would be better, but that’s not the point here.

In your picture, choose the last possibility to manually download the *.bin to your computer. I assume that is some kind of pc/laptop, just not the Pi you are running your HA instance on.

Let ESPHome compile and in the end, it will offer you to download to your PC/laptop. Do so and safe the *.bin file somewhere. Go to Releases · esphome/esphome-flasher · GitHub and download the release for your platform (the PC/laptop, not the rPi!).

Now comes the hard part, as you might need a third hand :smiley: Plug a USB cable into your dev board, open the ESPHome-flasher, wait a few seconds, choose the downloaded *.bin file, and now comes the magic…push and hold the “boot” button on your dev board while you plug in the USB cable to your PC/laptop. While still holding your “boot” button, refresh the com port in ESPHome-flasher and choose the one provided. Click “flash ESP” and watch the log that comes up. If the ESP get’s connected (takes normally one or two seconds), this is the time, when you can let the button go. :smiley:

After a few seconds you will see the log expanding and then go back and deleting the lines from down to up. If all went well, ESPHome-flasher will tell you that everything is good to go. Unplug your ESP and plug it in with your normal power source.

The next time the ESP should be reachable by OTA (Over-the-air), so this is only a first run procedure with every dev board. :slight_smile:

Why I advise this way? Normally the HA instance on the rPi is not very comfortable to use while you have to plug things in and need to hold the boot button. It is just a way to easily use your PC/laptop on a table or wherever. :slight_smile:

Just to note: if you would want to flash the ESP dev board from the HA rPi, the same applies. The dev boards don’t need a dongle. You’d need to find out, which USB port is used for your USB cable and then push the button until everything starts.

Long text, let us know, how it turns out! :slight_smile:

Do you really need to shout at people?

1 Like

Only when they are deaf or not listening.

Ok, so I tried… but there is no release for my platform on Github. The Ubuntu version doesn’t work with GNOME 40 and the latest libraries.
I tried flashing using HA interface from my laptop but either pressing 1, 2, releasing some buttons at some points but never managed to do anything successful.

On the ‘not sure side’ when plugging the board, I don’t see anything paired any longer. The board led flash the same ways though. Is this a good thing or a bad thing?

Thank you for your help and patience.

Fred

  1. Hold down the BOOT button first
  2. then plug it in your computer
  3. select the option from that pop up and hit connect
  4. then wait till it’s saying Preparing… and you can let go of the button

Thank you for the very clear instructions. Unfortunately I no longer have the ttyUSB0/CP2104 option. Is there anyway to ‘reset’ the board, or a full technical documentation of how it operates somewhere?

Thank you.

Fred

Found ESP32-DevKitC V4 Getting Started Guide - ESP32 - — ESP-IDF Programming Guide latest documentation

Let’ s see if I can manage that…