Skip to content

The ethernet.begin(mac) doesn't work #18

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

Closed
ghost opened this issue Aug 27, 2021 · 6 comments
Closed

The ethernet.begin(mac) doesn't work #18

ghost opened this issue Aug 27, 2021 · 6 comments

Comments

@ghost
Copy link

ghost commented Aug 27, 2021

I've just tried to use the EthernetENC library with the WebClient example, but the program it stays in an infinite loop in ethernet.begin (mac); I checked and saw that it does not come out of a while in Enc28J60Network.cpp line 263, because the function readReg(EIR) always return 0x00.

I am using a mkr1010 and enc28j60

Does anyone know what could be wrong?

@ghost
Copy link
Author

ghost commented Aug 27, 2021

I could also observe that when I execute the Ethernet.linkStatus () instruction, it always returns that the cable is disconnected

if (Ethernet.linkStatus() == LinkOFF) { Serial.println("Ethernet cable is not connected."); }

@JAndrassy
Copy link
Member

JAndrassy commented Aug 28, 2021

the SPI communication with the module doesn't work. how did you wire it?
Ethernet.hardwareStatus?

@ghost
Copy link
Author

ghost commented Aug 28, 2021

the SPI communication with the module doesn't work. how did you wire it?
Ethernet.hardwareStatus?

Yes, it is detecting it, it returns 10.
At this moment it is working for me but only with static IP I have managed to do some tests; but by DHCP it has not been possible; and for my application it is better to do it by DHCP

@JAndrassy
Copy link
Member

JAndrassy commented Aug 28, 2021

ok. If the Ethernet.linkStatus() is invoked too soon, it may return LinkOFF.
for DHCP see #9
and https://github.com/jandrassy/EthernetENC/wiki/Limitations

@ghost
Copy link
Author

ghost commented Aug 28, 2021

ok. If the Ethernet.linkStatus() is invoked too soon, it may return LinkOFF.
for DHCP see #9
and https://github.com/jandrassy/EthernetENC/wiki/Limitations

Thank you so much, the problem was solved adding
|ERXFCON_BCEN
in
writeReg(ERXFCON, ERXFCON_UCEN|ERXFCON_CRCEN|ERXFCON_PMEN|ERXFCON_BCEN);
as indicated in #9

@ghost ghost closed this as completed Aug 28, 2021
@RaysoftTechnologiesInc
Copy link

Hi @Daescobarh9415,

I am having an issue in which i am not even able to get the ENC module to work via DHCP, i have tried to follow what you guys discussed here, but no luck so far, would you be able to share with me the files you edited Ijust want to check them out, or maybe explain exactly where i go edit in the code.

I am trying to interface the ENC module with a Nucleo using mbed. I will greatly appreciate your assistance.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants