Ethernet communications in ESP32-EVB

Started by diego, August 23, 2018, 05:32:59 PM

Previous topic - Next topic

diego

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.

nameer.kazzaz

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

LubOlimex

Try with power = machine.Pin(17)

Also post in the MicroPython's forums (if you haven't already).
Technical support and documentation manager at Olimex

vinifr

#3
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
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

All the sockets examples: https://github.com/espressif/esp-idf/tree/master/examples/protocols/sockets

jonn

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