UNO W5100 Shield not pinging.



  • I have my gateway working with UNO R3 and controlling one relay switch with ENC28J60 Ethernet. I got a W5100 Ethernet shield that sits/fits on top of the UNO for a cleaner install. I reflashed the UNO with the modified gateway code as per instructions and I get a "Gateway Startup Complete" but I can't ping the W5000 shield. All the lights on the shield are lit and the light on the router port is lit showing an active link. I used the arduino stock Ethernet Webserver example sketch and can ping the shield fine and the test page showing the analog input comes up which makes me think this is not a hardware problem. I did not connect any wires for the pins to the shield since the shield directly plugs on top of UNO so does any PIN numbers need to changed in the sketch?

    Anything that I have missed or I can try to troubleshoot this further?

    thanks!!



  • Are you update IP and MAC addresses in sketch? I use W5100 (with little modifications for DHCP support) in MQTT gateway without any problems.



  • Yes, the IP address is changed in both mysensors sketch and example webserver sketch. I have not changed the MAC address. I can ping the ip on the example webserver sketch but not in the mysensors Ethernet sketch.



  • @MatrixIII Do you set #define SOFTSPI in libraries\MySensors\utility\RF24_config.h ? It's only thing what i can think about.



  • Yup, that and the Ethernet.h uncommenting change in the main sketch. Unfortunately, I have read the documentation 10 times in hopes to catch something that I may have missed but can't figure this one out.



  • I figured this out. In the sketch it was getting stuck on the following line since writeEthernet is a callback and was getting called but is not initialized yet.

    gw.begin(RF24_PA_LEVEL_GW, RF24_CHANNEL, RF24_DATARATE, writeEthernet);
    

    I switched the order to initialize the Ethernet shield first and it works like a charm now

    Ethernet.begin(mac, myIp);
    
    // give the Ethernet interface a second to initialize
    delay(1000);
    
    // Initialize gateway at maximum PA level, channel 70 and callback for write operations 
    gw.begin(RF24_PA_LEVEL_GW, RF24_CHANNEL, RF24_DATARATE, writeEthernet);


  • Thank you for your update
    I have exactly the same proble with nano
    will try it tommorow and update



  • @MatrixIII thank you so much for sharing this solution!!! You may have seen my posts a couple months or so ago, and I just couldn't get this to work, but after making the change that you did, it seems to be working. thanks!



  • This saved my day too! Thanks!
    I wonder why this is not already changed in the example EthernetGateway.ino..


  • Admin

    Missed this one. The change has been pushed to github now.

    It's easer if you provide a github pull request when you find this type of problems.

    Instructions here:
    http://forum.mysensors.org/topic/330/how-to-contribute-code-to-the-mysensors-project



  • Thanks MatrixIII, I was just about to give up on my Ethernet-gateway when I found this thread, you saved my day too! 😆
    I just downloaded the Ethernet-gatewaysketch from mysensors, isn't this problem supposed to be solved or did I download from wrong place?


Log in to reply
 

Suggested Topics

50
Online

11.4k
Users

11.1k
Topics

112.6k
Posts