Why is missing WT32-ETH01 board name?

I would like to work with WT32-ETH01 on Arduino IDE 2.0.4, running on Windows 10 Pro, but WT32-ETH01 is lot in the list of board options.
Is it going to be added?
Meanwhile, which option should I used?

I am using a USB-serial TTL adapter to connect (without success at this moment).

I do not know what a WT32-ETH01 is; sounds like an ESP32 based board.

Arduino does not add 3rd party boards so asking when it will be added depends on the board manufacturer.

Somebody else might be able to tell you which ESP32 you have to select.

That does not reveal much. What kind of errors do you get?

Note:
I don't have ESP32 boards so can't advise further.

WT32-ETH01 is an embedded serial port to Ethernet module based on ESP32 series launched by Shenzhen Qiming Cloud Co., Ltd. The module integrates an optimized TCP/IP protocol stack, which is convenient for users to easily complete the networking function of embedded devices. Start trying the ESP32 board settings in the IDE, one or more will probably work. Otherwise go to your supply source and ask how to use it.

It is working now.
It is a little bit trick since the WT32-ETH01 does not come with serial-USB hardware.

Who is the person encharged to add hardware board for ESP32?

No clue, you need to get that information from the manufacturer if they will release it which I doubt.

It is working fine now.
The manufacturer does not provide so many information as Espressif, but the MCU works fine.

May main question is the MUC name missing on the list of ESP32 boards available on IDE 2.0, but it is not a big deal (I know now).

If you use a board that has a generic TTL-to-USB adapter (FTDI, CH340, CP....), your operating can only identify it as a generic TTL-to-USB adapter; in the official Arduino family that would be the classic Nano. This also applies of you use an external adapter;

Boards that can be identified as being e.g. Uno or Mega have a dedicated TTL-to-USB adapter (on the classic Arduinos it's a 16U2 (or 8U2)) and based on VID and PID your operating system knows what the board is and the IDE can pull that information and show it.

It is a little bit more trick.

  1. On Tools-->Board, select ESP32 Dev Module.
  2. Add an USB-Serial to TX0-RX0-GND pins, crossing TX-TX between WT32 and USB-Serial.
  3. Connect the USB-Serial to the USB of your computer and select the COM port on Arduino.
  4. Connect the WT32 BURN pin to GND.
  5. Reset the WT32 connecting the EN pin to GND for 1 second.
  6. Now you are ready to upload the new firmware.
  7. To use to monitor, unplug the BURN-pin from GND and reset the WT32 connecting the EN pin to GND for 1 second.

To use the Ethernet. use the library for WT32-ETH on https://github.com/khoih-prog/WebServer_WT32_ETH01.

I am using it to access:
a) NTP server,
b) secure MQTT for IoT on AWS,
c) local http.
The hardware works just fine.

I am running Arduino 1.8.19 under Lubuntu and although I am able to download sketches to an Elegoo Uno R3 via USB without problems, I am struggling to make (any) progress with my WT32-ETH01.

My configuration is as follows:

CP2102 MODULES USB-to-TTL converter board (LHS below)
WT32-ETH01 V1.4 board (RHS below)

5V -> 5V
GND -> GND
TX -> RX0
RX -> TX0
On RHS only, IO0 <-> GND

In the Arduino IDE, I have selected "ESP32 Dev Module".
Under Tools -> Get Board Info:
BN: Unknown board
VID: 10C4
PID: EA60
SN: Upload any sketch to obtain it

Then using the shipped example "Blink" (see code below):

