kike-canaries / canairio_firmware

CanAirIO is a citizen science initiative. We are developing a mobile application that is able to set a PM2.5 or CO2 sensors, and other related sensors, as a fixed station using WiFi or mobile station with an smartphone by using a Bluetooth connection.
https://canair.io
GNU General Public License v3.0
104 stars 23 forks source link

As the sampling time increases, faults begin to occur #125

Closed arttesano closed 2 years ago

arttesano commented 2 years ago

Thanks for help up and contribute to CanAirIO project. Please edit and fill this template.

Description

When I have the sensors in small sample rates, 5 to 30 seconds there are no disconnection failures or measurements that stay in a single value,but when I go up to values of 60 or 180 seconds, disconnection faults begin to appear or measurements appear at the same value

Debug output

If apply, please enable debugging from the CanAirIO app on settings->mobile station->enable debug mode and paste the output.

Device config

board:  ESP32DevKit and TTGO_T7
firmware version: rev827 (prod)
mobile app version: rev5xx
sensors: SPS30 UART
OLED: no
TFT: no
Power: phone charger

To Reproduce

increase the sample rate value

Additional context

http://influxdb.canair.io:8000/d/GU68_kcMz/banco-prueba-arttesano?orgId=1&from=1632343527895&to=1632386727895&refresh=1m&viewPanel=19

arttesano commented 2 years ago

Output

-->[CONF] request: {
  "act": "rbt",
  "cmd": "47179",
  "aenb": false,
  "denb": false,
  "i2conly": false,
  "ienb": false,
  "wenb": false,
  "wmac": 0,
  "wsta": false
}
-->[CONF] reboot..
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8

== CanAirIO Setup ==

-->[CONF] debug is enable.
-->[OGUI] display config ready.
-->[INFO] ESP32MAC: 98:F4:AB:6D:4B:BA
-->[INFO] Revision: r827
-->[INFO] Firmware: 0.4.3
-->[INFO] Flavor  : TTGO_T7
-->[INFO] Target  : prod
-->[INFO] Detecting sensors..
-->[INFO] PM sensor configured: 2
-->[SLIB] new sample time: 1
-->[SLIB] debug is enable.
-->[SLIB] temperature offset: 0.00
-->[SLIB] altitude offset: 0.00
-->[SLIB] forced only i2c sensors: 0
-->[SLIB] UART detecting SPS30 PM sensor.. 
-->[SLIB] UART SPS30 starting sensor.. 
Sending:  0x7E 0x00 0xD1 0x00 0x2E 0x7E
Received: 0x7E 0x00 0xD1 0x00 0x07 0x02 0x02 0x00 0x07 0x00 0x02 0x00 0x1A 0x7E length: 13

Sending:  0x7E 0x00 0xD0 0x01 0x03 0x2B 0x7E
Received: 0x7E 0x00 0xD0 0x00 0x11 0x39 0x36 0x30 0x44 0x31 0x30 0x46 0x32 0x36 0x37 0x46 0x35 0x46 0x43 0x42 0x36 0x00 0x79 0x7E length: 23

-->[SLIB] SPS30 Serial number :  960D10F267F5FCB6
Sending:  0x7E 0x00 0xD0 0x01 0x00 0x2E 0x7E
Received: 0x7E 0x00 0xD0 0x00 0x09 0x30 0x30 0x30 0x38 0x30 0x30 0x30 0x30 0x00 0x9E 0x7E length: 15

-->[SLIB] SPS30 product name  :  00080000
Sending:  0x7E 0x00 0xD1 0x00 0x2E 0x7E
Received: 0x7E 0x00 0xD1 0x00 0x07 0x02 0x02 0x00 0x07 0x00 0x02 0x00 0x1A 0x7E length: 13

-->[SLIB] SPS30 firmware level:  2.2
-->[SLIB] SPS30 Hardware level:  7
-->[SLIB] SPS30 SHDLC protocol:  2.0
-->[SLIB] SPS30 Library level :  1.4
Sending:  0x7E 0x00 0xD3 0x00 0x2C 0x7E
Received: 0x7E 0x00 0xD3 0x00 0x00 0x2C 0x7E length: 6

-->[SLIB] SPS30 Detected SPS30 via UART. 
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x00 0x00 0xFF 0x7E length: 6

