You are here

Using Watchdog2 on EHSx Demo

Showcase, May 17, 2018 - 2:24pm, 842 views

Using Watchdog2 on EHSx Demo

Benefits:
Show how to use EHSx hardware Watchdog2
Real life example, showing GPIO usage
Network connection status monitoring
External device status monitoring

Java Standard Output:

[12:15:22.9] [Main]: Constructor

[12:15:22.9] [Main]: startApp

[12:15:22.9] com.cinterion.misc.Watchdog2 demo

[12:15:22.9] Set-up the Watchdog2, which will restart the module, if not kicked().

[12:15:22.9] The ConnectionManager will check for bad network conditions.

[12:15:22.9] Bad network conditions will result in Watchdog2 not being kicked().

[12:15:22.9] Press 'BTN-A' on the concept board to force 'bad network conditions'.

[12:15:23.6] [Main]: Watchdog will do nothing if triggered.

[12:15:23.6] [AtcHandler]: Initialising state of module URCs.

[12:15:27.7] [ConnectionManager]: addConnManListener() ExternalDevice listener defined.

[12:15:27.9] [ConnectionManager]: Waiting for Network Registration...

[12:15:28.2] ..

[12:15:28.2] [ConnectionManager]: Network registration successful.

[12:15:28.4] [HardwareManager]: getPreferredRaT() returning: '1,2' for EHSx

[12:15:28.7] [ConnectionManager]: Watchdog will restart the system if triggered.

[12:15:28.7] [ConnectionManager]: houseKeepingTimer started.

[12:15:29.7] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 48

[12:15:29.7] [WatchdogKickingTimerTask]: Connection Up Time = 0

[12:15:30.0] [NetworkMonitor]: monitoringTimer started.

[12:15:30.0] [Main]: Runtime thread started.

[12:15:30.0] [Main]: startApp complete.

[12:15:30.0] [Main]: Ready...

[12:15:52.7] [ExternalDeviceButtonHandlerListener]: externalDeviceFeelsHappy == false

[12:16:01.1] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 50

[12:16:01.1] [WatchdogKickingTimerTask]: Connection Up Time = 0

[12:16:01.4] [ExternalDeviceButtonHandlerListener]: externalDeviceFeelsHappy == true

[12:16:32.4] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 50

[12:16:32.4] [WatchdogKickingTimerTask]: Connection Up Time = 1

[12:17:03.8] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 50

[12:17:03.8] [WatchdogKickingTimerTask]: Connection Up Time = 1

[12:17:35.2] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 50

[12:17:35.2] [WatchdogKickingTimerTask]: Connection Up Time = 2

[12:18:06.5] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 50

[12:18:06.5] [WatchdogKickingTimerTask]: Connection Up Time = 2

[12:18:37.9] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 50

[12:18:37.9] [WatchdogKickingTimerTask]: Connection Up Time = 3

[12:19:09.2] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 50

[12:19:09.2] [WatchdogKickingTimerTask]: Connection Up Time = 3

[12:19:40.6] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 50

[12:19:40.6] [WatchdogKickingTimerTask]: Connection Up Time = 4

[12:20:11.9] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 50

[12:20:11.9] [WatchdogKickingTimerTask]: Connection Up Time = 4

[12:20:43.3] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 50

[12:20:43.3] [WatchdogKickingTimerTask]: Connection Up Time = 5

[12:21:14.7] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 50

[12:21:14.7] [WatchdogKickingTimerTask]: Connection Up Time = 5

[12:21:46.0] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 50

[12:21:46.0] [WatchdogKickingTimerTask]: Connection Up Time = 6

[12:22:17.4] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 50

[12:22:17.4] [WatchdogKickingTimerTask]: Connection Up Time = 6

[12:22:48.7] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 50

[12:22:48.7] [WatchdogKickingTimerTask]: Connection Up Time = 7

[12:23:20.1] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 50

[12:23:20.1] [WatchdogKickingTimerTask]: Connection Up Time = 7

[12:23:22.5] [ExternalDeviceButtonHandlerListener]: externalDeviceFeelsHappy == false

[12:23:24.1] [HouseKeepingTimerTask]: Warning: External Device ALARM => houseKeeping ALARM.

