Going from 4.0.0 to 4.1.1 the W5100 network doesn't work

roef33 Oct 27, 2022

  1. roef33

    roef33 New Member

    4
    4
    2
    Hello,
    I was running DCC-EX 4.0.0 on my Mega 2560 and it runs fine on my network but when i install the 4.1.1 on the Mega 2560 with the same config.H file the network is gone.
    Did i make a mistake or is there something broken in the software?
    It is the Sunfounder Ethernet shield with a W5100 chip.
     
  2. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    I'd post this on their Discord site ( HERE ). They are much more likely to see it there. Go to the left sided menu and use the 'open-a-ticket' under 'SUPPORT' and I'll bet they will be quick to reply,

    Sumner
     
  3. roef33

    roef33 New Member

    4
    4
    2
    Thanks Sumner, i opened a ticket and they responded very quick.
    They are working on it and found what is wrong.
     
    BigJake likes this.
  4. roef33

    roef33 New Member

    4
    4
    2
    The issue is solved in 4.1.2 :)
     
    Sumner likes this.
  5. sidney

    sidney TrainBoard Member

    1,235
    2,086
    37
    SOOOOO what was the problem ?????
     
  6. FlightRisk

    FlightRisk TrainBoard Member

    548
    237
    14
    The problem between versons <=4.0, 4.1 and 4.1.2 is that the check for a network board was fixed in 4.1. This broke the 5100 board because it does not fully support the library's "EthernetNoHardware" and "LinkStatus" tests correctly which indicates if a board is connected or if the cable is unplugged. So IF you enabled Ethernet in the config.h file, 4.1 checked to see the response and when it did not see Ethernet hardware, did not continue with the networking setup. 4.1.2 goes past the hardware check and sends a log message of "Ethernet shield not detected or is a W5100". It then checks if the status is NOT LinkOFF instead of if it IS LinkON (since the library reports the 5100 as LinkUnknown) and proceed to the next step if the link is not off.

    If you are interested, this DIFF from that commit shows exactly how the check works with the old code on the left and the new code on the right. It is just a couple of changes:

    https://github.com/DCC-EX/CommandStation-EX/commit/df6c511d1deb1b3f805fe8073064f7ff61339fe6
     
    Last edited: Nov 2, 2022
    Sumner likes this.

Share This Page