Go Down

Topic: Using AT commands to get time from NTP server? (Read 5 times) previous topic - next topic

robtillaart

Quote
I am guessing after the connection is established I am basically sending a string of 1's and 0's?  Does that sound about right?

No, you should send binary data aka bytes.

In the page below a simple NTP sketch is presented, you can see what bytes to send and what to expect back (also binary data)

- http://arduino.cc/playground/Main/DS1307OfTheLogshieldByMeansOfNTP -
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

dmsherazi

with sim900 you can update time from the cellular network automatically at startup ,

follow these steps,
Code: [Select]
AT+CLTS=1\r
AT+CENG=3\r


after this on every attachment with network you will get
Code: [Select]

*PSUTTZ: 2013, 2, 23, 8, 22, 51, "+16", 1

DST: 1

*PSUTTZ: 2013, 2, 23, 8, 22, 54, "+16", 0

DST: 0


and the local time stamp will be updated to local time
check by command
Code: [Select]
AT+CCLK?

Go Up