-->[SLIB] SPS30 Measurement OK 
-->[SLIB] UART detected SPS30 sensor :)
-->[SLIB] UART detected:  SENSIRION
-->[SLIB] trying to load I2C sensors.. 
-->[SLIB] GCJA5 starting PANASONIC GCJA5 sensor.. 
-->[SLIB] AM2320 starting AM2320 sensor.. 
-->[SLIB] I2C detected AM2320 sensor :)
-->[SLIB] SHT31 starting SHT31 sensor.. 
-->[SLIB] BME280 starting BME280 sensor.. 
-->[SLIB] BME680 starting BME680 sensor.. 
-->[SLIB] AHT10 starting AHT10 sensor.. 
-->[SLIB] SCD30 starting CO2 SCD30 sensor.. 
-->[INFO] PM/CO2 sensor detected: SENSIRION
-->[WDOG] watchdog config to check each 120 seconds.
-->[WIFI] connecting to TunalSensores............ done.
-->[WIFI] IP: 192.168.5.128
-->[WIFI] publish interval: 90 sec.
-->[INFO] OTA on: CanAirIOBBA.local with passw: CanAirIO
-->[FOTA] not need update
-->[CONF] response: {
  "dname": "",
  "stime": 45,
  "stype": 2,
  "wenb": true,
  "ssid": "TunalSensores",
  "ienb": true,
  "ifxdb": "canairio",
  "ifxip": "influxdb.canair.io",
  "ifxpt": 8086,
  "geo": "d2g633c",
  "denb": true,
  "i2conly": false,
  "toffset": 0,
  "altoffset": 0,
  "lskey": "",
  "wmac": 47179,
  "wsta": true,
  "vrev": 827,
  "vflv": "TTGO_T7",
  "vtag": "prod",
  "vmac": "98:F4:AB:6D:4B:BA"
}
-->[BTLE] GATT server ready. (Waiting for client)
-->[INFO] InfluxDb API: 1
-->[IFDB] config: canairio@influxdb.canair.io:8086
-->[IFDB] connected to http://influxdb.canair.io:8086
-->[BTLE] device client is connected.
-->[OGUI] starting task loop
Sending:  0x7E 0x00 0x03 0x00 0xFC 0x7E
Received: 0x7E 0x00 0x03 0x00 0x28 0x40 0x57 0x76 0x44 0x40 0xBC 0x19 0xA3 0x40 0xF8 0x22 0x72 0x41 0x02 0x12 0x1F 0x41 0x8B 0x49 0x67 0x41 0xBF 0xBF 0x09 0x41 0xD5 0xBE 0x05 0x41 0xDA 0x14 0x94 0x41 0xDA 0xBC 0x6C 0x3F 0x52 0x0E 0x61 0x68 0x7E length: 46

-->[SLIB] SPS30 read > done! 
-->[SLIB] UART sensors count:  1
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.500000% T:26.900000°C
-->[SLIB] new sample time: 45
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.599998% T:26.900000°C
-->[IFDB] write done.
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.799999% T:26.900000°C
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.799999% T:26.900000°C
-->[IFDB] write done.
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.900002% T:26.900000°C
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.900002% T:26.799999°C
-->[IFDB] write done.
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.900002% T:26.799999°C
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.799999% T:26.799999°C
-->[IFDB] write done.
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.599998% T:26.700001°C
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.400002% T:26.700001°C
-->[IFDB] write done.
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.299999% T:26.700001°C
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.200001% T:26.700001°C
-->[IFDB] write done.
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.200001% T:26.700001°C
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.099998% T:26.700001°C
-->[IFDB] write done.
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.099998% T:26.600000°C
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.099998% T:26.600000°C
-->[IFDB] write done.
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.099998% T:26.500000°C
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.000000% T:26.500000°C
-->[IFDB] write done.
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.000000% T:26.500000°C
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.000000% T:26.500000°C
-->[IFDB] write done.
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.000000% T:26.500000°C
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.000000% T:26.600000°C
-->[IFDB] write done.
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.000000% T:26.600000°C
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.000000% T:26.600000°C
-->[IFDB] write done.
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.000000% T:26.600000°C
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.000000% T:26.600000°C
-->[IFDB] write done.
Sending:  0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] UART sensors count:  0
-->[SLIB] AM2320 read > done! 
-->[SLIB] PM1:003 PM25:006 PM10:008 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:39.000000% T:26.600000°C
hpsaturn commented 2 years ago

Thanks @arttesano for this complete report. I edited the previous message only for put the ouput into a block. I'm goint to replicate in my environment and also I will release a version in the OTA dev channel. Please subscribing this device to OTA dev channel with the next zip. With that we will test more quickly.

https://t.me/canairio/15342