• Thanks Gordon for the SPI I/F repair and setIP() command update in version 1.78.
    After reset all W5500 registers are 0x00 - OK.
    And, for DHCP with setIP(), the MAC is updated to 00:08:DC:01:02:03 by default if not specified before.
    The 00:08:DC = "WIZnet" and the 01:02:03 is just random to have a valid value here.
    Now, the W5500BoB is working too :-).

    Just one more strange effect - the MAC-Address looks scrambled after a direct change and then read-back.
    WEB IDE:

    >SPI2.setup({ mosi:B15, miso:B14, sck:B13 }) // for PICO + W5500 (Shim)
    =undefined
    >var eth = require("WIZnet").connect(SPI2, B10) // make the Ethernet object
    ={  }
    >eth.getIP() // just read out the start values out of W5500, expect all 0x00 here
    ={
      "ip": "0.0.0.0",
      "subnet": "0.0.0.0",
      "gateway": "0.0.0.0",
      "dns": "0.0.0.0",
      "mac": "00:00:00:00:00:00"
     } // OK, all empty, as expected
    >eth.setIP() // make DHCP
    > Send DHCP_DISCOVER
    > Receive DHCP_OFFER
    > Send DHCP_Request
    > Receive DHCP_ACK // success
    =true
    >eth.getIP() // read out new W5500 address register content
    ={
      "ip": "192.168.111.190", // received IP-Address
      "subnet": "255.255.255.0",
      "gateway": "192.168.111.1",
      "dns": "192.168.111.1",
      "mac": "00:08:dc:01:02:03" // here default address, ..01:02:03, OK.
     }
    >eth.setIP({ mac : "00:08:dc:1e:dc:3c" }) // change MAC-Address here
    =true
    >eth.getIP() // read out W5500 internal registers
    ={
      "ip": "192.168.111.190",
      "subnet": "255.255.255.0",
      "gateway": "192.168.111.1",
      "dns": "192.168.111.1",
      "mac": "00:08:8e:18:8e:2a" // it's different, strange ?!?!
     }
    >eth.setIP() // a new request to DHCP
    > Send DHCP_DISCOVER
    > Receive DHCP_OFFER
    > Send DHCP_Request
    > Receive DHCP_ACK // working OK
    =true
    >eth.getIP() // read out again
    ={
      "ip": "192.168.111.127", // new IP received from Server, OK
      "subnet": "255.255.255.0",
      "gateway": "192.168.111.1",
      "dns": "192.168.111.1",
      "mac": "00:08:8e:18:8e:2a" // still same strange MAC-Address, we can work with that anyway
     }
    >
    

    I need to check the source codes, but the MAC address is changed into the 'strange' one always in the same way. Also, if I add just +1 to my intended MAC the 'strange' version also become +1.
    => it's not random. I'm OK with that.
    I think something is wrong while Read or Write the MAC-Address register.

    Thanks and best regards, Joachim, WIZnet Europe GmbH

About

Avatar for 4jochen @4jochen started