Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ethernet PHY IP101 #3554

Closed
dslc opened this issue Dec 9, 2019 · 13 comments
Closed

Support for ethernet PHY IP101 #3554

dslc opened this issue Dec 9, 2019 · 13 comments
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@dslc
Copy link

dslc commented Dec 9, 2019

Hardware:

Board: ESP32-Ethernet-Kit V1.1
Core Installation version: 1.0.2
IDE name: Arduino IDE

Description:

I know that the IP101 ethernet phy is supported in the ESP IDF - but am hoping to use the Arduino library for a particular project. When testing the ESP32 ethernet kit I noticed that the IP101 is not officially supported in Arduino ESP32.

However ... After making some trivial modifications to the ETH.h and ETH.cpp files, it seems that the SDK actually supports it. The sketch below - adapted from this example works after the afore-mentioned tweaks.

Please see the patch attached.

I have only tested this change very briefly though. Is there a reason that ETH_PHY_IP101 is not offered in ETH.h?

Sketch:

Here is the sketch. It seems to work after applying the patch attached. (I have only tested it very briefly.)

The phy address for the IP101 on the ethernet kit is 1.

#include <ETH.h>

#define ETH_ADDR        1
#define ETH_POWER_PIN   5
#define ETH_TYPE        ETH_PHY_IP101

// snip

void setup()
{
  Serial.begin(115200);
  WiFi.onEvent(WiFiEvent);
  ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_TYPE);
}

phy_ip101.patch.txt

@Blom1974
Copy link

Tested this and it works great! Saved me lots of headache.

@DheeranYuvaraj
Copy link

Hi @dslc

it works fine with Espressif Ethernet kit_V1.1

@lathoub
Copy link

lathoub commented Mar 9, 2020

I made the changes to both ETH.cpp and ETH.h, but got a error: 'phy_ip101_default_ethernet_config' was not declared in this scope

extern const eth_config_t phy_ip101_default_ethernet_config; is declared in thy_ip101.h, but that it about it.

I'm using the Latest stable release espressif/arduino-esp32 v1.0.4 from October 2019

What am I missing?

Thank you

@DheeranYuvaraj
Copy link

Hi @lathoub
I'm attaching ETH(cpp) ETH(h) files and EthernetLAN_IP101(ino) Arduino example code.

Try to use this.

ETH(cpp).txt
ETH(h).txt
EthernetLAN_IP101(ino).txt

@lathoub
Copy link

lathoub commented Mar 12, 2020

putting randomSeed(analogRead(0)); before ETH.begin results in a E (2086) emac: Reset EMAC Timeout error

@lathoub
Copy link

lathoub commented Mar 14, 2020

Assume analog pin 0 is not free! Don't use analog 0 as seed for randomiser.

@stale
Copy link

stale bot commented May 13, 2020

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label May 13, 2020
@Blom1974
Copy link

Thinking this should be merged into the SDK !

@stale
Copy link

stale bot commented May 13, 2020

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

@stale stale bot removed the Status: Stale Issue is stale stage (outdated/stuck) label May 13, 2020
@atanisoft
Copy link
Collaborator

@Blom1974 for it to be considered it needs to be submitted as a PR

@stale
Copy link

stale bot commented Jul 12, 2020

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Jul 12, 2020
@stale
Copy link

stale bot commented Jul 26, 2020

[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Jul 26, 2020
@christianbj
Copy link

Hi @dslc

How do I implement the fixes for the PHY IP101 in the libs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

6 participants