WT32-ETH01
Moderators: grovkillen, Stuntteam, TD-er
WT32-ETH01
Anyone has any experience with this ESP32 / LAN8720 module ?
Product Page :
http://www.wireless-tag.com/portfolio/wt32-eth01/
Datasheet:
https://tinyurl.com/WT32-ETH01
AliExpress:
https://www.aliexpress.com/item/1005001739834076.html
-D
Product Page :
http://www.wireless-tag.com/portfolio/wt32-eth01/
Datasheet:
https://tinyurl.com/WT32-ETH01
AliExpress:
https://www.aliexpress.com/item/1005001739834076.html
-D
-D
Re: WT32-ETH01
Have you tried the "eth" builds?
Re: WT32-ETH01
Yeah, i have a few Olimex ESP32-POE working stable on the eth builds.
I wish there was support for more Enviroment and switch (MCP23017) devices.
(Not sure how a GPS module is useful to a wired module)
-D
-D
Re: WT32-ETH01
GPS can be useful to get a very accurate time, without any drift.
It is like an atomic clock.
And about the MCP23017 you mentioned...
I ordered it 8 days ago, so I guess it will be here soon.
It is like an atomic clock.
And about the MCP23017 you mentioned...
I ordered it 8 days ago, so I guess it will be here soon.
Re: WT32-ETH01
NTP, DST and Location settings work great for me in terms of time.
MCP23017 has been stable in ESP8266 for a long time now.
-D
MCP23017 has been stable in ESP8266 for a long time now.
-D
-D
Re: WT32-ETH01
MCP23017 is part of P009.
The GPIO related stuff has now moved to be an internal command, so I guess it should now work on ESP32 too in the more recent builds.
Isn't it working?
The GPIO related stuff has now moved to be an internal command, so I guess it should now work on ESP32 too in the more recent builds.
Isn't it working?
Re: WT32-ETH01
Checking on Tasmota's work in an effort to save me any headache if possible on the WT32-ETH01 (should be coming in soon)
Seems GPIO18 and 23 are common. In the Olimex board I use GPIO12 as "Ethernet Power pin:"
I wonder if it is as simple as choosing GPIO16 as on arendst's code above ?
Code: Select all
* {"NAME":"Olimex ESP32-PoE","GPIO":[1,1,1,1,1,1,0,0,5536,1,1,1,1,0,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,1],"FLAG":0,"BASE":1}
* GPIO12 = ETH POWER
* GPIO18 = ETH MDIO
* GPIO23 = ETH MDC
* #define ETH_TYPE ETH_PHY_LAN8720
* #define ETH_CLKMODE ETH_CLOCK_GPIO17_OUT
* #define ETH_ADDR 0
*
* {"NAME":"wESP32","GPIO":[0,0,1,0,1,1,0,0,1,1,1,1,5568,5600,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,1],"FLAG":0,"BASE":1}
* GPIO16 = ETH MDC
* GPIO17 = ETH MDIO
* #define ETH_TYPE ETH_PHY_LAN8720
* #define ETH_CLKMODE ETH_CLOCK_GPIO0_IN
* #define ETH_ADDR 0
*
* {"NAME":"WT32-ETH01","GPIO":[1,1,1,1,1,1,0,0,1,0,1,1,3840,576,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,1],"FLAG":0,"BASE":1}
* GPIO16 = Force Hi
* GPIO18 = ETH MDIO
* GPIO23 = ETH MDC
* #define ETH_TYPE ETH_PHY_LAN8720
* #define ETH_CLKMODE ETH_CLOCK_GPIO0_IN
* #define ETH_ADDR 1
*
\*********************************************************************************************/
I wonder if it is as simple as choosing GPIO16 as on arendst's code above ?
-D
Re: WT32-ETH01
Have you tried the ETH builds?
I do have all Olimex ETH boards running here for months and all configurations they use are working very well in ESPEasy.
I do have all Olimex ETH boards running here for months and all configurations they use are working very well in ESPEasy.
Re: WT32-ETH01
Seems like you missed the last part of my post below the code.
The eth bins work great on the Olimex ESP32-PoE units I have on hand.
I am now expecting to receive the WT32-ETH01 units and was wondering on the GPIO settings for that, therefore I looked into arendst's code.
-D
Re: WT32-ETH01
Judging the code you posted from Tasmota, it indeed looks like the GPIO16 pin may be connected as power enable pin.
But I wonder why it is marked for the Olimex as "ETH POWER" and on the WT32-ETH01 as "Force Hi".
That sounds like it may be a bit different.
Here it is suggested it is indeed the power pin: https://community.home-assistant.io/t/e ... /110390/65
But I wonder why it is marked for the Olimex as "ETH POWER" and on the WT32-ETH01 as "Force Hi".
That sounds like it may be a bit different.
Here it is suggested it is indeed the power pin: https://community.home-assistant.io/t/e ... /110390/65
Re: WT32-ETH01
Hi,
Im pretty fresh to these iot stuff but I admire it. I have a domoticz setup running but would now like to expand it in areas without wifi or zwave coverage, like a gate and in basement and in my garden to control rgbw led fllood lights. The PoE makes it also very versatile for my needs.
Is there a chance the espeasy would also run onto the wesp32? I read the blog of the creator and it seems for the novice eye perfect for my needs and I would like to support him also using his boards. But ffcourse I am not into programming so as a almost end user I would need to have some feeling how good the ESPEasy firmware would suit this hardware.
https://hackaday.io/project/85389-wesp3 ... et-and-poe
https://wesp32.com/
If not I will need to use the Olimex ISO esp32 board.
thanks in advance
Im pretty fresh to these iot stuff but I admire it. I have a domoticz setup running but would now like to expand it in areas without wifi or zwave coverage, like a gate and in basement and in my garden to control rgbw led fllood lights. The PoE makes it also very versatile for my needs.
Is there a chance the espeasy would also run onto the wesp32? I read the blog of the creator and it seems for the novice eye perfect for my needs and I would like to support him also using his boards. But ffcourse I am not into programming so as a almost end user I would need to have some feeling how good the ESPEasy firmware would suit this hardware.
https://hackaday.io/project/85389-wesp3 ... et-and-poe
https://wesp32.com/
If not I will need to use the Olimex ISO esp32 board.
thanks in advance
Re: WT32-ETH01
Taken from the product brief: https://wesp32.com/files/wESP32-Product-Brief.pdf (page 8)
So based on that I would expect it will work just fine with ESPEasy.• Ethernet PHY type is Microchip LAN8720
• PHY address is 0
• EMAC clock mode is GPIO0 input
• Use PHY power pin is disabled
• SMI MDC pin is 16, SMI MDIO pin is 17
Re: WT32-ETH01
Yes, i have tested with ESP_Easy_mega_20201102_custom_ESP32_4M316k_ETH-factory.bin binary and WT32-ETH01 works fine.iron wrote: ↑28 Nov 2020, 21:45 Checking on Tasmota's work in an effort to save me any headache if possible on the WT32-ETH01 (should be coming in soon)
Seems GPIO18 and 23 are common. In the Olimex board I use GPIO12 as "Ethernet Power pin:"Code: Select all
* {"NAME":"WT32-ETH01","GPIO":[1,1,1,1,1,1,0,0,1,0,1,1,3840,576,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,1],"FLAG":0,"BASE":1} * GPIO16 = Force Hi * GPIO18 = ETH MDIO * GPIO23 = ETH MDC * #define ETH_TYPE ETH_PHY_LAN8720 * #define ETH_CLKMODE ETH_CLOCK_GPIO0_IN * #define ETH_ADDR 1 * \*********************************************************************************************/
I wonder if it is as simple as choosing GPIO16 as on arendst's code above ?
Code: Select all
Preferred network: Ethernet
Ethernet PHY type: LAN8710
Ethernet PHY Address: 1
GPIO MDC: GPIO-23
GPIO MIO: GPIO-18
GPIO POWER: GPIO-16
Ethernet Clock: External crystal oscillator
Re: WT32-ETH01
I tried the above named firmware but then of the newest release on github. It does work on the Wesp32 but the wired LAN communication is not working. I set the GPIO 16 and 17 as described in the wesp32 manual.
With the original firmware on that came shipped on the wesp32 the wire ethernet worked fine. I hope I didnt kill it by now. Although I do not see how I could have configured the GPIO correct in the .bin before flashing it. When it was flashed offcourse it had the wrong GPIO pins for MIO and MDC
This is what it says now in the console. im unsure how to fix it at this time..
With the original firmware on that came shipped on the wesp32 the wire ethernet worked fine. I hope I didnt kill it by now. Although I do not see how I could have configured the GPIO correct in the .bin before flashing it. When it was flashed offcourse it had the wrong GPIO pins for MIO and MDC
This is what it says now in the console. im unsure how to fix it at this time..
Code: Select all
INIT : Booting version: (ESP32 SDK v3.2.3-14-gd3e562907)
31 : Info : INIT : Free RAM:293692
32 : Info : INIT : Cold Boot - Restart Reason: CPU0: Vbat power on reset CPU1: for APP CPU, reseted by PRO CPU
33 : Info : FS : Mounting...
69 : Info : CRC : SecuritySettings CRC ...OK
73 : Info : INIT : ETH_WIFI_MODE:Ethernet
144 : Info : INIT : Free RAM:287624
145 : Info : INIT : I2C
146 : Info : INIT : SPI not enabled
169 : Info : INFO : Plugins: 21 (ESP32 SDK v3.2.3-14-gd3e562907)
170 : Info : Connect to:
170 : Info : Ethernet
171 : Info : Eth Wifi mode: Ethernet ETH: PHY Typee: LAN8710 PHY Addr: 0 Eth C lock mode: 50MHz APLL Ouput on GPIO0 MDC Pin: 16 MIO Pin: 17 Power Pin: -1
177 : Info : ETH Started
177 : Info : After ETH.begin
190 : Info : Webserver: start
1524 : Info : WD : Uptime 0 ConnectFailures 0 FreeMem 226876 EthSpeedState N o Ethernet ESPeasy internal wifi status: DISCONNECTED
30316 : Info : ETH Connected
30317 : Info : firstLoopConnectionsEstablished
31524 : Info : WD : Uptime 1 ConnectFailures 0 FreeMem 226512 EthSpeedState Link Down ESPeasy internal wifi status: DISCONNECTED
34176 : Error : ETH Disconnected
38212 : Info : ETH Connected
40176 : Error : ETH Disconnected
Re: WT32-ETH01
How did you build it?
I did a test yesterday with the current master branch of ESP32 Arduino and even though the build looks to work, I could not get ethernet to work (LAN8710A chip)
Reverting to the revision referred to by PlatformIO's espressif32@2.1.0 and with the same code and settings all worked again.
So if you used the latest ESP32 Arduino code, please have a test with PlatformIO's espressif32@2.1.0
I did a test yesterday with the current master branch of ESP32 Arduino and even though the build looks to work, I could not get ethernet to work (LAN8710A chip)
Reverting to the revision referred to by PlatformIO's espressif32@2.1.0 and with the same code and settings all worked again.
So if you used the latest ESP32 Arduino code, please have a test with PlatformIO's espressif32@2.1.0
Re: WT32-ETH01
I didnt build it. I downloaded the latest ESP release from github (ESPEasy_ESP32_mega-20210114.zip) and flashed the ESP_Easy_mega_20210114_custom_ESP32_4M316k_ETH-factory.bin using the ESP.Easy.Flasher.exe flashing tool. This didnt directly work so then I flashed it again using the flash_download_tool_3.8.5.exe. then the wesp showed up in AP mode, I configured the GPIO pins 0 16 and 17 as per Wesp32 manual but the result can be seen above. Ethernet not working.
Ok Ill try to give thefirmware you mentioned tomorrow. can I find the .bin somewhere or does it need to be build with the PlatformIO software?
Ok Ill try to give thefirmware you mentioned tomorrow. can I find the .bin somewhere or does it need to be build with the PlatformIO software?
Re: WT32-ETH01
Have your tried what enecbs posted above ?Rub87 wrote: ↑21 Jan 2021, 01:15 I didnt build it. I downloaded the latest ESP release from github (ESPEasy_ESP32_mega-20210114.zip) and flashed the ESP_Easy_mega_20210114_custom_ESP32_4M316k_ETH-factory.bin using the ESP.Easy.Flasher.exe flashing tool. This didnt directly work so then I flashed it again using the flash_download_tool_3.8.5.exe. then the wesp showed up in AP mode, I configured the GPIO pins 0 16 and 17 as per Wesp32 manual but the result can be seen above. Ethernet not working.
Ok Ill try to give thefirmware you mentioned tomorrow. can I find the .bin somewhere or does it need to be build with the PlatformIO software?
Code: Select all
Preferred network: Ethernet
Ethernet PHY type: LAN8710
Ethernet PHY Address: 1
GPIO MDC: GPIO-23
GPIO MIO: GPIO-18
GPIO POWER: GPIO-16
Ethernet Clock: External crystal oscillator
-D
Re: WT32-ETH01
No. As I assumed he has the Olimex board and I have the Wesp32.. here is what the wesp manual says:
Code: Select all
Ethernet PHY type is Microchip LAN8720
• PHY interface is RMII
• PHY address is 0
• Clock mode is GPIO0 external input
• PHY power/reset pin is disabled (set to -1)
• SMI MDC pin is 16, SMI MDIO pin is 17
Re: WT32-ETH01
Olimex has several boards with LAN, with different pin configurations.
Not all of them use a pin to power/reset the LAN chip.
The Olimex boards (as far as I know) do use the LAN8710A, not the LAN8720A.
But as far as I know the main difference between both is (apart from the pin count) the LAN8710A does support RMII and the older protocol (MII?)
Since we only use RMII, both should work just fine, as long as you're using the correct GPIO configuration and PHY address (which can be set by resistor configuration on some pins)
Maybe I should change the configuration text into LAN8710/20. (No idea if the newer LAN874x chips also work just fine)
Not all of them use a pin to power/reset the LAN chip.
The Olimex boards (as far as I know) do use the LAN8710A, not the LAN8720A.
But as far as I know the main difference between both is (apart from the pin count) the LAN8710A does support RMII and the older protocol (MII?)
Since we only use RMII, both should work just fine, as long as you're using the correct GPIO configuration and PHY address (which can be set by resistor configuration on some pins)
Maybe I should change the configuration text into LAN8710/20. (No idea if the newer LAN874x chips also work just fine)
Re: WT32-ETH01
Any chance you could attach the espressif32 platformIO .bin file here I could test before spend 2 days trying to build it myself and having a 99% change that if it not runs it will be an user error?
Re: WT32-ETH01
Why not use the "eth" ones from the last nightly build?
https://github.com/letscontrolit/ESPEas ... 210114.zip
https://github.com/letscontrolit/ESPEas ... 210114.zip
Re: WT32-ETH01
The configuration i'd posted is for "WT32-ETH01" only. "wESP32" is another board with a different setup which popped up somehow in this topic.iron wrote: ↑21 Jan 2021, 09:33 Have your tried what enecbs posted above ?
Code: Select all
Preferred network: Ethernet Ethernet PHY type: LAN8710 Ethernet PHY Address: 1 GPIO MDC: GPIO-23 GPIO MIO: GPIO-18 GPIO POWER: GPIO-16 Ethernet Clock: External crystal oscillator
Re: WT32-ETH01
TD-er wrote: ↑21 Jan 2021, 16:50 Why not use the "eth" ones from the last nightly build?
https://github.com/letscontrolit/ESPEas ... 210114.zip
The one I used came out of that archive. It was this one to be exact: ESP_Easy_mega_20210114_custom_ESP32_4M316k_ETH-factory.bin
Re: WT32-ETH01
I tried also a version older firmware: ESP_Easy_mega_20201227_normal_ESP32_4M316k_ETH-factory.bin
No luck. keep getting these messages in the terminal. GPIO pins are correct according to the wESP32 manual.
116288 : Info : ETH Connected
118223 : Error : ETH Disconnected
120275 : Info : ETH Connected
No luck. keep getting these messages in the terminal. GPIO pins are correct according to the wESP32 manual.
116288 : Info : ETH Connected
118223 : Error : ETH Disconnected
120275 : Info : ETH Connected
Re: WT32-ETH01
This is how tasmota has it working :Rub87 wrote: ↑21 Jan 2021, 21:44 I tried also a version older firmware: ESP_Easy_mega_20201227_normal_ESP32_4M316k_ETH-factory.bin
No luck. keep getting these messages in the terminal. GPIO pins are correct according to the wESP32 manual.
116288 : Info : ETH Connected
118223 : Error : ETH Disconnected
120275 : Info : ETH Connected
Code: Select all
* {"NAME":"wESP32","GPIO":[0,0,1,0,1,1,0,0,1,1,1,1,5568,5600,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,1],"FLAG":0,"BASE":1}
* GPIO16 = ETH MDC
* GPIO17 = ETH MDIO
* #define ETH_TYPE ETH_PHY_LAN8720
* #define ETH_CLKMODE ETH_CLOCK_GPIO0_IN
* #define ETH_ADDR 0
-D
Re: WT32-ETH01
Where can I enter for exmaple the ETH_TYPE setting? In the config.dat there are not really settings I think. or does this need to be done while compiling a bin?
Re: WT32-ETH01
Via the web interface in the "hardware" tab.
Or via commands.
Taken from the source code:
As you can see, those commands are "restricted" so you can only enter them from a limited set of origins.
But the serial port is allowed as source.
These are all commands with only 1 argument, so it should be clear how to format them.
e.g. "ethpinmdc,16"
Don't forget to save them when you're done.
And you cannot edit your command via serial if you make a mistake, so better copy/paste them from a text editor.
Or via commands.
Taken from the source code:
Code: Select all
#ifdef HAS_ETHERNET
COMMAND_CASE_R( "ethphyadr", Command_ETH_Phy_Addr, 1); // Network Command
COMMAND_CASE_R( "ethpinmdc", Command_ETH_Pin_mdc, 1); // Network Command
COMMAND_CASE_R( "ethpinmdio", Command_ETH_Pin_mdio, 1); // Network Command
COMMAND_CASE_R( "ethpinpower", Command_ETH_Pin_power, 1); // Network Command
COMMAND_CASE_R( "ethphytype", Command_ETH_Phy_Type, 1); // Network Command
COMMAND_CASE_R("ethclockmode", Command_ETH_Clock_Mode, 1); // Network Command
COMMAND_CASE_R( "ethip", Command_ETH_IP, 1); // Network Command
COMMAND_CASE_R( "ethgateway", Command_ETH_Gateway, 1); // Network Command
COMMAND_CASE_R( "ethsubnet", Command_ETH_Subnet, 1); // Network Command
COMMAND_CASE_R( "ethdns", Command_ETH_DNS, 1); // Network Command
COMMAND_CASE_R( "ethwifimode", Command_ETH_Wifi_Mode, 1); // Network Command
#endif // HAS_ETHERNET
But the serial port is allowed as source.
These are all commands with only 1 argument, so it should be clear how to format them.
e.g. "ethpinmdc,16"
Don't forget to save them when you're done.
And you cannot edit your command via serial if you make a mistake, so better copy/paste them from a text editor.
Re: WT32-ETH01
In the web interface I can only choose for PHY type LAN8710, dont know if that is the problem or not. When I attempt to change it per serial to LAN8720 I suppose I do:
the response is then:
Code: Select all
'ethphytype,ETH_PHY_LAN8720'
Code: Select all
ETH_Phy_Type:0
Ok
Re: WT32-ETH01
ethphytype needs an integer value.
If it doesn't see an integer value, it will return the current value ("0")
Meaning the LAN8710 is type 0, so you have the type already set to this.
Like I wrote in a reply earlier, I do expect LAN8710A and LAN8720A to be the same from a software perspective.
And just to answer your next question which you didn't know you were about to ask:
So the clock mode to use GPIO 0 must be set to "1".
If it doesn't see an integer value, it will return the current value ("0")
Code: Select all
enum class EthPhyType_t : uint8_t {
LAN8710 = 0,
TLK110 = 1
};
Like I wrote in a reply earlier, I do expect LAN8710A and LAN8720A to be the same from a software perspective.
And just to answer your next question which you didn't know you were about to ask:
Code: Select all
enum class EthClockMode_t : uint8_t {
Ext_crystal_osc = 0,
Int_50MHz_GPIO_0 = 1,
Int_50MHz_GPIO_16 = 2,
Int_50MHz_GPIO_17_inv = 3
};
Re: WT32-ETH01
Ok it seems the config was already correct then from configuring it through the web interface. I just flashed back the original wESP32 MicroPhyton and also cannot get an IP through the Ethernet.. I tested the same when the unit came and then it worked perfectly. Could it be that the initial GPIO settings in the ESPEasy firmware drives any of the below mentioned IO's to the wrong type and this could cause damage?
Code: Select all
Pins involved in connectivity between the ESP32 and PHY are IO0, IO16, IO17, IO19, IO21, IO22, IO25, IO26, IO27.
If the user loads software on the ESP32 that does not configure the RMII pins correctly, it is possible
the software will configure the pins in such a way that physical damage may result, for instance
connecting an output from the PHY to an output of the ESP32, resulting in a short circuit through the
chip’s output drivers.
Re: WT32-ETH01
I don't think the settings can damage the PCB.
But I do know (from experience, sadly) that the LAN8710A chip can quite easily get damaged by ESD (electro static discharge)
I have some boards (made by myself) and one of them was working just fine until it was taken out of its enclosure.
After removing it from its enclosure it is no longer possible to get it to signal a connection to the switch.
So the switch does not indicate an active link status on that board anymore.
But I do know (from experience, sadly) that the LAN8710A chip can quite easily get damaged by ESD (electro static discharge)
I have some boards (made by myself) and one of them was working just fine until it was taken out of its enclosure.
After removing it from its enclosure it is no longer possible to get it to signal a connection to the switch.
So the switch does not indicate an active link status on that board anymore.
Re: WT32-ETH01
Ok, I will use the wESP32 with wifi for now and order a replacement one. I will wait before using it till someone more experienced in the matter can confirm an out of the box 'ETH' binary file doesnt damage the board and has working ethernet port after setting the GPIO settings correct in the hardware tab. Thanks so far all you for the excellent support
Re: WT32-ETH01
What specific board is it? (link)
Do you know if there is some demo code available to verify the settings?
Do you know if there is some demo code available to verify the settings?
Re: WT32-ETH01
Hi guys,
I'm trying to flash or load my own code to this board.... at the moment to try upload the code the board is not getting connected, you know, it keeps like .....____.....____ I'm trying with these serial converters (in the image) without luck, actually I'm reading serial messages good, since when I connect to my USB the device I can see in the serial monitor the message "module ok" sent by the default firmware, my problem is at load my code... , could you share some info about how you are programming this board? or some diagram of connections.
thanks in advance!
I'm trying to flash or load my own code to this board.... at the moment to try upload the code the board is not getting connected, you know, it keeps like .....____.....____ I'm trying with these serial converters (in the image) without luck, actually I'm reading serial messages good, since when I connect to my USB the device I can see in the serial monitor the message "module ok" sent by the default firmware, my problem is at load my code... , could you share some info about how you are programming this board? or some diagram of connections.
thanks in advance!
Re: WT32-ETH01
If your board doesn't have an embedded USB to UART converter chip, you may need to trigger the boot-into-flash-mode yourself.
To do this you need to perform these steps in this order:
- Connect GPIO-0 via some resistor (470 Ohm, or direct connect) to GND
- Reset the node, while keeping GPIO-0 connected to GND
- Only let the GPIO-0 loose if the flashing has started.
The reason to use a resistor for pulling GPIO-0 down is to protect the GPIO pin if it may be running some firmware which has the pin set as an output and high level.
But I guess you can also get away with just connecting it to GND.
Most boards have the "boot" button connected to GPIO-0 like this.
Oh and if you're connecting an external USB to uart... make sure RX of the USB chip is connected to TX of the ESP and vice verse.
Also double check the voltage is correct as a lot of those converter boards do have a very bad voltage regulator on them.
To do this you need to perform these steps in this order:
- Connect GPIO-0 via some resistor (470 Ohm, or direct connect) to GND
- Reset the node, while keeping GPIO-0 connected to GND
- Only let the GPIO-0 loose if the flashing has started.
The reason to use a resistor for pulling GPIO-0 down is to protect the GPIO pin if it may be running some firmware which has the pin set as an output and high level.
But I guess you can also get away with just connecting it to GND.
Most boards have the "boot" button connected to GPIO-0 like this.
Oh and if you're connecting an external USB to uart... make sure RX of the USB chip is connected to TX of the ESP and vice verse.
Also double check the voltage is correct as a lot of those converter boards do have a very bad voltage regulator on them.
Re: WT32-ETH01
its a wESP32 --> https://wesp32.com/
it comes shipped with microPhyton 3.1.12 on it and you can plug lan cable, gets an IP and works. I contacted the designer of the board and he kind of suspect still the damage would be done by some of the mentioned gpio being configuered in a way they would serve as an output of both the esp32 and the 8720. he says ESD is not impossible but yes. I didnt really touch the board when flashing it from the MicroPheaton to ESPEASY frimware..
Re: WT32-ETH01
If GPIO-0 connected to GND and serial connection did not start, you have to try a bigger power supply, around 5V1A. But be careful with common GND!Pepe wrote: ↑22 Jan 2021, 23:51 Hi guys,
I'm trying to flash or load my own code to this board.... at the moment to try upload the code the board is not getting connected, you know, it keeps like .....____.....____ I'm trying with these serial converters (in the image) without luck, actually I'm reading
This module may use up to 0.2A at startup especially when wifi is connected and/or LAN cable connected. The serial adapter itself can not provide as much, even the best CP2102 (max 100mA) can not do that.
I do not see the converter type on your picture, i guess it can be a CH340G which can provide ~25mA max.
But if wifi/LAN is not connected i'd able to program it CP2102 + the wiring below, using Thonny:
As i looking your wiring i guess you are using GPIO35 and GPIO17 for RX/TX which will never work. Real RX/TX is near the ESP chip at the right side.
https://bitekmindenhol.blog.hu/2020/11/ ... kes_lan-al
Re: WT32-ETH01
In the meantime I have managed to get PlatformIO running in VSC and I could compile a bin with the correct default settings for the GPIO 0, 16 and 17 for the wESP32.
Now is there a way in PlatformIO I can findout or make sure any of the other pins required for the LAN8710/20 arent wrongly configured as output when they should be an input for example?
Now is there a way in PlatformIO I can findout or make sure any of the other pins required for the LAN8710/20 arent wrongly configured as output when they should be an input for example?
Re: WT32-ETH01
Search in the code for "DeviceMode_Olimex_ESP32_PoE" to see some examples of factory default settings (can be chosen on the reset factory default page, when not using a "testing" or "dev" build)
Re: WT32-ETH01
not easy for me to understand the code but here I found a check for the RMII gpio pins. Although if I understand correctly here it gives just a warning but doesnt really configure the pin either as input or output.
If I compare the pins against the wESP manual I find the same pins apart from GPIO 17
Edit: my mistake pin17 is already configured correct elsewere als MIO.
If I compare the pins against the wESP manual I find the same pins apart from GPIO 17
Code: Select all
Pins involved in connectivity between the ESP32 and PHY are IO0, IO16, IO17, IO19, IO21, IO22, IO25, IO26, IO27.
Code: Select all
[/# ifdef HAS_ETHERNET
// Check pins used for RMII Ethernet PHY
if (NetworkMedium_t::Ethernet == Settings.NetworkMedium) {
switch (gpio) {
case 0:
case 21:
case 19:
case 22:
case 25:
case 26:
case 27:
warning = true;
break;
}
// FIXME TD-er: Must we also check for pins used for MDC/MDIO and Eth PHY power?
}
Edit: my mistake pin17 is already configured correct elsewere als MIO.
Last edited by Rub87 on 24 Jan 2021, 12:47, edited 3 times in total.
Re: WT32-ETH01
The Olimex POE was just one example.
I added all Olimex boards I know of which have an ethernet connector.
They do differ between boards.
So please also have a look at the others to see which one matches yours.
If there is a match, I can add your board to the description too.
I added all Olimex boards I know of which have an ethernet connector.
They do differ between boards.
So please also have a look at the others to see which one matches yours.
If there is a match, I can add your board to the description too.
Re: WT32-ETH01
What I did now if trace to where the 'DEFAULT_ETH_xx points to and made that correct. So i now compiled a ESP_Easy_mega_20210124_normal_ESP32_4M316k_ETH-factory.bin and I loaded it and the settings as far a clock, MDC MIO and power pin are correct directly after flashing the firmware.
What I am still unsure off is that any of the other pins are perhaps not configures wrongly somewhere... I have ordered some spare LAN8720 ic's so I will try to solder one on and see if I can make it to work
Code: Select all
1651 : Info : Eth Wifi mode: Ethernet ETH: PHY Type: LAN8710 PHY Addr: 0 Eth Clock mode: 50MHz APLL Output on GPIO0 MDC Pin: 16 MIO Pin: 17 Power Pin: -1
Code: Select all
IO19, IO21, IO22, IO25, IO26, IO27
Re: WT32-ETH01
All pins that cannot be configured in ESPEasy are fixed and are always the same on ESP32 as the needed function cannot be re-mapped to other pins.
Re: WT32-ETH01
These pins are the same on every ESP32 as ESP-IDF is not providing a way to alter them:Rub87 wrote: ↑24 Jan 2021, 12:55 What I am still unsure off is that any of the other pinsare perhaps not configures wrongly somewhere... I have ordered some spare LAN8720 ic's so I will try to solder one on and see if I can make it to workCode: Select all
IO19, IO21, IO22, IO25, IO26, IO27
GPIO22 - EMAC_TXD1 TX1
GPIO19 - EMAC_TXD0 TX0
GPIO21 - EMAC_TX_EN TX_EN
GPIO26 - EMAC_RXD1 RX1
GPIO25 - EMAC_RXD0 RX0
GPIO27 - EMAC_RX_DV CRS
Power pin is optional, MDIO and MDC can be altered, and PHY Clock can be GPIO-0 / GPIO-16 or GPIO-17, and this is the end of options.
You can view wesp32 pinout diagram here:
https://cdn.hackaday.io/files/853893653 ... SP32-1.pdf
If you are trying to use bare LAN8720 modules, a little DIY will be needed on the board, as GPIO-0 has special meaning for ESP32..
I've used LAN8720 with WROVER modules which a little different than WROOM, as WROVER GPIO16/GPIO17 is occupied by onboard PSRAM, but not impossible to do:
https://translate.google.com/translate? ... etekes_lan
Re: WT32-ETH01
Yes... and just to not have to do this I thought let me get the wESP32 which has a purpose made small controller to handle this. Can be read by the designer of the board on hackaday https://hackaday.io/project/85389-wesp3 ... et-and-poeIf you are trying to use bare LAN8720 modules, a little DIY will be needed on the board, as GPIO-0 has special meaning for ESP32..
I've used LAN8720 with WROVER modules which a little different than WROOM, as WROVER GPIO16/GPIO17 is occupied by onboard PSRAM, but not impossible to do:
https://translate.google.com/translate? ... etekes_lan
Re: WT32-ETH01
Yes, but the "WT32-ETH01" board which is in the topic subject is also an ESP32 with LAN, just cheaper than wESP32...Rub87 wrote: ↑24 Jan 2021, 18:28Yes... and just to not have to do this I thought let me get the wESP32 which has a purpose made small controller to handle this.If you are trying to use bare LAN8720 modules, a little DIY will be needed on the board, as GPIO-0 has special meaning for ESP32..
I've used LAN8720 with WROVER modules which a little different than WROOM, as WROVER GPIO16/GPIO17 is occupied by onboard PSRAM, but not impossible to do:
https://translate.google.com/translate? ... etekes_lan
Re: WT32-ETH01
Hi enesbcs,enesbcs wrote: ↑23 Jan 2021, 16:07If GPIO-0 connected to GND and serial connection did not start, you have to try a bigger power supply, around 5V1A. But be careful with common GND!Pepe wrote: ↑22 Jan 2021, 23:51 Hi guys,
I'm trying to flash or load my own code to this board.... at the moment to try upload the code the board is not getting connected, you know, it keeps like .....____.....____ I'm trying with these serial converters (in the image) without luck, actually I'm reading
This module may use up to 0.2A at startup especially when wifi is connected and/or LAN cable connected. The serial adapter itself can not provide as much, even the best CP2102 (max 100mA) can not do that.
I do not see the converter type on your picture, i guess it can be a CH340G which can provide ~25mA max.
But if wifi/LAN is not connected i'd able to program it CP2102 + the wiring below, using Thonny:
As i looking your wiring i guess you are using GPIO35 and GPIO17 for RX/TX which will never work. Real RX/TX is near the ESP chip at the right side.
https://bitekmindenhol.blog.hu/2020/11/ ... kes_lan-al
Men!!! you make my day! I don't know why I never tested "Real RX/TX is near the ESP chip at the right side" that was my mistake...
now it's working , I share the simple test code I used to check this board if this helps to someone else...
Code: Select all
#include <Arduino.h>
/*
This sketch shows how to configure different external or internal clock sources for the Ethernet PHY
*/
#include <ETH.h>
/*
* ETH_CLOCK_GPIO0_IN - default: external clock from crystal oscillator
* ETH_CLOCK_GPIO0_OUT - 50MHz clock from internal APLL output on GPIO0 - possibly an inverter is needed for LAN8720
* ETH_CLOCK_GPIO16_OUT - 50MHz clock from internal APLL output on GPIO16 - possibly an inverter is needed for LAN8720
* ETH_CLOCK_GPIO17_OUT - 50MHz clock from internal APLL inverted output on GPIO17 - tested with LAN8720
*/
#define ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT
// Pin# of the enable signal for the external crystal oscillator (-1 to disable for internal APLL source)
#define ETH_POWER_PIN 16
// Type of the Ethernet PHY (LAN8720 or TLK110)
#define ETH_TYPE ETH_PHY_LAN8720
// I²C-address of Ethernet PHY (0 or 1 for LAN8720, 31 for TLK110)
#define ETH_ADDR 1
// Pin# of the I²C clock signal for the Ethernet PHY
#define ETH_MDC_PIN 23
// Pin# of the I²C IO signal for the Ethernet PHY
#define ETH_MDIO_PIN 18
static bool eth_connected = false;
void WiFiEvent(WiFiEvent_t event) {
switch (event) {
case SYSTEM_EVENT_ETH_START:
Serial.println("ETH Started");
//set eth hostname here
ETH.setHostname("esp32-ethernet");
break;
case SYSTEM_EVENT_ETH_CONNECTED:
Serial.println("ETH Connected");
break;
case SYSTEM_EVENT_ETH_GOT_IP:
Serial.print("ETH MAC: ");
Serial.print(ETH.macAddress());
Serial.print(", IPv4: ");
Serial.print(ETH.localIP());
if (ETH.fullDuplex()) {
Serial.print(", FULL_DUPLEX");
}
Serial.print(", ");
Serial.print(ETH.linkSpeed());
Serial.println("Mbps");
eth_connected = true;
break;
case SYSTEM_EVENT_ETH_DISCONNECTED:
Serial.println("ETH Disconnected");
eth_connected = false;
break;
case SYSTEM_EVENT_ETH_STOP:
Serial.println("ETH Stopped");
eth_connected = false;
break;
default:
break;
}
}
void testClient(const char * host, uint16_t port) {
Serial.print("\nconnecting to ");
Serial.println(host);
WiFiClient client;
if (!client.connect(host, port)) {
Serial.println("connection failed");
return;
}
client.printf("GET / HTTP/1.1\r\nHost: %s\r\n\r\n", host);
while (client.connected() && !client.available());
while (client.available()) {
Serial.write(client.read());
}
Serial.println("closing connection\n");
client.stop();
}
void setup() {
Serial.begin(115200);
WiFi.onEvent(WiFiEvent);
ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE);
}
void loop() {
if (eth_connected) {
testClient("google.com", 80);
}
delay(10000);
}
https://es.aliexpress.com/item/40012677 ... web201603_
and the wiring (as enesbcs's previous diagram)
Re: WT32-ETH01
back to the wESP32..
I soldered a fresh LAN8720 onto the unit and with the ESPEASY binary flashed onto it which I had compiled with the correct gpio settings for the wESP32 I was still unable to get connected over the ethernet port.
it does find the MAC of the LAN8720 but it keeps saying ethernet connected and shortly after ethernet disconnected. it doesnt matter if the ethernet port has a cable in or not...
Then I flashed MicroPhyton on it, to verify if the newly soldered LAN8720 would be physically ok or if I fucked it by soldering the damn tiny thing.
Now this proves the LAN8720 is workin fine and still something in the ESPEASY causes it not to connect. the mdc and mio gpio are correct. the clock with gpio 0 also. Anyone hs an idea what could be done to make it work?
I soldered a fresh LAN8720 onto the unit and with the ESPEASY binary flashed onto it which I had compiled with the correct gpio settings for the wESP32 I was still unable to get connected over the ethernet port.
it does find the MAC of the LAN8720 but it keeps saying ethernet connected and shortly after ethernet disconnected. it doesnt matter if the ethernet port has a cable in or not...
Then I flashed MicroPhyton on it, to verify if the newly soldered LAN8720 would be physically ok or if I fucked it by soldering the damn tiny thing.
Code: Select all
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4844
load:0x40078000,len:9656
load:0x40080400,len:6216
entry 0x400806f0
I (457) cpu_start: Pro cpu up.
I (457) cpu_start: Application information:
I (457) cpu_start: Compile time: Dec 20 2019 07:50:41
I (460) cpu_start: ELF file SHA256: 0000000000000000...
I (466) cpu_start: ESP-IDF: v3.3
I (471) cpu_start: Starting app cpu, entry point is 0x40083600
I (0) cpu_start: App cpu up.
I (482) heap_init: Initializing. RAM available for dynamic allocation:
I (488) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (495) heap_init: At 3FFBA488 len 00025B78 (150 KiB): DRAM
I (501) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (507) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (514) heap_init: At 40092D6C len 0000D294 (52 KiB): IRAM
I (520) cpu_start: Pro cpu start user code
I (203) cpu_start: Chip Revision: 1
W (203) cpu_start: Chip revision is higher than the one configured in menuconfig. Suggest to upgrade it.
I (206) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (40) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (50) emac: emac reset done
I (318) ethernet: start
MicroPython v1.12 on 2019-12-20; ESP32 module with ESP32
Type "help()" for more information.
>>> I (4318) ethernet: LAN cable connected
I (5298) event: eth ip: 10.0.1.44, mask: 255.255.255.0, gw: 10.0.1.1
I (5298) ethernet: Got IP
Re: WT32-ETH01
Code: Select all
I (40) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I thought it took the MAC from the ESP, but this looks like this may be something different here?
Who is online
Users browsing this forum: No registered users and 3 guests