Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can be run using LTE connection via SIM800L modem ? #11

Open
clabnet opened this issue Dec 1, 2021 · 3 comments
Open

Can be run using LTE connection via SIM800L modem ? #11

clabnet opened this issue Dec 1, 2021 · 3 comments

Comments

@clabnet
Copy link

clabnet commented Dec 1, 2021

Hi,
running fine using WiFi transport, but connecting to internet via SIM800L using TinyGSM library it fail retrieving the time.

void setupDateTime() {
    DateTime.setTimeZone(TZ_Europe_Rome);
    DateTime.setServer("it.pool.ntp.org");
    DateTime.begin(15000);
    if (!DateTime.isTimeValid()) {
        Serial.println("Failed to get time from server.");
    } else {
        Serial.printf("Date Now is %s\r\n", DateTime.toISOString().c_str());
        Serial.printf("Timestamp is %ld\r\n", DateTime.now());
    }
}

And this is the log of my code :

Initializing modem
[7247] ### TinyGSM Version: 0.10.9
[7247] ### TinyGSM Compiled Module:  TinyGsmClientSIM800
[7559] ### Modem: SIMCOM SIM800L
         Modem Info: SIM800 R14.18
Waiting for network... success
Network connected
Connecting to APN ... TM
[29020] ### Network time zone updated.
[29024] ### Network time and time zone updated.
[29025] ### Daylight savings time state updated.
GPRS connected
IP: 10.193.141.85
IMEI: 8667820xxxxxxx
Operator: vodafone
Signal quality: 20

GPRS ready ✔
setTimeZone to CET-1CEST,M3.5.0,M10.5.0/3
setServer to it.pool.ntp.org,time.apple.com,time.windows.com
forceUpdate,timeZone:CET-1CEST,M3.5.0,M10.5.0/3, server:it.pool.ntp.org, timeOut:15000
Failed to get time from server.

Connecting to MQTT broker m23.cloudmqtt.com ...
        MQTT connected ✔
Server disconnected
GPRS disconnected ✔
Poweroff modem ✔
Stop run
@clabnet
Copy link
Author

clabnet commented Jan 3, 2022

Any chance to solve ? Thank you in advance.

@mcxiaoke
Copy link
Owner

mcxiaoke commented Jan 4, 2022

I do not have any gsm modem, you can try to use another ntp server, or test your gprs tcp connection with ntp server

@Tigeruno
Copy link

Tigeruno commented Oct 19, 2022

I have a problem with WiFi also, works in the house, but in Dual Axis Solar Tracker 300' away, doesn't pickup WiFi. Is there another way? I'm using the library to update RTC (DS3232RTC) if differs by some setting (10 minutes).

Thanks for the great work on this library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants