Re: Help! Tweet fails with code “0”

Home Forums Botanicalls Community Help! Tweet fails with code "0" Re: Help! Tweet fails with code “0”

#1869
squigley
Participant

Wow, this isn’t a very trivial change. I managed to hack a few changes in, to use Ethernet.begin and Ethernet.maintain instead, and got it working, but my changes were pretty dirty :-)

in the main file under // start Ethernet I added:

Ethernet.begin(mac); // start ethernet DHCP in non-blocking polling mode
Serial.println(Ethernet.localIP());
ipState = DhcpStateLeased;

in utility I had to make changes in the dhcpCheck function, adding

int State = Ethernet.maintain(); // poll for an updated state

and commenting out the check for a state change, and changing the switch to switch State, then adding case ‘2’ under DhcpStateLeased.

After that it worked, and it should keep it’s lease, but we’ll find out..



New kits are here!

Categories

Pothos Plant Tweets

    Flickr Feed

    www.flickr.com
    More photos or video tagged with botanicalls on Flickr

    Meta