Before talking about it here is the schematics:
With the regular Ethernet library it doesn't seem to be able to pick up that this is the W5500 chip. It stops around this area and returns 0 on the very first readMR():
Code: Select all
uint8_t W5100Class::isW5500(void)
{
chip = 55;
Serial.println("w5100.cpp: detect W5500 chip");
if (!softReset()) return 0;
Serial.println("Softreset worked");
writeMR(0x08);
if (readMR() != 0x08) return 0;
Serial.println("First read");
writeMR(0x10);
if (readMR() != 0x10) return 0;
Serial.println("Second read");
writeMR(0x00);
if (readMR() != 0x00) return 0;
int ver = readVERSIONR_W5500();
Serial.print("version=");
Serial.println(ver);
if (ver != 4) return 0;
//Serial.println("chip is W5500");
return 1;
}
For reference the code, the regular ESP32 setup is in another file:
Code: Select all
#include <Arduino.h>
#include <SPI.h>
#include <Ethernet.h>
// Update these with values suitable for your network.
byte mac[] = { 0xDE, 0xED, 0xBA, 0xFE, 0xFE, 0xED };
IPAddress ip(10, 0, 0, 198); // 10.0.0.138
IPAddress serverIp(134, 122, 95, 249);
EthernetClient ethClient;
PubSubClient client(serverIp, 1883, callback, ethClient);
void connectEtherneth()
{
Serial.println("Starting ETHERNET connection...");
Ethernet.init(ETHERNET_CS_PIN);
if(!Ethernet.begin(mac)) {
Serial.println("Ethernet initialising failed");
}
delay(1500);
Serial.print("Link status");
Serial.println(Ethernet.linkStatus());
Serial.print("Hardware status");
Serial.println(Ethernet.hardwareStatus());
Serial.print("Ethernet IP is: ");
Serial.println(Ethernet.localIP());
}
void setupEthernet()
{
connectEtherneth();
}
I've looked at some other schematics for some shields: https://www.pusr.com/support/downloads/usr-es1-sch
They seem to differ a decent amount from those I found on EasyEDA. Is my schematic unviable?