Time won't sync

Good afternoon,

I hope someone can help me out =(

I have a project that is is going to show me the power of my solarpanels. I'll be going to use 3 of the 6 analog inputs.
My program has i simple webserver wich wil show me de data etc.. for the data to be logged i'll need the correct time. So it would be nice if it's synchronised with a server. The module i have is a arduino ethernet onboard.

i've tried everything, examples, different servers different localports. What more can i try??? I allso open't port 8888 / 8889 / 123 on my firewall. Nothing helps. Can someone give me some advice to get it to work.

Thnx in advance :slight_smile:

Ton

Monitor output:

R:571
I
E
PS
Te!2208988800
SD
H

F:587
L:0
2208988800,400,1120,800
N
PS
Te!2208988800
F:517
L:1
2208988810,400,1120,800

sketch_jan06a.ino (8.42 KB)

for the data to be logged i'll need the correct time

To be logged where?

i've tried everything...What more can i try?

If you've tried everything, there is nothing left to try.

Can someone give me some advice to get it to work.

Yes. Post some code. Post some serial output.

You might consider putting the logging and reporting features on a PC and just push the raw data from the Arduino to the PC via a web service, rather than try to have the Arduino host the whole thing. Strictly speaking the Arduino can do all those things on its own, but it's not a good approach IMO. If you did insist on that approach then you would need to give the Arduino an NTP client (and use the network to access an NTP server somewhere) or an RTC.

By putting the storage and reporting on a PC you get a far more powerful web server and database storage, backup/archiving becomes trivially simple, web development and debugging is massively easier and you can take advantage of all the web development tools that the rest of the world uses.

The monitor output is quite meaningless and your goal is not entirely clear but, whatever it is, your best bet is to do what everybody else is doing.

If you want to broadcast to the world, you might use a feed service like cosm.

If you just want the data on your own computer you can send it to Excel or a suitable terminal programme.

In both of the above cases, the data is date/time stamped at the receiving end, thereby absolving you from any syncing issues.

Nonetheless, you may want to back up on the Arduino and you will then need to do your own date/time stamping. The simplest expedient for that is to use a DS1307 on-board clock and record it, and the data, on an SD card. Again, no syncing required.

Tontronix:
Good afternoon,

I hope someone can help me out =(

I have a project that is is going to show me the power of my solarpanels. I'll be going to use 3 of the 6 analog inputs.
My program has i simple webserver wich wil show me de data etc.. for the data to be logged i'll need the correct time. So it would be nice if it's synchronised with a server. The module i have is a arduino ethernet onboard.

i've tried everything, examples, different servers different localports. What more can i try??? I allso open't port 8888 / 8889 / 123 on my firewall. Nothing helps. Can someone give me some advice to get it to work.

Thnx in advance :slight_smile:

Ton

Monitor output:

R:571
I
E
PS
Te!2208988800
SD
H

F:587
L:0
2208988800,400,1120,800
N
PS
Te!2208988800
F:517
L:1
2208988810,400,1120,800

The arduino ethernet is using the W5100 chip which is limited to 4 sokets.
The Ethernet library handles the sockets and I have noticed that it it not doing it very well.
You mentioned you are running a webserver on the arduino so when you are connected with a client you are using 2 sockets, you suppose to have 2 free sockets but you can never be sure with arduino...
You should first verify that you managed to send a UDP packet by cheking the UDP.begin return
only then try look for some other problems