How To: DFRobot FireBeetle 2 ESP32-E (DFR0654) Installation Advice

Problem

Having recently purchased a DFRobot FireBeetle 2 ESP32-E (ESP32-WROOM-32E) with part number DFR0654, I encountered a few issues after following the installation instructions on DFRobot's Wiki.

Product page: FireBeetle 2 ESP32-E IoT Microcontroller - DFR0654 | DFRobot Electronics
DFRobot's installation instructions: FireBeetle_Board_ESP32_E_SKU_DFR0654-DFRobot

The two main problems I encountered were being unable to join a WiFi network which had a % symbol in the password and I was unable to use the WiFiManager library GitHub - tzapu/WiFiManager: ESP8266/ESP32 WiFi Connection manager with web captive portal as the esp_wifi_set_country_code method was not declared.

DFRobot's instructions tell you to add the following board manager URL in the Arduino IDE preferences: http://download.dfrobot.top/FireBeetle/package_DFRobot_index.json, then install "FireBeetle-ESP32 Mainboard" in the Boards Manager and select the "FireBeetle ESP32-E" board:

But I found that the ESP library used by this is out of date (at least at the time of writing this).

Solution

Instead I added Espressif's URL to File > Preferences > Settings > Additional boards manager URLs: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json Then using Tools > Board > Boards Manager I installed "esp32 by Espressif Systems" and finally selected Tools > Board > esp32 > FireBeetle 2 ESP32-E as my board:

However, at the time of writing this, there is small problem with this library too (v2.0.7) but it can be easily fixed. When I tried to upload a sketch to my board for the first time I got the following error:

Property 'upload.tool.serial' is undefined

