r-map / rmap

rete monitoraggio ambientale partecipativo documentation at https://doc.rmap.cc
https://rmap.cc
53 stars 42 forks source link

firmware: restart after data published through mqtt... [ ERROR ] #355

Closed pat1 closed 2 years ago

pat1 commented 2 years ago

data published through mqtt...

#2021-11-19T16:50:21 N: Data pointer... [ 11/11/2021 6:45:1 ] [ OK ]
#2021-11-19T16:51:00 N: Next acquisition scheduled at: 16:54:0
#2021-11-19T16:51:00 N: Sensors reading...
#2021-11-19T16:52:00 N: Sensors reading...
#2021-11-19T16:53:00 N: Sensors reading...
#2021-11-19T16:53:00 E: Restart I2C BUS
#2021-11-19T16:54:00 N: Next acquisition scheduled at: 16:57:0
#2021-11-19T16:54:00 N: Sensors reading...
#2021-11-19T16:54:00 N: [ 12 ] data stored in sdcard... [ OK ]
#2021-11-19T16:54:03 N: SIM800 switching ON... [ OK ] [ ON ]
#2021-11-19T16:54:07 N: SIM800 reset to factory default [ OK ]
#2021-11-19T16:54:12 N: SIM800 echo mode off [ OK ]
#2021-11-19T16:54:15 N: SIM800 signal [ OK ] [ rssi 10, ber 5 ]
#2021-11-19T16:54:15 N: SIM800 network registered... [ OK ]
#2021-11-19T16:54:15 N: SIM800 setup... [ OK ]
#2021-11-19T16:54:16 N: SIM800 GPRS attach... [ OK ] [ NO ]
#2021-11-19T16:54:21 N: SIM800 attach GPRS... [ OK ]
#2021-11-19T16:54:21 N: SIM800 single IP mode... [ OK ]
#2021-11-19T16:54:21 N: SIM800 switch to data mode... [ OK ]
#2021-11-19T16:54:22 N: SIM800 transparent mode... [ OK ]
#2021-11-19T16:54:22 N: SIM800 set APN, username and password... [ OK ]
#2021-11-19T16:54:22 N: SIM800 setting up connection... [ OK ]
#2021-11-19T16:54:26 N: SIM800 IP... [ OK ] [ 10.187.123.2 ]
#2021-11-19T16:54:26 N: SIM800 start connection... [ OK ]
#2021-11-19T16:54:26 N: file rpc_ptr.txt do not exists
#2021-11-19T16:54:26 N: Data pointer... [ 11/11/2021 6:45:1 ] [ OK ]
#2021-11-19T16:54:29 N: SIM800 TCP status... [ OK ] [ CONNECT ]
#2021-11-19T16:55:00 N: Sensors reading...
#2021-11-19T16:55:17 E: Restart I2C BUS
#2021-11-19T16:56:01 N: Sensors reading...
#2021-11-19T16:57:00 N: Next acquisition scheduled at: 17:0:0
#2021-11-19T16:57:00 N: Sensors reading...
#2021-11-19T16:57:00 N: [ 12 ] data stored in sdcard... [ OK ]
#2021-11-19T16:58:00 N: Sensors reading...
#2021-11-19T16:58:15 E: Restart I2C BUS
#2021-11-19T16:59:00 N: Sensors reading...
#2021-11-19T17:00:00 N: Next acquisition scheduled at: 17:3:0
#2021-11-19T17:00:00 N: Sensors reading...
#2021-11-19T17:00:00 E: Restart I2C BUS
#2021-11-19T17:00:00 N: [ 12 ] data stored in sdcard... [ OK ]
#2021-11-19T17:01:00 N: Sensors reading...
#2021-11-19T17:02:00 N: Sensors reading...
#2021-11-19T17:03:00 N: Next acquisition scheduled at: 17:6:0
#2021-11-19T17:03:00 N: Sensors reading...
#2021-11-19T17:03:00 E: Restart I2C BUS
#2021-11-19T17:03:00 N: [ 12 ] data stored in sdcard... [ OK ]
#2021-11-19T17:04:00 N: Sensors reading...
#2021-11-19T17:04:24 E: MQTT publish... [ FAIL ]
#2021-11-19T17:04:24 N: Data pointer... [ 11/11/2021 10:57:1 ] [ UPDATE ]
#2021-11-19T17:04:24 N: [ 1016 ] data published through mqtt... [ ERROR ]
#1970-01-01T00:00:01 N: Configuration received... [ OK ]
#1970-01-01T00:00:01 N: Load configuration... [ OK ]
#1970-01-01T00:00:01 N: --> type: report-gsm
#1970-01-01T00:00:01 N: --> version: 3.5
#1970-01-01T00:00:01 N: --> sensors: 6
#1970-01-01T00:00:01 N: --> ConstantData: 2
#1970-01-01T00:00:01 N: --> CD 0:  B01019 : new station
#1970-01-01T00:00:01 N: --> CD 1:  B07030 : 20
#1970-01-01T00:00:01 N: --> gsm apn: ibox.tim.it
#1970-01-01T00:00:01 N: --> gsm username: 
#1970-01-01T00:00:01 N: --> gsm password: 
#1970-01-01T00:00:01 N: --> ntp server: it.pool.ntp.org
#1970-01-01T00:00:01 N: --> mqtt server: test.rmap.cc
#1970-01-01T00:00:01 N: --> mqtt port: 1883
#1970-01-01T00:00:01 N: --> mqtt root topic: report/pat1/1165625,4485892/fixed/
#1970-01-01T00:00:01 N: --> mqtt maint topic: maint/pat1/1165625,4485892/fixed/
#1970-01-01T00:00:01 N: --> mqtt rpc topic: rpc/pat1/1165625,4485892/fixed/
#1970-01-01T00:00:01 N: --> mqtt username: pat1
#1970-01-01T00:00:01 N: --> mqtt password: 1password
#2021-11-19T17:04:34 N: Current RTC date and time: 19/11/2021 17:4:34
#2021-11-19T17:04:34 N: --> 1: I2C-ITH [ 0x23 ]: 254,0,0/103,2000,-,-/   [ OK ]
#2021-11-19T17:04:34 N: --> 2: I2C-NTH [ 0x23 ]: 3,0,900/103,2000,-,-/   [ OK ]
#2021-11-19T17:04:34 N: --> 3: I2C-MTH [ 0x23 ]: 0,0,900/103,2000,-,-/   [ OK ]
#2021-11-19T17:04:34 N: --> 4: I2C-XTH [ 0x23 ]: 2,0,900/103,2000,-,-/   [ OK ]
#2021-11-19T17:04:34 N: --> 5: I2C-TBR [ 0x21 ]: 1,0,900/1,-,-,-/    [ OK ]
#2021-11-19T17:04:34 N: --> 6: I2C-DEP [ 0x30 ]: 254,0,0/265,1,-,-/  [ OK ]
#2021-11-19T17:04:42 N: SIM800 switching ON... [ OK ] [ ON ]
#2021-11-19T17:04:46 N: SIM800 reset to factory default [ OK ]
#2021-11-19T17:04:51 N: SIM800 echo mode off [ OK ]
#2021-11-19T17:04:54 N: SIM800 signal [ OK ] [ rssi 11, ber 5 ]
#2021-11-19T17:04:54 N: SIM800 network registered... [ OK ]
#2021-11-19T17:04:54 N: SIM800 setup... [ OK ]
#2021-11-19T17:04:55 N: SIM800 GPRS attach... [ OK ] [ NO ]
#2021-11-19T17:05:05 N: SIM800 attach GPRS... [ OK ]
#2021-11-19T17:05:05 N: SIM800 single IP mode... [ OK ]
#2021-11-19T17:05:05 N: SIM800 switch to data mode... [ OK ]
#2021-11-19T17:05:05 N: SIM800 transparent mode... [ OK ]
#2021-11-19T17:05:06 N: SIM800 set APN, username and password... [ OK ]
#2021-11-19T17:05:06 N: SIM800 setting up connection... [ OK ]
#2021-11-19T17:05:09 N: SIM800 IP... [ OK ] [ 10.187.23.252 ]
#2021-11-19T17:05:09 N: SIM800 start connection... [ OK ]
#2021-11-19T17:05:13 N: SIM800 UDP status... [ OK ] [ CONNECT ]
#2021-11-19T17:05:13 N: NTP send request
#2021-11-19T17:05:13 N: NTP send request success
#2021-11-19T17:05:13 N: NTP receive response
#2021-11-19T17:05:14 N: NTP receive response success
#2021-11-19T17:05:17 N: RTC set... [ OK ]
#2021-11-19T17:05:17 N: Current System date and time: 19/11/2021 17:5:17
#2021-11-19T17:05:17 N: Current date and time is: 19/11/2021 17:5:17
#2021-11-19T17:05:17 N: Acquisition scheduling...
#2021-11-19T17:05:17 N: --> observations every 1 minutes
#2021-11-19T17:05:17 N: --> report every 3 minutes
#2021-11-19T17:05:17 N: --> starting at: 17:6:0
#2021-11-19T17:05:17 N: --> testing at: 17:6:0
#2021-11-19T17:05:17 N: sdcard opened
#2021-11-19T17:05:20 N: SIM800 stop connection... [ OK ]
#2021-11-19T17:05:21 N: SIM800 PDP close... [ OK ]
#2021-11-19T17:05:21 N: SIM800 detach GPRS... [ OK ]
#2021-11-19T17:05:21 N: SIM800 stop connection... [ OK ]
#2021-11-19T17:05:26 N: SIM800 switching OFF... [ OK ] [ OFF ]
#2021-11-19T17:06:00 N: Next acquisition scheduled at: 17:9:0
#2021-11-19T17:06:00 N: Sensors reading...
pat1 commented 2 years ago

trace verbose:

#2021-11-19T17:48:55 V: SUPERVISOR_MANAGE_LEVEL_TASK ---> SUPERVISOR_END
#2021-11-19T17:48:55 V: SUPERVISOR_END ---> SUPERVISOR_INIT
#2021-11-19T17:48:56 V: SIM800--> +++
#2021-11-19T17:48:57 V: SIM800<-- OK
#2021-11-19T17:48:58 T: SIM800 switch to command mode [ OK ]
#2021-11-19T17:48:58 V: SIM800--> AT+CIPCLOSE=0

#2021-11-19T17:48:58 V: SIM800<-- CLOSE OK
#2021-11-19T17:48:58 N: SIM800 stop connection... [ OK ]
#2021-11-19T17:48:58 V: SIM800--> AT+CIPSHUT

#2021-11-19T17:48:59 V: SIM800<-- SHUT OK
#2021-11-19T17:48:59 N: SIM800 PDP close... [ OK ]
#2021-11-19T17:48:59 V: SIM800--> AT+CGATT=0

#2021-11-19T17:48:59 V: SIM800<-- OK
#2021-11-19T17:48:59 N: SIM800 detach GPRS... [ OK ]
#2021-11-19T17:48:59 N: SIM800 stop connection... [ OK ]
#2021-11-19T17:49:03 V: SIM800--> AT

#2021-11-19T17:49:04 N: SIM800 switching OFF... [ OK ] [ OFF ]
#1970-01-01T00:00:01 N: Configuration received... [ OK ]
#1970-01-01T00:00:01 N: Load configuration... [ OK ]
pat1 commented 2 years ago

was an hardware problem: the RTC was not well connected and the signal for wakeup from power_down was missed