mcci-catena / mcci-catena-4430

Library for MCCI Catena 4430 PIR/storage Feather wing
MIT License
1 stars 3 forks source link

fix #34: use correct error message #35

Closed dhineshkumarmcci closed 2 years ago

dhineshkumarmcci commented 2 years ago

Have modified the error messages to provide correct information, and followed the steps to reproduce the issue. Please find the log:

------------------------------------------------------------------------
This is Catena4430_Sensor.ino v0.5.2-0.
Target network: The Things Network / us915
System clock rate is 2.097 MHz
Enter 'help' for a list of commands.
------------------------------------------------------------------------

FLASH found, put power down
cMeasurementLoop::fsmDispatch: enter stInactive
RTC is not running
?CatenaStm32L0::LoRaWAN::begin: Arduino_LoRaWAN:begin failed
?Catena461x::LoRaWAN::begin: Super::begin() failed
cMeasurementLoop::fsmDispatch: enter stWarmup
cMeasurementLoop::fsmDispatch: enter stMeasure
cMeasurementLoop::fsmDispatch: enter stTransmit
Vbat:    4206 mV
Vbus:    5136 mV
BME280:  T: 28 P: 101184 RH: 39
Si1133:  644579 White
cMeasurementLoop::fsmDispatch: enter stWriteFile
RTC not set, not storing data!
cMeasurementLoop::fsmDispatch: enter stAwaitCard
** lorawan not provisioned!
cMeasurementLoop::fsmDispatch: enter stSleeping
using light sleep
dir
DATA/

OK
tree
DATA/
    20220203.DAT         25425
    20220210.DAT          5533
    20220215.DAT         32664
    20220216.DAT          7086
    20220217.DAT           316
    20220301.DAT           979

OK
dhineshkumarmcci commented 2 years ago

Have also updated the error message for check SD card error.

------------------------------------------------------------------------
This is Catena4430_Sensor.ino v0.5.2-0.
Target network: The Things Network / us915
System clock rate is 2.097 MHz
Enter 'help' for a list of commands.
------------------------------------------------------------------------

FLASH found, put power down
cMeasurementLoop::fsmDispatch: enter stInactive
RTC is running. Date: 2022-03-01 11:24:29Z
?CatenaStm32L0::LoRaWAN::begin: Arduino_LoRaWAN:begin failed
?Catena461x::LoRaWAN::begin: Super::begin() failed
cMeasurementLoop::fsmDispatch: enter stWarmup
cMeasurementLoop::fsmDispatch: enter stMeasure
cMeasurementLoop::fsmDispatch: enter stTransmit
Vbat:    4139 mV
Vbus:    5136 mV
BME280:  T: 29 P: 101133 RH: 38
Si1133:  706520 White
cMeasurementLoop::fsmDispatch: enter stWriteFile
Sd2Card::error: 0x1
** SD card not detected!
gSD.end() timed out
cMeasurementLoop::fsmDispatch: enter stAwaitCard
** lorawan not provisioned!
cMeasurementLoop::fsmDispatch: enter stSleeping
using light sleep

This is tested with placing the RTC battery and uninstalling the SD card, as the sketch do not check for SD card if RTC is not set.