The solution is to open the following file (on Windows, sorry I don't know the location on other OSes):

C:\Users\**YOUR_USERNAME**\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.7\boards.txt

Then search for the following line:

dfrobot_firebeetle2_esp32e.upload.tool=esptool_py

and replace it with:

dfrobot_firebeetle2_esp32e.upload.tool.serial=esptool_py

(Credit and thanks to ptillisch for this fix: Xiao boards: "Property 'upload.tool.serial' is undefined" - #6 by ptillisch)

Additional Note

The FireBeetle 2 doesn't have a boot button like some ESP32 boards. At first I found myself unable to upload a sketch to the board without connecting A0 to GND. I also found that I had to press the reset button at precisely the right moment for the sketch to upload, which took a bit of practice. Strangely though, after soldering headers to my board it randomly started uploading without needing to ground A0 or having to press reset. I now just press upload and I'm done. It doesn't make sense to me that soldering headers would make any difference so I can only assume I did something else without realising to fix this, but if you're unable to upload to your board connecting A0 to GND and pressing reset just as the upload is about to begin may help.

3 Likes

I was getting the 'upload.tool.serial' error, glad i found your howto.

But with this error out of the way, i am still having some issues getting the blink example uploaded, getting the following error:

Sketch uses 235905 bytes (17%) of program storage space. Maximum is 1310720 bytes.
Global variables use 22056 bytes (6%) of dynamic memory, leaving 305624 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.5
Serial port COM7
Connecting......................................

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Failed uploading: uploading error: exit status 2

Tried disconnecting everything, but it made no difference. I also tried connecting A0 to GND, also made no difference.

Unfortunately I'm a complete beginner, so may not be able to help, but I'll give it my best shot. Otherwise I'd suggest creating a new topic with your problem as more experienced people are more likely to find it.

Espressif's website says the following for this error:

Esptool didn’t receive any byte of data or a successful slip packet. This error usually implies some kind of a hardware issue. This may be because the hardware is not working properly at all, the RX/TX serial lines are not connected, or because there is some problem with resetting into the download mode.

What I do know is that the TX, RX and D5 pins are used for USB communication. TX and RX are also 'occupied' when using USB power according to DFRobot's Wiki: https://wiki.dfrobot.com/FireBeetle_Board_ESP32_E_SKU_DFR0654#target_5 (see the second table under Pinouts). If you have anything connected to these pins, try disconnecting it. I'd recommend disconnecting everything and trying to upload a sketch with nothing attached.

If your FireBeetle is on a breadboard, try removing it to make sure no pins have been accidentally connected.

If you have soldered headers on the board check that no pins have been accidentally connected to each other. And if you used flux when soldering (or if your solder contains flux) try cleaning off the board with isopropyl and a cotton swab (use a bottle intended for electronics in case there are other ingredients).

Check Device Manager on your computer (assuming it's Windows - I can't advise for other OSes) and make sure the board is detected as "USB-SERIAL CH340K", otherwise you might need to install the correct driver from Espressif's website.
image

Make sure you have the correct COM port selected, also via Device Manager (You can see mine is COM6 in the pic above).

Try a different USB cable and port.

I remember seeing someone mention issues when using USB 3.X (which USB C uses). If you have a USB A to C cable (or adapter) try using a USB 2 port (you can usually tell the difference because most USB 3 ports have blue plastic inside the connector).

If possible, try a different computer.

That's all I can think of for the moment. Hope it helps and good luck.

Hey, thanx for trying to help out :wink:
Things i tried:

  • disconnecting everything
  • i checked all the soldering under a strong magnifier, and all the soldering are very clean
  • in the device manager, i see USB-SERIAL CH340K (COM7)
  • i dont have another cable, but i have used this cable to program a Wemos D1 mini v4 without any problems
  • connecting to yellow USB2 port

Still getting same error.

Hi @myusernameistaken. Please try this:

  1. Select Sketch > Upload from the Arduino IDE menus.
  2. Watch the black output panel at the bottom of the Arduino IDE window until you see this text printed:
    Connecting...
    
  3. Press and hold the button on your ESP32 board.
    if your board has multiple buttons, you might have to do some trial and error to determine which is the one you need to press.
  4. Wait about one second.
  5. Release the button.

The upload should now finish successfully.

This was the first thing I struggled with as this board doesn't have a boot button. At first I had to connect A0 to GND and then hit reset at exactly the right time. I used to miss it several times and have to keep restarting my upload. However, I'm not sure if this is the issue as the error I was getting looked like below:

Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
Failed uploading: uploading error: exit status 2

To upload a sketch I put mine on a breadboard so I could connect A0 to GND. Then watch the output when compiling once or twice to learn roughly when "Connecting..." is going to appear. Hold down the RST button ready and release it just before "Connecting..." appears. If you miss it, just wait. You'll see that the "............." shown above will progress, then pause, then progress then pause etc. You need to hold the RST again and release it just before/as it starts to progress. It took a bit of practice but eventually I could get it 9 out of 10 times without having to restart the upload. But strangely this just stopped for me and now I can hit upload without grounding A0 and without pressing any buttons but don't know why.

Hey ptillisch,

Putting the chip in download mode is not the problem, it fails at a later stage.

From the output you shared, it appears to me it fails at the "Connecting..." stage:

Ok, i got past the "no serial data" thing, after rereading daniels comment:

To upload a sketch I put mine on a breadboard so I could connect A0 to GND. Then watch the output when compiling once or twice to learn roughly when "Connecting..." is going to appear. Hold down the RST button ready and release it just before "Connecting..." appears. If you miss it, just wait. You'll see that the "......... ...." shown above will progress, then pause, then progress then pause etc. You need to hold the RST again and release it just before/as it starts to progress. It took a bit of practice but eventually I could get it 9 out of 10 times without having to restart the upload.

so to recap: when "connecting ..." appears and the console starts adding those extra dots, hold the reset button, wait for a slight pause in the appearing dots, and try to release the RST button at the exact same time when there is a slight pause.

When this started working for me, i had A0 connected to GND, but this does not seem necessary. Most important seems to be the correct timing as instructed by daniel.

Once you get the hang of it, it becomes easy :wink:

having a similar library issue with my firebeetle2 esp32-e. when i try to upload my sketch i'm met with the same Property 'upload.tool.serial' is undefined error. when i check my boards.txt file i can find entries for "firebeetle32" but nothing for "firebeetle2_esp32e". i've tried installing older versions of the df boards library and reinstalling newer versions but cannot seem to get it working.

Hi @nkarpik. I'll be happy to help you with that. First I need to gather a little more information:


:exclamation: NOTE: These instructions will not solve the problem. They are only intended to gather more information which might provide a clue that eventually leads to a solution.


Please do this:

  1. Select File > Preferences from the Arduino IDE menus.
  2. Check the box next to "Show verbose output during: ☐ compilation".
  3. Click the OK button.
  4. Select Sketch > Verify/Compile from the Arduino IDE menus.
  5. Wait for the compilation to fail.
  6. You will see a "Compilation error: ..." notification at the bottom right corner of the Arduino IDE window. Click the COPY ERROR MESSAGES button on that notification.
  7. Open a forum reply here by clicking the Reply button.
  8. Click the </> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  9. Press Ctrl+V.
    This will paste the compilation output into the code block.
  10. Move the cursor outside of the code tags before you add any additional text to your reply.
  11. Click the Reply button to post the output.

In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here:

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a forum reply here by clicking the Reply button.
  5. Click the "Upload" icon (image) on the post composer toolbar:
    image
  6. Select the .txt file you saved.
  7. Click the Open button.
  8. Click the Reply button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.

there is no "preferences" under the "file" tab for arduino ide. i'm using a mac.

I'm not sure why you don't have 'firebeetle2_esp32e' in your 'boards.txt' and I hope I'm not breaking forum rules here, but PlatformIO added support for the FireBeetle 2 a few days ago so you could try using that instead of Arduino IDE. If you haven't heard of it, it's an extension for Microsoft's VSCode (which I believe runs on Mac too).

Sorry about that. macOS uses an Arduino IDE > Settings menu instead of File > Preferences. Here are the instructions adjusted for macOS:

  1. Select Arduino IDE > Settings from the Arduino IDE menus.
  2. Check the box next to "Show verbose output during: ☐ compilation".
  3. Click the OK button.
  4. Select File > New from the Arduino IDE menus.
  5. Select Sketch > Upload from the Arduino IDE menus.
  6. Wait for the process to fail.
  7. You will see a "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the COPY ERROR MESSAGES button on that notification.
  8. Open a forum reply here by clicking the Reply button.
  9. Click the </> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  10. Press Ctrl+V.
    This will paste the compilation output into the code block.
  11. Move the cursor outside of the code tags before you add any additional text to your reply.
  12. Click the Reply button to post the output.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.