Is it just me, or is Wiznet not working in V77?

Posted on
  • I know it was working just after my Picos arrived, but tonight I tried in several network ports with two different wiznet modules.... The basic demo code just hangs:

    SPI2.setup({ mosi:B15, miso:B14, sck:B13 });
    var eth = require("WIZnet").connect(SPI2, B10);
  • Damn. No, it's not you. Firmware 1v76 does work though

    Just found out that SPI2 looks broken in 1v77 (short out B14/15 and try sending data).

    Looks like the change to get I2C2 working messed it up :(

    I've filed a bug for this and I'll have a look over the next few days:­ues/525

  • Man x_x

    At this point then, the only way to get working internet on the Pico is to downgrade to 76 (with the memory bugs), or connect the wiznet adapter via jumpers, instead of on a shim? (since ESP8266 is useless until the bug with the connection not being closed is fixed, which I can't even attempt to do because I can't load my own version of the "AT" module :-/

  • Hello Gordon and Friends here,
    first af all I like to say Thanks to Gordon for the massive work doing. He is a one man company doing Hardware and Software all by him self. Let's support him as best as we can. Bugs can happen and Gordon will fix is soon. I'm sure.
    I started to add anpother W5500 Module to the Espruino Pico - and encountered same problem :-(
    Please see my setup here:
    Espruino Pico + W5500BoB + RJ45
    So, I downgraded my Pico to Firmware 1.75 and it works, but only 90%.
    Now, I have another Problem that the W5500BoB does not have a pre-programmed MAC-Addresss and IP setup.
    All is ..00:00:00.. and without MAC-address also DHCP can not work.
    The difference is, that the WIZ550io has a small PIC12 on board to pre-config the W5500 in a few ms (at startup) with unique MAC-address and a first static IP ++++
    So with WIZ550io Module it's no problem.
    But how to get the MAC address into the W5500 without that pre-setting ?
    The W5500BoB has only the W5500 chip, and that's empty at the start.
    And, I could not find any command for setting up the MAC-address.
    => I added code into the W5500 driver inside the Espruino's C code - but the 1.77 is not working ... see main topic is all about here. And I don't like to fork from 1.76 or even 1.75.
    I'm trapped for the next few day - I think.
    Please debug the 1.77 and help me to add MAC-address setup into Espruino FW.
    best regards, Joachim

  • which I can't even attempt to do because I can't load my own version of the "AT" module :-/

    Didn't the comment I made in the bug you filed help?


    Yes, sorry about the SPI bug - if you want to get it working I'd consider just checking out the RELEASE_1V76 tag for now and basing your changes off that.

    I'll try and fix the SPI thing tomorrow (or today if I get time) but I've got to send out a bunch of the remaining Pico kits today, and also to file my VAT return or I'll get fined :)

    My personal choice would be to modify setIP so that the MAC address can be changed if it is specified. That way it's not causing issues for the W550io by changing its MAC address after it's already set its IP up?

  • Hello Gordon, thanks for the answer.
    You can change MAC address at any time. It's just a 6 byte register in the W5500 chip. You can do that also at the WIZ550io Module, if you like to. Of cause not while you have an open=connected TCP Socket, but no problem beside that. A new ARP will be send with next socket opereation, and maybe a new IP address needed from the DHCP-Server, ...

    The Idea with using .setIP() command for the MAC-address change is good.
    I'll try that, maybe you're more quick at that anyway.
    Good luck with the bug fixing and create 1.78 then - best regards, Joachim.

  • Didn't the comment I made in the bug you filed help?

    Now that I read it, it should. Sorry about that - I totally missed that line. I likely read the response on my phone and didn't catch the last line.

  • 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)
    >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": "",
      "subnet": "",
      "gateway": "",
      "dns": "",
      "mac": "00:00:00:00:00:00"
     } // OK, all empty, as expected
    >eth.setIP() // make DHCP
    > Receive DHCP_OFFER
    > Send DHCP_Request
    > Receive DHCP_ACK // success
    >eth.getIP() // read out new W5500 address register content
      "ip": "", // received IP-Address
      "subnet": "",
      "gateway": "",
      "dns": "",
      "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
    >eth.getIP() // read out W5500 internal registers
      "ip": "",
      "subnet": "",
      "gateway": "",
      "dns": "",
      "mac": "00:08:8e:18:8e:2a" // it's different, strange ?!?!
    >eth.setIP() // a new request to DHCP
    > Receive DHCP_OFFER
    > Send DHCP_Request
    > Receive DHCP_ACK // working OK
    >eth.getIP() // read out again
      "ip": "", // new IP received from Server, OK
      "subnet": "",
      "gateway": "",
      "dns": "",
      "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

  • Hi Joachim,

    Thanks for letting me know! It's possible it's something to do with my parsing of the Mac address.

    Actually - yes, it is. I'm an idiot... It multiplies the first hex character of each block by 10 not 16 (I tested it with 01:02:03:04:05, but that doesn't check it!).

    I'll fix it for 1v79

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Is it just me, or is Wiznet not working in V77?

Posted by Avatar for DrAzzy @DrAzzy