Need help with custom board that uses Teensy 4.1 (NativeEthernet) and separate W5500


New member
I first want to say that I am new to Teensy programming. I have a customized circuit board that has an embedded W5500 chip and a socket for a Teensy 4.1 board. The Teensy board has pins soldered into it's built-in ethernet (Rx+, Rx-, Tx+ Tx-) that plug into a connection on the custom board. Those pins are wired to a RJ45 cat5 connector that plugs into a hub. The W5500's TXN, TXP, RXN, RXP pins are wired to a RJ45 cat5 connector that plugs into a hub. The connection between the Teensy and the W5500 is as follows:

Teensy pin | W5500 pin
----------- | -------------
2 | 27
3 | 25
10 | 32
11 | 35
12 | 34

I am programming using Arduino 1.5.8 using Visual Studio Code as the IDE. I am using the NativeEthernet library for the Teensy 4.1 ethernet and it works fine. The problem I am having is with the W5500. I have tried using the Ethernet library with the W5500 and have not had any success. Using some debug statements in the code, I saw that the W5500 is recognized as the chip. However, I am not able to get it to establish a link when the ethernet cable is plugged in. I get a LINKOFF status when the ethernet cable is plugged and unplugged. The goal is to use the Teensy ethernet (Native) as the primary ethernet and the W5500 as the secondary ethernet (failover). I need to know if there is something I am forgetting to set up in my code so that the Teensy can communicate using the W5500. I am using the LinkStatus.ino sample program to test this out. Please help, if you can.
You’ve given me the idea to add multiple interfaces to the QNEthernet library. Right now, it supports either the native Ethernet or the W5500 (this driver is not yet committed, but it’s in a discussion comment in the repo on GitHub). No promises, but I’ll be exploring the topic.

The QNEthernet library uses lwIP under the covers, and that stack supports multiple interfaces. The trick is fitting it into the Arduino-style API.

Update: There’s a way to do it, but I don’t think I’ll do this now (time constraints).
Last edited: