Wiznet WiZ5100

Posted on
  • Hi!

    I would like to use that very cheap modules on ebay based on Wiznet WIZ5100 chip. Is possible to use current libraries for wiznet with this modules ?

    Regards!

  • Hi,

    I believe you can use almost the same code, but you'd have to recompile the Espruino firmware.

    Basically you just need to copy W5100 out of WIZnet's libraries into this directory, and then change the Makefile so that they get used instead of the W5500.

    There may be a few other minor changes, but if you did get this working then it'd be great if you issued a Github Pull Request with your code, and then I could offer both W5500 and W5100 versions of the binaries.

  • I've not looked at the Wiznet chips in detail are they similar from a hardware point of view, do you think its feasible to support different Wiznet chips with one build of code that detects, what Wiznet chip it is talking to?

  • I'm not 100% sure about that - it may be possible if you re-wrote their drivers with some extra level of abstraction in there.

    Someone actually suggested that I offer some 'online image compiler' that let you choose exactly what you wanted in your build. At the very least, the Web IDE should have a drop-down to select which binary to use. It would make this process a whole lot easier.

  • Is it just the w5500.h and w5500.c files that define the interface to the Wiznet chip? I like the idea of being able to choose what image to use within the web IDE. You would probably only have wired or wireless Ethernet for instance. Do you have a link to the Wiznet libraries, I could have a look at the different chip types.

  • I think it is, the contents of the W5500 folder. You'd have to do some research though - it may be harder than that.

    All the software is on GitHub: https://github.com/Wiznet/ioLibrary_Driver/tree/master/Ethernet

  • Thank a lot for that

  • Have you had any luck with this? I just updated the link above.

    I'd be interested in getting support in as part of the repo - it could end up being quite useful, especially with the Arduino form factor boards.

  • I've got two of the W5100 Arduino Ethernet Shield 05 (at least according to this page) so I plan on testing those as I get to it.

    However for now there seems to be something wrong on my side. Perhaps the PR reported .bin size issues are not valid as I found that my vagrant created VM is not delivering a working .bin. I also tried to compile master even w/o wiznet myself and tried flashing it through the 'Advanced Flashing' in the EspruinoIDE and it failed the same way (EspruinoBoard v1.3). It doesn't come up after RST, after a seemingly successful flash procedure. It is not present in the connectable USB devices after that. The official travis-built master from http://www.espruino.com/binaries/travis/master/espruino_1v95.153_espruino_1r3.bin works fine though.

    Here are the steps I do this to build the firmware .bin

    vagrant up
    vagrant ssh
    cd /vagrant
    source scripts/provision.sh ESPRUINOBOARD
    RELEASE=1 BOARD=ESPRUINOBOARD make
    

    Any idea why this could be broken?

  • Ah, I guess I got it. As documented in README_Building.md I need to build bootload+firmware image using scripts/create_espruino_image_1v3.sh. Will try tomorrow.

  • Yep, that's it - or as happens for Travis you can do PAD_FOR_BOOTLOADER=1 on the command-line and it'll pad the bootloader area with 0xFF (which is fine, because the IDE doesn't update the bootloader).

    In terms of the filesize issues you were having, maybe knock some libraries out of ESPRUINOBOARD.py. I'll have a look nearer the 1v96 release and will see what I can do to get the binary size back down by fiddling with other bits of code.

    ... of course you could also try some ST Nucleo boards if you have them, since they have the Arduino pinout on them as well.

  • Thank you Gordon! Got it flashing correctly...

    After few experiments though I closed the flashing dialog during a running flash and pressed RST on the board which bricked it. Now I need do learn how to do the serialflash procedure I guess ;)

    So no real W5100 success on my side yet.

  • That's odd - the bootloader shouldn't be able to overwrite itself, so it should keep working even if you accidentally reset it... If that bricked them I'd have a lot more returns :)

    I'll have a try on this side and see if I have any luck with it.

  • So I managed to resurrect the Espruino board with serialflash.

    However I didn't have much luck so far with the current master. I tried using 3.3V as well as with level shifters to 5V (according to the shield spec).

    >var eth = require("WIZnet").connect();
    =Ethernet {  }
    >eth.getIP()
    ={
      "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"
     }
    >eth.setIP({ "ip": "10.0.5.3", "subnet": "255.255.255.0",
    : "gateway": "10.0.5.1", "dns": "8.8.8.8", "mac": "aa:bb:cc:dd:ee:ff"
    : });
    =true
    >eth.getIP()
    ={
      "ip": "0.0.0.0",
      "subnet": "0.0.0.0",
      "gateway": "0.0.0.0",
      "dns": "8.8.8.8",
      "mac": "00:00:00:00:00:00"
     }
    
  • I actually had mine working (although there was a looong timeout waiting for the socket to close).

    When that happened on mine, it was actually a wiring issue. The W5100 Arduino footprint board I used only actually brought SPI out to the ICSP header, not to D13/12/11 like I'd thought. Fixed that and it was fine :)

  • Finally I got it working. The wiring based on the schematics is as follows

               SHIELD      Espruino
    MOSI   ICSP4          B5
    MISO   ICSP1          B4
    SCK    ICSP3          B3
    CS     JHIGH3 (10)    B2
    3V3    ICSP2          3V3
    GND    ICSP6          GND
    

    The shield worked with 3.3V as well as 5V wiring with level shifters.

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

Wiznet WiZ5100

Posted by Avatar for user50313 @user50313

Actions