Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
void setNTP () { EthernetErr ethErr = eth.setup(); Host server(IpAddr(), 123, "0.uk.pool.ntp.org"); ntp.setTime(server); pc.printf("NTP is set up\n"); wait(10); pc.printf("Clock is synchronised. Cable can now removed");
}
/* Checks if a connection to the ethernet is established */ if (connect.link()) { connect1 = connect1 + 1; if (connect1 == 1) { setNTP();
} else { does nothing } }
my code just gets stucked at "EthernetErr ethErr = eth.setup(); " and wouldn't connect to the NTP server at all. Can anyone help me with this?