W5500 ethernet module compatibility w/ Argon

Can Argon work with a W5500 module? I'm starting up with this today, and before I start digging any deeper, I wanted to ask the community.

I am aware that there's the featherwing, but I had a couple of W5500 sitting in my drawer from previous Arduino projects. I have read posts like this, a more recent one and from my understanding I don't see why I can't interface W5500. This blogpost allegedly made it work.

Up to now I tried the output of this and surprisingly I get Ethernet present but not ready. The FDX lights from the Ethernet module won't even light up (the module is on).

I also tried a very simple sketch whose output does not make sense to me:

SYSTEM_THREAD(ENABLED);

void setup() 
{
  System.enableFeature(FEATURE_ETHERNET_DETECTION);
  Serial.begin(9600);
}
void loop() {
  delay(1s);
  if (!Ethernet.ready()) {
    
    uint16_t seconds = Ethernet.getListenTimeout();
    Serial.printlnf("Timeout is set to %16x", seconds);
    Ethernet.listen();
    Ethernet.connect(); // If there are no credentials stored, this will enter listening mode. WRONG! IT WONT CHANGE TO LISTEN MODE
    if (Ethernet.listening()) {
      Serial.printlnf("localIP: %s", Ethernet.localIP().toString().c_str());
      Serial.printlnf("Device is listening...");
      Ethernet.setListenTimeout(30000);
      seconds = Ethernet.getListenTimeout();
    }
    Serial.printlnf("Timeout is set to %u\n", (unsigned int)seconds);
  }
  delay(3s);

Timeout is set to 0
localIP: 0.0.0.0
Device is listening...
Timeout is set to 0

Meaning that I'm probably not even using setListenTimeout() correctly.

The device successfully runs on Listening Mode, but I don't know how to set it up, as I couldn't find a similar to this function.

I have also tried setting D4 and D5 as output, but nothing turns up.

Bonus Q...
Ethernet.setListenTimeout() at least on my system did not work with chrono literals as advised.

Apologies if that's a long trial-then-error post I just wanted to showcase that I really gave it sometime before resorting to the experts :slight_smile:

Yes, a plain W5500 will work with Gen 3 devices including the Argon as long as you wire it exactly the same way:

Particle Pin Ethernet FeatherWing Pin
MISO SPI MISO
MOSI SPI MOSI
SCK SPI SCK
D3 nRESET[1]
D4 nINTERRUPT[1]
D5 nCHIP SELECT[1]

In particular, make sure the reset and interrupt pins are wired correctly as they are both required.

Now that you have FEATURE_ETHERNET_DETECTION set, you should not need special firmware at all. That flag is persistent. I don’t think the code above will work correctly. But you can just flash a regular version of Tinker or an empty loop() function and the device should come online and breathe cyan.

If it does not, you can run cloud debug to get a debugging log to see what is failing.

Also, the W5500 support in Device OS requires that the Ethernet interface be the one connected to the Internet (not an isolated network) and have a DHCP server. If that’s not the case, it will not work properly out of the box.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.