elektorlabs / 180662-mini-ntp-esp32 Goto Github PK
View Code? Open in Web Editor NEWmini NTP server with GPS and ESP32
License: GNU General Public License v3.0
mini NTP server with GPS and ESP32
License: GNU General Public License v3.0
What is the license of the firmware?
Regards, Thorsten
Did anyone manage to compile the project recently within platformio? I get an error in the webfunction.cpp line 444:
src/webfunctions.cpp: In function 'void update_ipv4_settings()':
src/webfunctions.cpp:444:53: error: invalid conversion from 'int' to 'ArduinoJson::V6215PB2::DeserializationError::Code' [-fpermissive]
if(0 != deserializeJson(doc, server->arg("JSON" ) ) ){
Any help would be appreciated - I found the project quite useful.
Hi Mathias,
thank you very much for your really great and quick implementation of the rollover fix and your efforts.
Yesterday I tested the new code, but it doesn't seem to work. Although the rollover count is set to 1, the date from the NMEA stream is shown (without addition of the 1024 weeks).
I took a look at the code today:
if(gps_config.rollover_cnt>0){
newtimestamp + ( SECS_PER_WEEK * 1024 *gps_config.rollover_cnt );
}
Could it be, that there is a "=" missing?
if(gps_config.rollover_cnt>0){
newtimestamp += ( SECS_PER_WEEK * 1024 *gps_config.rollover_cnt );
}
I will try it later this day...
Regards, Thorsten
Hi,
I am using a mature Perthold ST22 (SkyTraq Venus 6 based) GPS module which suffers from the "GPS week number rollover" problem (https://en.wikipedia.org/wiki/GPS_Week_Number_Rollover).
There is no new firmware for the module, so this must be fixed in the application. By adding 1024 weeks to the date value given at the NMEA GPRMC sentence we will get a correct date (e.g. 14.10.2000 + 1024 weeks = 30.05.2020).
With a quick and dirty fix the GPS date is converted to a UNIX timestamp epoch, the 1024 weeks are converted to seconds and added to the timestamp. After that the timestamp is converted back to the timecore datum_t format.
Datefixing can be configured by WK_ROLLOVER_M, a multiplier value. For no fixing set to 0. For old GPS set to 1 after April 2019 and set to 2 for the next rollover in somewhere in 2038.
LEAP_YEAR() and ConvertToTimestamp() are taken from the timecore (unfortunately declared as private there...).
Attached the patch file...
Regards, Thorsten
The "Ticker" library by Bert Melis has been merged into the Arduino ESP32 core (see https://github.com/bertmelis/Ticker-esp32), so there is no need to include it into the libraries directory. You will not find it in the library manager...
Version 1.7.1 found here: https://www.elektormagazine.com/labs/ntp-server
Does not seem to retain/use provided wifi credentials via web site. Reverts to standalone mode.
The Link at the bottom of README.md (https://www.elektormagazine.com/labs/admin-preview/mini-ntp-server-with-gps) seems to be a preview link and is now broken.
Should be https://www.elektormagazine.com/labs/mini-ntp-server-with-gps
I am not able to compile latest version , download from github only
error - redefinition of 'class NTP_Server'
using ESP32 nodemcu (Dev kit V1) with Arduino IDE
edit -
after downgrading arduino json lib it showing another error
conversion from 'int' to 'DateTime' is ambiguous
if possible please upload pre-compiled binary file too...
Hi,
after a long time I updated my breadboard NTP server (AZ-Delivery ESP32 NodeMCU, DS3231, Perthold ST22 GPS, I2C display) from v1.2 (around the time where I discovered the GPS week rollover problem) to v1.6.
I uploaded the new data to the FS and deleted the EEPROM at the first startup.
Configuration went OK so far.
Then I observed the following problems:
So currently the NTP server isn't usable for me.
Someone else having these problems?
Any ideas, what I am probably doing wrong?
Regards, Thorsten
The version 1.6 isn't compiling anymore with newer version of the libraries. It would be very kind if you tell us which versions are compatible.
The source code in 180622_1_3-11.zip downloadable from https://www.elektormagazine.com/labs/mini-ntp-server-with-gps can not be build because of a (residual) "network.ino" (seems to be an old version of network.cpp).
File must be deleted to make the code buildable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.