[12:23:51.5] [WatchdogKickingTimerTask]: Warning: houseKeeping ALARM => no kick(). 50

[12:24:22.4] [HouseKeepingTimerTask]: Warning: External Device ALARM => houseKeeping ALARM.

[12:24:22.8] [WatchdogKickingTimerTask]: Warning: houseKeeping ALARM => no kick(). 50

[12:24:54.2] [WatchdogKickingTimerTask]: Warning: houseKeeping ALARM => no kick(). 50

[12:25:21.1] [HouseKeepingTimerTask]: Warning: External Device ALARM => houseKeeping ALARM.

[12:25:25.5] [WatchdogKickingTimerTask]: Warning: houseKeeping ALARM => no kick(). 50

[12:25:56.9] [WatchdogKickingTimerTask]: Warning: houseKeeping ALARM => no kick(). 50

[12:26:04.7] [ATCommandListener]: ATEvent: '+CIEV: eons,0,"",""'

[12:26:07.8] [ATCommandListener]: ATEvent: '+CREG: 0'

[12:26:07.8] [BearerStateChange]: APN=n/a State=10 PdpErrorCause=0

[12:26:07.8] [ATCommandListener]: ATEvent: '+CGREG: 0'

[12:26:07.9] [BearerStateChange]: APN=n/a State=20 PdpErrorCause=0

[12:26:07.9] [ATCommandListener]: ATEvent: '+CIEV: service,0'

[12:26:07.9] [ATCommandListener]: ATEvent: '+CIEV: psinfo,9'

[12:26:11.0] [ExternalDeviceButtonHandlerListener]: externalDeviceFeelsHappy == true

[12:26:19.4] [HouseKeepingTimerTask]: CS Network - Not in registered state.

[12:26:20.1] [HouseKeepingTimerTask]: PS Network - Not in attached state.

[12:26:28.2] [WatchdogKickingTimerTask]: Warning: houseKeeping ALARM => no kick(). 52

[12:26:49.2] [ATCommandListener]: ATEvent: '+CREG: 3'

[12:26:49.2] [BearerStateChange]: APN=n/a State=13 PdpErrorCause=0

[12:26:49.2] [ATCommandListener]: ATEvent: '+CIEV: psinfo,1'

[12:26:54.5] [ATCommandListener]: ATEvent: '+PBREADY'

[12:26:55.3] [ATCommandListener]: ATEvent: '+CIEV: nitz,"18/05/17,11:26:55",+04,1'

[12:26:55.3] [ATCommandListener]: ATEvent: '+CREG: 1,"5242","02855FFB",6'

[12:26:55.3] [BearerStateChange]: APN=n/a State=11 PdpErrorCause=0

[12:26:55.3] [ATCommandListener]: ATEvent: '+CGREG: 4'

[12:26:55.3] [BearerStateChange]: APN=n/a State=24 PdpErrorCause=0

[12:26:55.3] [ATCommandListener]: ATEvent: '+CIEV: service,1'

[12:26:55.3] [ATCommandListener]: ATEvent: '+CIEV: psinfo,9'

[12:26:55.4] [ATCommandListener]: ATEvent: '+CGREG: 1,"5242","02855FFB",6,"83"'

[12:26:55.4] [BearerStateChange]: APN=n/a State=21 PdpErrorCause=0

[12:26:55.4] [ATCommandListener]: ATEvent: '+CIEV: psinfo,10'

[12:26:55.5] [ATCommandListener]: ATEvent: '+CIEV: eons,4,"O2 - UK","giffgaff"'

[12:26:59.6] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 59

[12:26:59.6] [WatchdogKickingTimerTask]: Connection Up Time = 11

[12:27:31.0] [WatchdogKickingTimerTask]: Kicked watchdog. Running threads: 50

[12:27:31.0] [WatchdogKickingTimerTask]: Connection Up Time = 12

[12:27:46.7] [Main]: destroyApp

[12:27:47.1] [ConnectionManager]: Watchdog will do nothing if triggered.

[12:27:47.1] MIDlet:Main terminated

[12:27:58.1] ***

[12:27:58.1] *** DISCONNECT

[12:27:58.1] *** time 12:27:56

[12:27:58.1] ***

Download File src.zip (zip | 20.25 KB)
Download File dist.zip (zip | 70.81 KB)
mullengers