/*
  Blink

  Turns an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
  the correct LED pin independent of which board is used.
  If you want to know what pin the on-board LED is connected to on your Arduino
  model, check the Technical Specs of your board at:
  https://www.arduino.cc/en/Main/Products

  modified 8 May 2014
  by Scott Fitzgerald
  modified 2 Sep 2016
  by Arturo Guadalupi
  modified 8 Sep 2016
  by Colby Newman

  This example code is in the public domain.

  https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

The IDE returns the following warning and error messages:

Arduino: 1.8.19 (Linux), Board: "ESP32 Dev Module, Disabled, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 115200, Core 1, Core 1, None, Disabled"

WARNING: Category '' in library ESP Insights is not valid. Setting to 'Uncategorized'
WARNING: Category '' in library ESP RainMaker is not valid. Setting to 'Uncategorized'
WARNING: Category '' in library WiFiProv is not valid. Setting to 'Uncategorized'
Traceback (most recent call last):
  File "/home/cystrin/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool.py", line 31, in <module>
    import esptool
  File "/home/cystrin/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/__init__.py", line 41, in <module>
    from esptool.cmds import (
  File "/home/cystrin/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/cmds.py", line 14, in <module>
    from .bin_image import ELFFile, ImageSegment, LoadFirmwareImage
  File "/home/cystrin/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/bin_image.py", line 14, in <module>
    from .loader import ESPLoader
  File "/home/cystrin/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/loader.py", line 30, in <module>
    import serial
ModuleNotFoundError: No module named 'serial'
exit status 1
Error compiling for board ESP32 Dev Module.


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

As per the instructions provided by CamargoF, I have also tried to "Reset the WT32 [by] connecting the EN pin to GND for 1 second".

Am I missing a library?
Are my electrical circuit connections correct?
Is my Arduino IDE configured appropriately?
When attempting to upload the sketch, I do not see the RX and TX flashing on the USB-to-TTL converter board. How can I debug the converter board?

@CamargoF please confirm that it is possible to upload and execute the "Blink" sketch on the WT32_ETH01 board.

Thanks for any help, suggestions or pointers!

Hi @cystrin. The Linux version of the ESP32 boards platform uses a Python script named esptool when compiling sketches. That esptool script has a dependency on the pyserial Python package. The "No module named 'serial'" error occurs because that package dependency is not installed on your computer.

We are accustomed to all the dependencies of Arduino boards platforms being automatically installed along with the platform by the Arduino "Boards Manager", but the ESP32 platform developers didn't make their project that way. You are expected to manually install this pyserial Python package if you don't have it installed already. So the solution to the error is to use pip to install the pyserial package.

Try this:

  1. Open a command line terminal on your computer.
  2. Type the following command:
    python3 -m pip install pyserial
    
  3. Press the Enter key.
  4. Wait for the command to complete successfully.

Now try compiling your sketch again. Hopefully the "No module named 'serial'" error will no longer occur.

Thank you very much @ptillisch.

Looking at IDE messages, it would seem that I have now managed to install the "serial" package that was missing before--thanks again. However, it appears that the simple "Blink" example is not supported by ESP32--see following:

Arduino: 1.8.19 (Linux), Board: "ESP32 Dev Module, Disabled, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 115200, Core 1, Core 1, None, Disabled"

WARNING: Category '' in library ESP Insights is not valid. Setting to 'Uncategorized'
WARNING: Category '' in library ESP RainMaker is not valid. Setting to 'Uncategorized'
WARNING: Category '' in library WiFiProv is not valid. Setting to 'Uncategorized'
/usr/share/arduino/examples/01.Basics/Blink/Blink.ino: In function 'void setup()':
Blink:28:11: error: 'LED_BUILTIN' was not declared in this scope
   pinMode(LED_BUILTIN, OUTPUT);
           ^~~~~~~~~~~
/usr/share/arduino/examples/01.Basics/Blink/Blink.ino: In function 'void loop()':
Blink:33:16: error: 'LED_BUILTIN' was not declared in this scope
   digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
                ^~~~~~~~~~~
exit status 1
'LED_BUILTIN' was not declared in this scope


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

What do I need to do to declare LED_BUILTIN so that I can make the LED blink on my WT32_ETH01 board and thus confirm that I am able to program it from the Arduino IDE?

@CamargoF please comment on my electrical connections especially the IO0 to GND and holding EN to GND for 1 second before programming.

Thank you,

Cystrin

Sorry for the delay. I was travelling.

First of all, My experience is running Arduino IDE on Windows.

I bought an USB-Serial adapter and connected as you mentioned above:
5V -> 5V
GND -> GND
TX -> RX0
RX -> TX0

To start burning, set GPIO0 to LOW and pulse EN to LOW. It will start the ESP32 to be ready to accept the new firmware. If Linux pulse EN before start flashing, keeps GPIO0 LOW. When the flashs end, set GPIO0 to HIGH and reset the ESP32.

It works form me.
I hope it works for you.

Best regardings,

CamargoF

You are welcome. That is definitely progress!

The LED_BUILTIN constant is defined when compiling for a specific board that has such an LED. The situation is different when you have the "ESP32 Dev Module" board selected in the Arduino IDE. The reason is that this is a general purpose board definition that is intended to be usable with any board that has an ESP32 microcontroller. Some of those board might not have any built in LED at all. Some of those boards might have an LED on various pins. So it wouldn't have made any sense for the developers to define LED_BUILTIN to some arbitrary pin that might or might not be connected to an LED on the board the user has.

So you will need to figure out whether your board has a convenience "built-in" LED, and if so, which pin the LED is connected to. Then you should just replace the LED_BUILTIN with that pin number.

I found a datasheet for the WT32-ETH01 on what I believe to be the manufacturer's website:

I found information about LEDs in section 4.2:

4.2 Indicator Instruction

  • LED1: Power light, when the power supply is normal, the indicator light is on;
  • LED3: Serial port indicator, RXD2(IO5) When there is data flow, the indicator light is on;
  • LED4: Serial port indicator, TXD2(IO17) When there is data flow, the indicator light is on;

It doesn't mention any other LEDs on the board. This makes me think the board does not have a convenience LED that can be controlled freely by the user. In this case, you only need to connect an external LED to the board, which is simple enough to do. You can connect the LED to any available pin and then use that pin number in the Blink sketch.

Thank you @ptillisch and @CamargoF. With your kind help and support, progress is being made.

I (now) understand that the WT32-ETH01 development board does not have an on-board/built-in LED that can be controlled as easily as with Arduino boards. Therefore, I have prepared a connection from IO2 (pin 15) of the WT32-ETH01 to an LED via a 330 ohm resistor tied to ground.

In an attempt to make this (external) LED flash, I modified the "Blink" sketch as follows:

/*
  Blink

  Turns an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
  the correct LED pin independent of which board is used.
  If you want to know what pin the on-board LED is connected to on your Arduino
  model, check the Technical Specs of your board at:
  https://www.arduino.cc/en/Main/Products.

  modified 8 May 2014
  by Scott Fitzgerald
  modified 2 Sep 2016
  by Arturo Guadalupi
  modified 8 Sep 2016
  by Colby Newman

  This example code is in the public domain.

  https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink

  modified 25 Sep 2023 for WT32-ETH01
  by Cystrin

  For the WT32-ETH01 development board, an on-board LED has not been provided.
  This sketch thus defines LED_BUILTIN as being pin 15 of the board.
  An LED, in series with a 330 ohm to ground, can be connected to IO2 (pin 15).

*/

