GithubHelp home page GithubHelp logo

elektorlabs / 180662-mini-ntp-esp32 Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 10.0 183 KB

mini NTP server with GPS and ESP32

License: GNU General Public License v3.0

C++ 44.36% CSS 1.52% HTML 20.91% C 33.21%

180662-mini-ntp-esp32's People

Contributors

calm4git avatar dl9sec avatar lab-mathias-claussen avatar schneha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

180662-mini-ntp-esp32's Issues

Compile Error

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.

GPS week number rollover fix doesn't work

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

Quick and dirty GPS week number rollover fix

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

GPS_week_number_rollover_qndfix.patch.txt

Can't compile

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...

Firmware v1.6 is doing weird things... [Bug]

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:

  • After a while the webinterface didn't respond anymore (timeout)
  • Same with the NTP interface (tried to test with w32tm, but get a 0x800705B4 error -> NTP server didn't respond)
  • The time on the display shows weird time: sometimes some seconds are skipped and the display shows a time some minutes in the future or some minutes in the past, but the time at the serial console is OK.

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

Versions of libraries

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.