Comments (25)
what example do you try and how did you wire the module?
from ethernetenc.
Hello,
I have tried the DHCPAddressPrinter example.
I have wire the ESP32 with the module like in this diagram :
I have checked that those are the default SPI pins for the ESP32.
Thanks for your response
from ethernetenc.
try to disable WiFi or if the ENC module can be powered with 5V power it with 5 V.
and try to wire reset pin too.
to be sure: did you change the include to #include <EthernetENC.h>?
from ethernetenc.
I have also tried to supply it with 5V and with the reset pin wired. But is not working.
Is there any way to reset the module programatically?
I attach the code, in case you see any error or something
from ethernetenc.
try byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
from ethernetenc.
Nothing, it keeps getting stucked in Ethernet.begin(mac).
Why would a change in the MAC solve my problem?
Thanks, but the Ethernet example is still not working
from ethernetenc.
could you try the WebServer example with a correct static IP?
from ethernetenc.
Sorry, but nothing either:
The following messages appear in the Serial port :
Ethernet WebServer Example
Ethernet shield was not found. Sorry, can't run without hardware. :(
I have connected to my gateway in order to see if it detects the ESP32 through the ENCJ module but it does not appear.
I have checked also to connect with other devices to the router and the DHCP is activated, so the IP addresses are assigned automatically.
I will try with another Ethernet module because I cannot imagine what could be wrong.
Thanks you.
from ethernetenc.
Hey, I have tried with another module and the WebServer with static IP is working!!
However the DHCP addressing is not working.
Trying to get an IP address using DHCP
Failed to configure Ethernet using DHCP
Local IP : 0.0.0.0
Subnet Mask : 0.0.0.0
Gateway IP : 0.0.0.0
DNS Server : 0.0.0.0
Why this could be happening? Is the router not being able to detect the ESP32 or the hardware of the module?
Thanks.
from ethernetenc.
Hi, I just tried your code on a Wio Terminal board and it is working.
Please include this code in Setup to see if the rigth SPI pins for your board are used.
void setup() {
Serial.begin(115200);
while (!Serial);
//Ethernet.init(GPIO_NUM_5); // ESP32 with Adafruit Featherwing Ethernet
// Just info to know how to connect correctly
Serial.println("=========================");
Serial.println("Currently Used SPI pinout:");
Serial.print("MOSI:");
Serial.println(MOSI);
Serial.print("MISO:");
Serial.println(MISO);
Serial.print("SCK:");
Serial.println(SCK);
Serial.print("SS:");
Serial.println(SS);
delay(2000);
....
....
If the pins are correct, I would try to use 10kOhm resistors as pull ups on the SPI lines.
from ethernetenc.
@RoSchmi, SPI already works for @arangu97
from ethernetenc.
Yes, communication is working, but only when an static IP is assigned.
Have you tried the DHCP example and is working for you?
from ethernetenc.
Yes, on my Board (Wio Terminal = not ESP32) your example 'ethernet_test.zip' is working using DHCP. Or do you mean another example, then please give a link. If you use static IP with your 'ethernet_test.zip' example with the the command Ethernet.begin(mac, ip);, can you verify that the Enc28 is listed in the list of active devices in your router?
Have you tried to leave away the command 'Ethernet.init(GPIO_NUM_5);'
On the page -https://github.com/khoih-prog/EthernetWebServer_SSL, there are many hints how to initialize different Ethernet modules on different boards
from ethernetenc.
@arangu97 Just tried with an ESP32 board, DHCP works, router is a 'FritzBox'
from ethernetenc.
Yes thank you, I have also tried with another router connected to Internet and DHCP is working.
Maybe the router without WAN connection(only for LAN testing) was not using properly the DHCP protocol....
from ethernetenc.
Same problem here. Using ESP32 dev getting EthernetNoHardware, even though the UIPEthernet library works fine.
from ethernetenc.
Same problem here. Using ESP32 dev getting EthernetNoHardware, even though the UIPEthernet library works fine.
do you have Ethernet.init to set the CS pin?
from ethernetenc.
Yes, I do have Ethernet.init(5) and CS is connected to GPIO5.
from ethernetenc.
reduce the SPI speed in utility/Enc28J60Network.cpp
#define SPI_ETHERNET_SETTINGS SPISettings(20000000, MSBFIRST, SPI_MODE0)
to 10 000 000 or less
from ethernetenc.
10 000 000, 8 000 000, 4 000 000 didn't work how low should I try? Default speed for ESP32 seems to be 1000000, I tried it and it still doesn't work.
from ethernetenc.
@bkaraceylan If you are still having problems, you could post your actual code.
from ethernetenc.
It is the basic example but sure here it is:
#include <EthernetENC.h>
EthernetClient ethClient;
uint8_t mac[6] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
void BeginEth(){
Serial.println("Init eth");
Ethernet.init(5);
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// Check for Ethernet hardware present
if (Ethernet.hardwareStatus() == EthernetNoHardware) {
Serial.println("Ethernet shield was not found. Sorry, can't run without hardware. :(");
while (true) {
delay(1); // do nothing, no point running without Ethernet hardware
}
}
if (Ethernet.linkStatus() == LinkOFF) {
Serial.println("Ethernet cable is not connected.");
}
// try to configure using IP address instead of DHCP:
//Ethernet.begin(mac, ip, myDns);
} else {
Serial.print("DHCP assigned IP ");
Serial.println(Ethernet.localIP());
}
}
void setup(){
Serial.begin(115200);
BeginEth();
}
void loop(){
}
from ethernetenc.
@bkaraceylan No problems here with your code on an Esp32 Dev board and the latest EthernetEnc library. Got an Ip-Address by DHCP. Perhaps you should doublecheck your electrical connections.
from ethernetenc.
EthernetENC asks the DHCP to send the IP address as unicast because broadcast receiving is turned off (UIPEthernet has it on). if the DHCP server sends the UDP message with the IP lease as broadcast, it is not received.
try with static IP address.
from ethernetenc.
I freaking swapped the MOSI and MISO wirings and then it suddenly worked.
If your module does not respond, make sure you have tried it as well.
from ethernetenc.
Related Issues (20)
- Network connection goes deaf. HOT 3
- Limitation of length in UDP ? HOT 8
- Sending UDP message Error HOT 7
- [FR] Project Examples for PlatformIO Registry HOT 1
- not pingable after a while HOT 12
- conflict with webthing HOT 1
- Usage with earlephilhower / arduino-pico
- Use pico-w with EthernetENC and WiFi problem HOT 1
- can esp32-s2 use this library ? HOT 1
- Can I integrate this lib. with esp32 HTTPClient? HOT 1
- Request setting custom hostName HOT 1
- STM32F103C8 After Inactive Connection.
- trying to send broadcast SSDP message HOT 2
- Problem by traffic through switches HOT 3
- Ping command with ENC28J60 + D1 mini Wemos ESP8266 HOT 3
- no function `ethernet.MACAddress()` to drop-in replace ethernet.h HOT 2
- Port Reuse on TCP Connections HOT 2
- UDP totally broken with Arduino Nano HOT 8
- Teensy 4.1 connection issues HOT 4
- client.stop() not sending FIN packet to peer device? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ethernetenc.