I haven't tested teensy to teensy, but I have tested T4.1 to/from linux over 100mbs wired ethernet. The linux box sends 40 1000-byte UDP packets at 97mbs and T41 receives all 40 packets at 94 mbs (94.42 mbs 40 pkts 40000 bytes on port 54040 192.168.1.4). And the T4.1 can blast 1000-byte UDP packets to the linux box @98mbs and the linux box receives all 40 packets (recvd 40 pkts 12249.352703 pps 12249.352703 KBs 97994.821626 Kbs lth=1000)
Code:
void udp_send(int reps, int nbytes) {
uint32_t i, t1, t2;
float mbs;
t1 = micros();
for (i = 0; i < reps; i++) {
Udp.beginPacket(MyServer, 2000); // to udpsink
Udp.write(packetBuffer, nbytes);
Udp.endPacket();
}
t2 = micros() - t1;
mbs = (8.*nbytes * reps) / t2;
Serial.printf("UDP blast %d reps %d bytes %d us %f mbs\n", reps, nbytes, t2, mbs);
}
void udp_recv() {
uint32_t i, t1, t2, pkts, bytes, ipaddr;
char buff[128];
double mbs;
Serial.print(Ethernet.localIP());
while (1) {
sprintf(buff, " port %d, hit key to stop", localPort);
Serial.println(buff);
pkts = bytes = 0;
while (!Serial.available()) {
int n = Udp.parsePacket();
if (n) {
if (!bytes) t1 = micros();
t2 = micros();
bytes += Udp.read(packetBuffer, 1000);
pkts++;
}
}
t1 = t2 - t1;
mbs = (8.*bytes) / t1;
Serial.print(mbs);
sprintf(buff, " mbs %d pkts %d bytes on port %d ", pkts, bytes, Udp.remotePort());
Serial.print(buff);
IPAddress remote = Udp.remoteIP();
Serial.println(remote);
while (Serial.available()) Serial.read(); // consume
}
}