MY_GATEWAY_TINYGSM
-
@thucar said in MY_GATEWAY_TINYGSM:
GSM modems and ESP8266 as a modem
Did you mean esp8266 as gateway or...? BTW great job :+1:
@gohan said in MY_GATEWAY_TINYGSM:
@thucar said in MY_GATEWAY_TINYGSM:
GSM modems and ESP8266 as a modem
Did you mean esp8266 as gateway or...? BTW great job :+1:
Nope, ESP8266 is a modem in this scenario. So in my case I'm using an Arduino Mega 2560 with loads of IOs as the gateway and the ESP8266 as a Wifi modem for connectivity. No sketch is uploaded on the ESP and the only connections used (in addition to power and ground of course) are TX/RX from ESP to the Arduino.
-
@gohan said in MY_GATEWAY_TINYGSM:
@thucar said in MY_GATEWAY_TINYGSM:
GSM modems and ESP8266 as a modem
Did you mean esp8266 as gateway or...? BTW great job :+1:
Nope, ESP8266 is a modem in this scenario. So in my case I'm using an Arduino Mega 2560 with loads of IOs as the gateway and the ESP8266 as a Wifi modem for connectivity. No sketch is uploaded on the ESP and the only connections used (in addition to power and ground of course) are TX/RX from ESP to the Arduino.
@thucar Great work! Thank you!
I am usingMY_GATEWAY_TINYGSMfrom a month ago. I face Gateway hangs after a week and it needs a hard reboot(Power OFF and ON). Are you facing any issue similar to this?My Hardware details:
- ESP8266 (ESP-12E)
- RFM69HW
- SIM800L
To power up GSM modem I am using 1500mA 18650 battery with charger board.
Can you share your hardware details?
-
@thucar Great work! Thank you!
I am usingMY_GATEWAY_TINYGSMfrom a month ago. I face Gateway hangs after a week and it needs a hard reboot(Power OFF and ON). Are you facing any issue similar to this?My Hardware details:
- ESP8266 (ESP-12E)
- RFM69HW
- SIM800L
To power up GSM modem I am using 1500mA 18650 battery with charger board.
Can you share your hardware details?
After some days, internet connection disconnected(identified via SIM800L LED blink status), but still, ESP says all ok. I lost communication from controller too.
193617834 RFM69:SAC:SEND ACK,TO=11,RSSI=-57 193617847 RFM69:CSMA:RSSI=-107 193617866 TSF:MSG:READ,12-11-0,s=255,c=3,t=0,pt=1,l=1,sg=0:48 193617882 GWT:TPS:TOPIC=out_rfm69/12/255/3/0/0,MSG SENT 193629390 RFM69:SAC:SEND ACK,TO=1,RSSI=-82 193629403 RFM69:CSMA:RSSI=-107 193629421 TSF:MSG:READ,1-1-0,s=1,c=1,t=25,pt=1,l=1,sg=0:64 193629437 GWT:TPS:TOPIC=out_rfm69/1/1/1/0/25,MSG SENT 193629735 RFM69:SAC:SEND ACK,TO=1,RSSI=-49 193629747 RFM69:CSMA:RSSI=-106 193629766 TSF:MSG:READ,1-1-0,s=1,c=1,t=35,pt=7,l=5,sg=0:70.60 193629782 GWT:TPS:TOPIC=out_rfm69/1/1/1/0/35,MSG SENT 193650334 RFM69:SAC:SEND ACK,TO=11,RSSI=-98 193650347 RFM69:CSMA:RSSI=-103 193650366 TSF:MSG:READ,11-11-0,s=1,c=1,t=0,pt=7,l=5,sg=0:30.75 193650382 GWT:TPS:TOPIC=out_rfm69/11/1/1/0/0,MSG SENT 193659264 RFM69:SAC:SEND ACK,TO=1,RSSI=-102 193659277 RFM69:CSMA:RSSI=-106 193659296 TSF:MSG:READ,1-1-0,s=1,c=1,t=25,pt=1,l=1,sg=0:64 193659311 GWT:TPS:TOPIC=out_rfm69/1/1/1/0/25,MSG SENT 193659609 RFM69:SAC:SEND ACK,TO=1,RSSI=-92 193659621 RFM69:CSMA:RSSI=-108 193659640 TSF:MSG:READ,1-1-0,s=1,c=1,t=35,pt=7,l=5,sg=0:70.60 193659656 GWT:TPS:TOPIC=out_rfm69/1/1/1/0/35,MSG SENT 193673497 RFM69:SAC:SEND ACK,TO=11,RSSI=-93 193673510 RFM69:CSMA:RSSI=-103 193673529 TSF:MSG:READ,12-11-0,s=1,c=1,t=38,pt=7,l=5,sg=0:12.89 193673546 GWT:TPS:TOPIC=out_rfm69/12/1/1/0/38,MSG SENT 193674042 RFM69:SAC:SEND ACK,TO=11,RSSI=-99 193674054 RFM69:CSMA:RSSI=-103 193674073 TSF:MSG:READ,12-11-0,s=1,c=1,t=0,pt=7,l=5,sg=0:27.00 193674090 GWT:TPS:TOPIC=out_rfm69/12/1/1/0/0,MSG SENT 193674585 RFM69:SAC:SEND ACK,TO=11,RSSI=-99 193674598 RFM69:CSMA:RSSI=-105 193674617 TSF:MSG:READ,12-11-0,s=1,c=1,t=25,pt=1,l=1,sg=0:247 193674633 GWT:TPS:TOPIC=out_rfm69/12/1/1/0/25,MSG SENT 193675129 RFM69:SAC:SEND ACK,TO=11,RSSI=-105 193675142 RFM69:CSMA:RSSI=-108 193675160 TSF:MSG:READ,12-11-0,s=3,c=1,t=38,pt=7,l=5,sg=0:13.65 193675177 GWT:TPS:TOPIC=out_rfm69/12/3/1/0/38,MSG SENT 193675675 RFM69:SAC:SEND ACK,TO=11,RSSI=-99 193675688 RFM69:CSMA:RSSI=-102 193675707 TSF:MSG:READ,12-11-0,s=3,c=1,t=39,pt=7,l=5,sg=0:0.97 193675723 GWT:TPS:TOPIC=out_rfm69/12/3/1/0/39,MSG SENT 193676219 RFM69:SAC:SEND ACK,TO=11,RSSI=-103 193676232 RFM69:CSMA:RSSI=-106 193676251 TSF:MSG:READ,12-11-0,s=0,c=1,t=38,pt=7,l=5,sg=0:4.979 193676268 GWT:TPS:TOPIC=out_rfm69/12/0/1/0/38,MSG SENT 193676755 RFM69:SAC:SEND ACK,TO=11,RSSI=-97I did a hard reboot of ESP8266, all back to normal.
-
After some days, internet connection disconnected(identified via SIM800L LED blink status), but still, ESP says all ok. I lost communication from controller too.
193617834 RFM69:SAC:SEND ACK,TO=11,RSSI=-57 193617847 RFM69:CSMA:RSSI=-107 193617866 TSF:MSG:READ,12-11-0,s=255,c=3,t=0,pt=1,l=1,sg=0:48 193617882 GWT:TPS:TOPIC=out_rfm69/12/255/3/0/0,MSG SENT 193629390 RFM69:SAC:SEND ACK,TO=1,RSSI=-82 193629403 RFM69:CSMA:RSSI=-107 193629421 TSF:MSG:READ,1-1-0,s=1,c=1,t=25,pt=1,l=1,sg=0:64 193629437 GWT:TPS:TOPIC=out_rfm69/1/1/1/0/25,MSG SENT 193629735 RFM69:SAC:SEND ACK,TO=1,RSSI=-49 193629747 RFM69:CSMA:RSSI=-106 193629766 TSF:MSG:READ,1-1-0,s=1,c=1,t=35,pt=7,l=5,sg=0:70.60 193629782 GWT:TPS:TOPIC=out_rfm69/1/1/1/0/35,MSG SENT 193650334 RFM69:SAC:SEND ACK,TO=11,RSSI=-98 193650347 RFM69:CSMA:RSSI=-103 193650366 TSF:MSG:READ,11-11-0,s=1,c=1,t=0,pt=7,l=5,sg=0:30.75 193650382 GWT:TPS:TOPIC=out_rfm69/11/1/1/0/0,MSG SENT 193659264 RFM69:SAC:SEND ACK,TO=1,RSSI=-102 193659277 RFM69:CSMA:RSSI=-106 193659296 TSF:MSG:READ,1-1-0,s=1,c=1,t=25,pt=1,l=1,sg=0:64 193659311 GWT:TPS:TOPIC=out_rfm69/1/1/1/0/25,MSG SENT 193659609 RFM69:SAC:SEND ACK,TO=1,RSSI=-92 193659621 RFM69:CSMA:RSSI=-108 193659640 TSF:MSG:READ,1-1-0,s=1,c=1,t=35,pt=7,l=5,sg=0:70.60 193659656 GWT:TPS:TOPIC=out_rfm69/1/1/1/0/35,MSG SENT 193673497 RFM69:SAC:SEND ACK,TO=11,RSSI=-93 193673510 RFM69:CSMA:RSSI=-103 193673529 TSF:MSG:READ,12-11-0,s=1,c=1,t=38,pt=7,l=5,sg=0:12.89 193673546 GWT:TPS:TOPIC=out_rfm69/12/1/1/0/38,MSG SENT 193674042 RFM69:SAC:SEND ACK,TO=11,RSSI=-99 193674054 RFM69:CSMA:RSSI=-103 193674073 TSF:MSG:READ,12-11-0,s=1,c=1,t=0,pt=7,l=5,sg=0:27.00 193674090 GWT:TPS:TOPIC=out_rfm69/12/1/1/0/0,MSG SENT 193674585 RFM69:SAC:SEND ACK,TO=11,RSSI=-99 193674598 RFM69:CSMA:RSSI=-105 193674617 TSF:MSG:READ,12-11-0,s=1,c=1,t=25,pt=1,l=1,sg=0:247 193674633 GWT:TPS:TOPIC=out_rfm69/12/1/1/0/25,MSG SENT 193675129 RFM69:SAC:SEND ACK,TO=11,RSSI=-105 193675142 RFM69:CSMA:RSSI=-108 193675160 TSF:MSG:READ,12-11-0,s=3,c=1,t=38,pt=7,l=5,sg=0:13.65 193675177 GWT:TPS:TOPIC=out_rfm69/12/3/1/0/38,MSG SENT 193675675 RFM69:SAC:SEND ACK,TO=11,RSSI=-99 193675688 RFM69:CSMA:RSSI=-102 193675707 TSF:MSG:READ,12-11-0,s=3,c=1,t=39,pt=7,l=5,sg=0:0.97 193675723 GWT:TPS:TOPIC=out_rfm69/12/3/1/0/39,MSG SENT 193676219 RFM69:SAC:SEND ACK,TO=11,RSSI=-103 193676232 RFM69:CSMA:RSSI=-106 193676251 TSF:MSG:READ,12-11-0,s=0,c=1,t=38,pt=7,l=5,sg=0:4.979 193676268 GWT:TPS:TOPIC=out_rfm69/12/0/1/0/38,MSG SENT 193676755 RFM69:SAC:SEND ACK,TO=11,RSSI=-97I did a hard reboot of ESP8266, all back to normal.
@jkandasa
I'm just designing a smart home system.
Do you use a MQTT connection to the controller?ESP8266 memory is enough. You can add a communication check to the controller (for example, a request for the current time). And then you can restart SIM800L through an external pin on the module, and you can also restart ESSP8266.
-
@jkandasa
I'm just designing a smart home system.
Do you use a MQTT connection to the controller?ESP8266 memory is enough. You can add a communication check to the controller (for example, a request for the current time). And then you can restart SIM800L through an external pin on the module, and you can also restart ESSP8266.
Is there a chance to reboot GSM modem / gateway on a regular basis?
What I have discovered is that some operators cells stop communicating with the modem if the location is not changed for days. Therefore, modem has to be rebooted manually or on the timer, i.e. rebooting every day at 04:00 morning time. -
Is there a chance to reboot GSM modem / gateway on a regular basis?
What I have discovered is that some operators cells stop communicating with the modem if the location is not changed for days. Therefore, modem has to be rebooted manually or on the timer, i.e. rebooting every day at 04:00 morning time. -
@mfalkvidd can you descirbe how ? where to place to periodically check if connected, and if not do some action ?
-
@mfalkvidd can you descirbe how ? where to place to periodically check if connected, and if not do some action ?
-
Here's a bit of code I use to send an SMS once in a while. Providers will disable your simcard if you don't do anything that makes them money once in a while. Perhaps you can use it to reset.
#ifdef SEND_SMS_EVERY_49_DAYS // This is an optional feature. // Every 49,7 days (using the millis() rollover) the system sends out an SMS. This helps keep the simcard active and registered on the GSM network. // Use at your own risk: if the system experiences a power loss, the timer starts at 0 again. If your experience frequent powerlosses, then the simcard might be-deregistered anyway, since the keep-alive SMS's won't get sent. // A slight delay is built in: the first sms is sent a week after the smart lock becomes active. This avoid sending a lot of SMS's if you are still playing with setting up the device, and powerlosses may be frequent. // This smart lock also offers another option. You can let the controller trigger the sending of the sms using the 'send test sms' button. Of course, your controller could also be down when you scheduled to trigger the button. static bool keepAliveSMSsent = false; // used to make sure an SMS is only sent as the milliseconds starts, and not during every loop in the millisecond. if(millis() < 5){ keepAliveSMSsent = false; // when the clock rolls over, set the variable back so that a new SMS can be sent. } if (millis() > 604800000 && millis() < 604800010 && keepAliveSMSsent == false){ // 604800000 = 1 week in milliseconds. Sending the first keep-alive SMS after a week avoids sending a lot of SMS-es while testing the system (which may involve a lot of reboots). keepAliveSMSsent = true; sendStatusSMS(); } #endifAlternatively, you could check out the smart alarm clock code. It will show you how to request the time from the controller, turn that into a human readable time, and then you can do your thing.
uint32_t unixTime = 0; void receiveTime(unsigned long controllerTime) { Serial.print(F("Received time: ")); Serial.println(controllerTime); unixTime = controllerTime; breakUpTime(unixTime); } void breakUpTime(uint32_t timeInput) { // Break the given time_t into time components. // This is a more compact version of the C library localtime function // Note that year is offset from 1970! uint32_t time; time = (uint32_t)timeInput; uint32_t Second = time % 60; time /= 60; // now it is minutes minutes = time % 60; time /= 60; // now it is hours hours = time % 24; time /= 24; // now it is days //int Wday = ((time + 4) % 7) + 1; // Which day of the week is it. Sunday is day 1 Serial.print(F("Calculated time: ")); Serial.print(hours); Serial.print(F(":")); Serial.println(minutes); }