Olimex Support Forum

Microcontrollers => ESP32 => Topic started by: diego on August 23, 2018, 05:32:59 PM

Title: Ethernet communications in ESP32-EVB
Post by: diego on August 23, 2018, 05:32:59 PM
Hello everyone.

Please forgive me if this question is too stupid, but I have limited experience on this subject. I am trying to communicate with an ESP32-EVB Rev D board over ethernet. I can successfully run the ETH_PHY_demo sample from https://github.com/OLIMEX/ESP32-EVB/tree/master/SOFTWARE/ETH_PHY_demo. I am receiving an IP address from the DHCP server and I can successfully ping the board from other devices in the network.

Now I would like to exchange some UDP datagrams with other devices, but I do not know how to proceed. Is there a socket library, or something of the kind?

Thank you.
Title: Re: Ethernet communications in ESP32-EVB
Post by: nameer.kazzaz on November 07, 2018, 05:42:01 PM
Hi can you please help

Im using MicroPython v1.9.4-683-gd94aa577a on 2018-11-07; ESP32 module with ESP32 with ESP32-POE

when i use this:

import machine
import network

lan = network.LAN(mdc = machine.Pin(23), mdio = machine.Pin(18), power = machine.Pin(12), phy_type = network.PHY_LAN8720, phy_addr=0)
lan.active(1)

I get:

I (709910) emac: emac resetting ....
I (709920) emac: emac resetting ....
I (709920) emac: emac resetting ....
I (709930) emac: emac resetting ....
I (709930) emac: emac resetting ....

How do i set the CLOCK?

Thanks
Title: Re: Ethernet communications in ESP32-EVB
Post by: LubOlimex on November 08, 2018, 09:34:25 AM
Try with power = machine.Pin(17)

Also post in the MicroPython's forums (if you haven't already).
Title: Re: Ethernet communications in ESP32-EVB
Post by: vinifr on November 13, 2018, 12:28:26 PM
Quote from: diego on August 23, 2018, 05:32:59 PM
Hello everyone.

Please forgive me if this question is too stupid, but I have limited experience on this subject. I am trying to communicate with an ESP32-EVB Rev D board over ethernet. I can successfully run the ETH_PHY_demo sample from https://github.com/OLIMEX/ESP32-EVB/tree/master/SOFTWARE/ETH_PHY_demo. I am receiving an IP address from the DHCP server and I can successfully ping the board from other devices in the network.

Now I would like to exchange some UDP datagrams with other devices, but I do not know how to proceed. Is there a socket library, or something of the kind?
Yes. The ESP-IDF has the LWIP stack integrated into its code, so we can use TCP and UDP sockets.

UDP client: https://github.com/espressif/esp-idf/tree/master/examples/protocols/sockets/udp_client (https://github.com/espressif/esp-idf/tree/master/examples/protocols/sockets/udp_client)
UDP multicast: https://github.com/espressif/esp-idf/tree/master/examples/protocols/sockets/udp_multicast (https://github.com/espressif/esp-idf/tree/master/examples/protocols/sockets/udp_multicast)
UDP server: https://github.com/espressif/esp-idf/tree/master/examples/protocols/sockets/udp_server (https://github.com/espressif/esp-idf/tree/master/examples/protocols/sockets/udp_server)

All the sockets examples: https://github.com/espressif/esp-idf/tree/master/examples/protocols/sockets (https://github.com/espressif/esp-idf/tree/master/examples/protocols/sockets)
Title: Re: Ethernet communications in ESP32-EVB
Post by: jonn on December 07, 2018, 04:29:54 AM
I am just getting a board in tomorrow.

I assume that there are AT commands to set the board up into bridge mode?  If there are, I have not been able to find any examples, are there any?

Thanks!

Jon