// define a constant associated with pin 19 (IO2) to be used as an output
int LED_BUILTIN = 15;

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

I use the electrical configuration described in my original posting and prepare the WT32-ETH01 development board for uploading by holding pin IO0 (pin 24) to GND and taking EN (pin 1) to GND for a second before letting it float.

Next, from the IDE, I upload the sketch. During the upload, the TXD and RXD LEDs on the USB-to-TTL board flash for a few seconds. After this, and based on the following output, it appears that the sketch has been uploaded from the Arduino IDE to the WT32-ETH01:

WARNING: Category '' in library ESP Insights is not valid. Setting to 'Uncategorized'
WARNING: Category '' in library ESP RainMaker is not valid. Setting to 'Uncategorized'
WARNING: Category '' in library WiFiProv is not valid. Setting to 'Uncategorized'
Sketch uses 236745 bytes (18%) of program storage space. Maximum is 1310720 bytes.
Global variables use 21048 bytes (6%) of dynamic memory, leaving 306632 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.5.1
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WD (revision v1.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 80:64:6f:e9:d5:1c
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x00049fff...
Compressed 18992 bytes to 13112...
Writing at 0x00001000... (100 %)
Wrote 18992 bytes (13112 compressed) at 0x00001000 in 1.5 seconds (effective 100.7 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.1 seconds (effective 282.6 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.2 seconds (effective 431.2 kbit/s)...
Hash of data verified.
Compressed 237104 bytes to 130416...
Writing at 0x00010000... (12 %)
Writing at 0x0001d2b9... (25 %)
Writing at 0x00024372... (37 %)
Writing at 0x00029568... (50 %)
Writing at 0x0002eb97... (62 %)
Writing at 0x000370f9... (75 %)
Writing at 0x0003f148... (87 %)
Writing at 0x000447cd... (100 %)
Wrote 237104 bytes (130416 compressed) at 0x00010000 in 11.7 seconds (effective 161.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

@ptillisch is the above confirming that the WT32-ETH01 has been uploaded with the sketch?

Next, I release IO0 (pin 24) from GND and as @CamargoF stated, hold it HIGH. I then disconnect the TX, RX, 5V0 and GND connections between the USB-to-TTL board and the WT32-ETH01 board. After half-a-minute or so, I reconnect the GND and 5V0 connections between the two boards. Although the WT32-ETH01 is power up (as shown by its LED1), the LED connected to IO2 (pin 15) does not blink--it is off.

I have experimented with different options after uploading the sketch--for example, let IO0 (pin 24) float, hold it high, hold it low , take EN (pin 1) high, let it float and so on. However, none of these options make my external LED blink.

@CamargoF would it be possible for you to repeat my experiments to see if by connecting an LED to an IO pin you can make it blink?

Thanks for all of your help.

What made you conclude that the pin number is 15? With the ESP32 boards you can simply use the GPIO number as the pin number. So if the LED is connected to GPIO pin 2, you should use 2 as the pin number in the sketch.

That is correct. As long as you see the "Done uploading." message on the notification bar of Arduino IDE at the end of the upload operation you know it was successful and the sketch program is now running on your Arduino board:

image

image

I was unaware that the input/output port named "IO2" could be referenced inside of a script as "pin 2" and thought instead that I should refer to the number of the electrical pin (i.e., pin 15 as shown above).

@ptillisch your hint provided the missing piece of the jigsaw!

By modifying part of my sketch as follows, my external LED connected to IO2 is now flashing:

// define a constant associated with IO2 to be used as an output on the board's electrical pin 19
int LED_BUILTIN = 2;

Thanks for the truly excellent support with my query.

You are welcome. I'm glad it is working now.

It is a common misconception when using bare chips or boards that have cryptic pin labels such as this one. There isn't necessarily any correlation between the pin number you use in your code and the physical pin number. If you think about it, it wouldn't really make sense to have a perfect 1:1 correlation because that would mean code pin numbers would be taken up by non-GPIO pins like Vcc and ground.

Regards,
Per

You can download the WT32-ETH01 schematic from https://github.com/martin-ger/esp32_nat_router/files/6025280/WT32_ETH01_V2.schematic.pdf. There you can see that:

  1. There is no LED_BUILTIN.
  2. There are two LEDs on TX2/RX2, that you can use as status LED if you are not using the UART2.

Sorry for the delay to replay, but I am traveling a lot.

Best regards,

Fernando

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