Actually it should come out at least 10MBits. In this post someone has also only managed to get 3MBits at first and then further down with the w5500 over 10MBits:
How do I manage that too?
This is my code for the iperf on the ESP32 (SPI pins are the default ones i used):
void loop() {
byte buf[1024];
EthernetClient client = server.available();
if (client) {
Serial.println("Here is a new client for checking Arduino performance");
while (client.connected()) {
if (client.available()) client.read(buf, 1024);
}
client.stop();
Serial.println("client disconnected");
}
}
#include <SPI.h>
#include <Ethernet.h>
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// Set the static IP address to use if the DHCP fails to assign
#define MYIPADDR 192,168,2,28
#define MYIPMASK 255,255,255,0
#define MYDNS 192,168,2,1
#define MYGW 192,168,2,1
//EthernetClient client;
EthernetServer server(5001);
unsigned long startTime;
void setup() {
Serial.begin(115200);
delay(1000);
Serial.println("Begin Ethernet");
Serial.println("CS PIN 5");
Serial.println("Hat geklappt");
server.begin();
// You can use Ethernet.init(pin) to configure the CS pin
//Ethernet.init(10); // Most Arduino shields
Ethernet.init(5); // Ändere die CS-Pin-Nummer entsprechend deiner Verdrahtung
//Ethernet.init(20); // Teensy++ 2.0
//Ethernet.init(15); // ESP8266 with Adafruit FeatherWing Ethernet
//Ethernet.init(33); // ESP32 with Adafruit FeatherWing Ethernet
if (Ethernet.begin(mac)) { // Dynamic IP setup
Serial.println("DHCP OK!");
}
else {
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.");
}
IPAddress ip(MYIPADDR);
IPAddress dns(MYDNS);
IPAddress gw(MYGW);
IPAddress sn(MYIPMASK);
Ethernet.begin(mac, ip, dns, gw, sn);
Serial.println("STATIC OK!");
}
delay(5000);
Serial.print("Local IP : ");
Serial.println(Ethernet.localIP());
Serial.print("Subnet Mask : ");
Serial.println(Ethernet.subnetMask());
Serial.print("Gateway IP : ");
Serial.println(Ethernet.gatewayIP());
Serial.print("DNS Server : ");
Serial.println(Ethernet.dnsServerIP());
Serial.println("Ethernet Successfully Initialized");
}
void loop() {
byte buf[1024];
EthernetClient client = server.available();
if (client) {
Serial.println("Here is a new client for checking Arduino performance");
while (client.connected()) {
if (client.available()) client.read(buf, 1024);
}
client.stop();
Serial.println("client disconnected");
}
}
i got
MISO,MOSI,SCK,CS
connected
i think It's because i need to set it to 80Mhz but i dont know