[info] ESP32-EVB board for IoT with Ethernet 100Mb interface..

User avatar
rudi ;-)
Posts: 1134
Joined: Fri Nov 13, 2015 3:25 pm

Re: [info] ESP32-EVB board for IoT with Ethernet 100Mb interface..

Postby rudi ;-) » Thu Apr 27, 2017 3:01 pm

santanapablo1975 wrote:Now I would like to connect the ESP32 direct to my PC via the Ethernet interface, but I am not sure if it is possible at the moment.
I am asking becasue what I see now is all related to Wifi, example the DHCP stop does not work for ethernet ..


hi juan,

if you connect the ESP32 direct to your PC without DHCP and Router and so on,
you need at first
- "Cross Over Cable"

so you can connect the PC and ESP32 over ethernet as Peer to Peer.
(tip, read a little deeper in LAN8720..or other - there are mechanismen to support this without need of cross cable and it switch byself )


if you not use a DHCP service on your PC ( this would be the simples thing without extra code for esp32) , or do not create DHCP on ESP32 like Wifi Soft AP do, then ( you must write your code ) you need static private IP Adress and Subnet mask.

example:
PC
192.168.0.1
255.255.255.0

esp32
192.168.0.2
255.255.255.0

and you can ping and talk from to pc from to esp32 over ethernet.

You can setup your eth device with static IP well or can do this over DHCP
its the art you create your code for esp32.

btw.. we can use 4 MAC's in esp-idf, so we can setup 4 IP each device
what i think and know, just in time is not supported in esp-idf is
that there are transparent bridge / routings between the devices "officially"
but you can do this simple by look up deeper in lwip stack and device code,
put your own gateway code into and you go on..

hope this helps.

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

santanapablo1975
Posts: 31
Joined: Wed Feb 15, 2017 8:31 pm

Re: [info] ESP32-EVB board for IoT with Ethernet 100Mb interface..

Postby santanapablo1975 » Thu Apr 27, 2017 3:22 pm

Rudi.

Thank you very much for your tips, I am going to read more about!

Schoenes feier abend ;)

MfG

Juan

santanapablo1975
Posts: 31
Joined: Wed Feb 15, 2017 8:31 pm

Re: [info] ESP32-EVB board for IoT with Ethernet 100Mb interface..

Postby santanapablo1975 » Fri Apr 28, 2017 1:51 pm

Hi Rudi,

I made the first test with success, it was with the cross-cable, static IP in the ESP32 and PC, and a small change in the file tcpip_adapter_lwip.c in functions:

tcpip_adapter_set_ip_info

and

tcpip_adapter_dhcps_stop

Becasue the dhcp stop does not support yet the ethernet if... and it is needed to set the static IP.


The other good news is that I foound the following bit (FORCE_MDIXi) in the phy controller (DP83848) in order to work with any ethernet cable, thanks for the tip!

Bow I am going to search more about the following 2 situations:

1) PC has DHCP enable and get the IP from the ESP32

2)ESP32 get the IP adr from the PC

Any tip for this situation?

Regards

vielen dank in voraus!! schoenes WE!

Juan

hwmaier
Posts: 29
Joined: Sun May 28, 2017 7:30 am

Re: [info] ESP32-EVB board for IoT with Ethernet 100Mb interface..

Postby hwmaier » Wed May 31, 2017 11:57 am

Indeed tcpip_adapter_dhcpc_stop() does not yet support the Ethernet interface preventing setting a static IP.

Refer to this pull request which fixes this: https://github.com/espressif/esp-idf/pull/657

User avatar
rudi ;-)
Posts: 1134
Joined: Fri Nov 13, 2015 3:25 pm

Re: [info] ESP32-EVB board for IoT with Ethernet 100Mb interface..

Postby rudi ;-) » Wed Jun 21, 2017 6:27 pm

update:

ESP32_EVB_REV_B.jpg
ESP32_EVB_REV_B.jpg (62.31 KiB) Viewed 1867 times


CAN demo and Eth Phy demo -LAN8710- to the ESP-EVB board in github

more info about ESP32-EVB Rev B you get here

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

pbecchi
Posts: 2
Joined: Mon Jul 10, 2017 6:45 am

Re: [info] ESP32-EVB board for IoT with Ethernet 100Mb interface..

Postby pbecchi » Mon Jul 10, 2017 6:57 am

I am trying to use SD card of rev B board.
I have tried the example of https://github.com/espressif/arduino-es ... braries/SD.
No way to make it work!
There is any way (example) of accessing SD card?
A new or different library is required?


pbecchi
Posts: 2
Joined: Mon Jul 10, 2017 6:45 am

Re: [info] ESP32-EVB board for IoT with Ethernet 100Mb interface..

Postby pbecchi » Mon Jul 10, 2017 12:10 pm

I have uncomented the line and rebuilt, but it doesn t work. I get this :

E (433) sdmmc_req: handle_idle_state_events unhandled: 00000004 00000000
E (434) sdmmc_cmd: sdmmc_card_init: send_op_cond (1) returned 0x107
Card Mount Failed

User avatar
rudi ;-)
Posts: 1134
Joined: Fri Nov 13, 2015 3:25 pm

Re: [info] ESP32-EVB board for IoT with Ethernet 100Mb interface..

Postby rudi ;-) » Sat Jul 15, 2017 9:39 am

pbecchi wrote:I have uncomented the line and rebuilt, but it doesn t work. I get this :

E (433) sdmmc_req: handle_idle_state_events unhandled: 00000004 00000000
E (434) sdmmc_cmd: sdmmc_card_init: send_op_cond (1) returned 0x107
Card Mount Failed



There are going many things crossed in this theme
you try to use the shematic example on SPI in Arduino on the EVB Board?
Be sure, you use the right example code on right shematic and right Board.

there are more as 3 different examples
Arduino:
SD Card example with SD_MMC
SD Card example with SD on SPI Mode
SD Card example with SD on Bit Bang SPU mode

ESP-IDF
SD Card example with HARDWARE Support in SD Card by 4-bit
SD Card example with HARDWARE Support in SD Card by 1-bit

each example need different wireing and "pullups" or not.

Which IDE / ESP-IDF you use?
There are
Arduino IDE
Eclipse IDE with ESP-IDF
Eclipse IDE with Arduino plugin

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

Who is online

Users browsing this forum: No registered users and 3 guests