• I use a module WIZnet W5500 for network.
    My code:

    let WIZnet = require("WIZnet");
    var http = require("http");
    SPI2.setup({mosi: B15, miso: B14, sck: B13});
    let eth = WIZnet.connect(SPI2, B12);
    setTimeout(function() {
      eth.setIP();
      console.log("ip", eth.getIP());
    },1000);
    

    If I unplug the net cable, this code stopped in 'ERROR: No free sockets found', but I don't know how to catch this error.

    On the other hand, how do I continuedly listen the eth while I plug the net cable for initializing the network?

  • Well the W5500 implementation is missing a getStatus() so it is not possible at the moment. If go to the datasheet you will find the reset pin, which needs to be triggered to reset the device.
    Check this question on githup.

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

How can I listen the WIZnet module and catch its errors?

Posted by Avatar for user109783 @user109783

Actions