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

After power up / power down, device does not reconnect to MQTT broker #44

Closed
ckrey opened this issue Aug 20, 2014 · 4 comments
Closed
Labels

Comments

@ckrey
Copy link
Member

ckrey commented Aug 20, 2014

GPS fix is ok (red light and $state)
Network is available (yellow light blinking twice and $state)

MQTTconnect returns 32103=Unable to connect to server

Can only be solved by HW reset

a) find reason for problem
hint: at+cgatt=1 returns ERROR

b) add timeout for 32103 and use GPIO Watchdog to reset device

@ckrey ckrey added the bug label Aug 20, 2014
@ckrey
Copy link
Member Author

ckrey commented Aug 20, 2014

Added timeout for mqtt connection and return to mainLoop

@ckrey
Copy link
Member Author

ckrey commented Aug 21, 2014

Testing overnight (mainDebug=1, sleep=18000, motion=4(=default)):

Probably motion=4 is too sensitive and is triggered by the odd fly in my office, trying motion=63 later

  • Disconnect power (and ignition), gw running on battery:
AppMain: IgnitionWakeup && gpio7 && qSize
AppMain: powerDown @ Wed Aug 20 22:42:48 UTC 2014
AppMain: powerDown setting wakeup call for Thu Aug 21 03:42:48 UTC 2014
^SHUTDOWN
  • Reason for SYSSTART?
^SYSSTART
Running 0.6.2 @ Wed Aug 20 23:48:22 UTC 2014
AppMain: wakeupMode is MotionWakeup
>AppMain: MotionWakeup && dateLastFix && qSize
AppMain: powerDown @ Wed Aug 20 23:48:59 UTC 2014
AppMain: powerDown setting wakeup call for Thu Aug 21 04:48:59 UTC 2014
^SHUTDOWN
  • Reason for SYSSTART?
^SYSSTART
Running 0.6.2 @ Thu Aug 21 00:34:37 UTC 2014
AppMain: wakeupMode is MotionWakeup
>AppMain: MotionWakeup && dateLastFix && qSize
AppMain: powerDown @ Thu Aug 21 00:35:16 UTC 2014
^SHUTDOWN
  • Reason for SYSSTART?
^SYSSTART
Running 0.6.2 @ Thu Aug 21 01:18:27 UTC 2014
AppMain: wakeupMode is MotionWakeup
>AppMain: MotionWakeup && dateLastFix && qSize
AppMain: powerDown @ Thu Aug 21 01:19:05 UTC 2014
AppMain: powerDown setting wakeup call for Thu Aug 21 06:19:05 UTC 2014
^SHUTDOWN
  • Reason for SYSSTART?
^SYSSTART
Running 0.6.2 @ Thu Aug 21 04:25:27 UTC 2014
AppMain: wakeupMode is MotionWakeup
>AppMain: MotionWakeup && dateLastFix && qSize
AppMain: powerDown @ Thu Aug 21 04:27:06 UTC 2014
AppMain: powerDown setting wakeup call for Thu Aug 21 09:27:06 UTC 2014
^SHUTDOWN

@ckrey
Copy link
Member Author

ckrey commented Aug 21, 2014

Maybe CGATT is still too early - not sure if it is related to the problem anyhow as the mqtt connection works later on:

AppMain: SWITCH ON RADIO PART of the module...
commandResponse: AT+CREG=1
OK
commandResponse: AT+CGREG=1
OK
commandResponse: at^smong
GPRS Monitor
BCCH  G  PBCCH  PAT MCC  MNC  NOM  TA      RAC                               # Cell #
65535  1  -      -   000   000  1    00      00
OK
commandResponse: at+cgatt=1
ERROR
ATListenerEvents: (12) +CREG: 5
ATListenerEvents: (13) +CGREG: 2
ATListenerEvents: (13) +CGREG: 5
commandResponse: AT+COPS?
+COPS: 0,0,"E-Plus"
OK

@ckrey
Copy link
Member Author

ckrey commented Aug 23, 2014

solved. gw was stuck in a loop during shutdown in offline. Now watches grps- and mqttTimeouts.

ckrey pushed a commit that referenced this issue Aug 23, 2014
dist and trip problems solves #42
connection problems solved - for now solves #44
battery wakeup mode
@ckrey ckrey closed this as completed Aug 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant