LOG¶
Command Execution Logs¶
Example 1: Online Sensing Start¶
I (12345) SensingCmd: Command processing task started
I (12350) SensingCmd: Processing command: SENSE,ONLINE,F=20,D=60
I (12355) OnlineSensing: Online sensing initialized:
I (12355) OnlineSensing: - Sampling frequency: 20.00 Hz
I (12355) OnlineSensing: - MQTT enabled: Yes
I (12355) OnlineSensing: - Serial output enabled: Yes
I (12360) OnlineSensing: Online sensing started (frequency: 20.00 Hz, period: 50000 us)
I (12360) SensingCmd: MQTT response sent: SENSE,OK,ONLINE,F=20.00,D=60.00
Example 2: Online Sensing Status Query¶
I (23456) SensingCmd: Processing command: SENSE,ONLINE,STATUS
I (23460) SensingCmd: MQTT response sent: SENSE,STATUS,ONLINE,RUNNING=YES,F=20.00
Example 3: Online Sensing Stop¶
I (34567) SensingCmd: Processing command: SENSE,ONLINE,STOP
I (34570) OnlineSensing: Online sensing stopped
I (34575) SensingCmd: MQTT response sent: SENSE,OK,ONLINE,STOPPED
Example 4: Offline Sensing Immediate Start¶
I (45678) SensingCmd: Processing command: SENSE,OFFLINE,F=100,D=10
I (45680) OfflineSensing: Offline sensing started: 100.00 Hz for 10.00 sec
I (45685) SensingCmd: MQTT response sent: SENSE,OK,OFFLINE,F=100.00,D=10.00
I (55680) OfflineSensing: Completed: 1000 samples, 100.00 Hz, 10.00 sec
I (55685) OfflineSensing: SD: 1000 samples -> /sdcard/20250116120000_F0100_D0010.csv
I (55690) SensingCmd: MQTT response sent: SENSE,OK,OFFLINE,SAMPLES=1000,FREQ=100.00,DUR=10.00,SD=OK
Example 5: Offline Sensing with Delay¶
I (56789) SensingCmd: Processing command: SENSE,OFFLINE,F=50,D=5,DL=10
I (56795) SensingCmd: MQTT response sent: SENSE,OK,OFFLINE,F=50.00,D=5.00,DL=10
I (56800) SensingCmd: Countdown: 10 sec (start in 10 sec)
I (56810) SensingCmd: Countdown: 9 sec
I (56820) SensingCmd: Countdown: 8 sec
...
I (56900) SensingCmd: Countdown: 0 sec - Starting now
I (56900) SensingCmd: OFFLINE: F=50.00 Hz, D=5.00 sec
I (56905) OfflineSensing: Offline sensing started: 50.00 Hz for 5.00 sec
I (57405) OfflineSensing: Completed: 250 samples, 50.00 Hz, 5.00 sec
I (57410) SensingCmd: MQTT response sent: SENSE,OK,OFFLINE,SAMPLES=250,FREQ=50.00,DUR=5.00,SD=OK
Example 6: Offline Sensing Scheduled Start¶
I (67890) SensingCmd: Processing command: SENSE,OFFLINE,F=30,D=5,TIME=251216200500
I (67895) SensingCmd: MQTT response sent: SENSE,OK,OFFLINE,F=30.00,D=5.00,TIME=1734350700,DELAY=300
I (67900) SensingCmd: Countdown: 300 sec (start in 300 sec)
I (67930) SensingCmd: Countdown: 270 sec
...
I (68200) SensingCmd: Countdown: 0 sec - Starting now
I (68200) SensingCmd: OFFLINE: F=30.00 Hz, D=5.00 sec
I (68205) OfflineSensing: Offline sensing started: 30.00 Hz for 5.00 sec
I (68255) OfflineSensing: Completed: 150 samples, 30.00 Hz, 5.00 sec
I (68260) SensingCmd: MQTT response sent: SENSE,OK,OFFLINE,SAMPLES=150,FREQ=30.00,DUR=5.00,SD=OK
Example 7: Error - Invalid Frequency¶
I (78901) SensingCmd: Processing command: SENSE,ONLINE,F=20000,D=10
I (78905) SensingCmd: MQTT response sent: SENSE,ERROR,ONLINE,INVALID_FREQ
E (78910) OnlineSensing: Invalid sampling frequency: 20000.00 Hz (valid range: 0.1 - 10000 Hz)
Example 8: Error - Sensor Not Initialized¶
I (89012) SensingCmd: Processing command: SENSE,ONLINE,F=20,D=60
E (89015) SensingCmd: Sensor handle not set, cannot process command
I (89020) SensingCmd: MQTT response sent: SENSE,ERROR,SENSOR_NOT_INITIALIZED
Example 9: Error - Offline Already Running¶
I (90123) SensingCmd: Processing command: SENSE,OFFLINE,F=100,D=10
I (90125) SensingCmd: MQTT response sent: SENSE,OK,OFFLINE,F=100.00,D=10.00
I (90130) SensingCmd: Processing command: SENSE,OFFLINE,F=50,D=5
I (90135) SensingCmd: MQTT response sent: SENSE,ERROR,OFFLINE,ALREADY_RUNNING
Example 10: Error - Time in Past¶
I (91234) SensingCmd: Processing command: SENSE,OFFLINE,F=100,D=10,TIME=251216190000
I (91240) SensingCmd: MQTT response sent: SENSE,ERROR,OFFLINE,TIME_PAST
Example 11: Auto-stop Online Sensing¶
I (102345) SensingCmd: Processing command: SENSE,ONLINE,F=1,D=30
I (102350) OnlineSensing: Online sensing started (frequency: 1.00 Hz, period: 1000000 us)
I (102355) SensingCmd: MQTT response sent: SENSE,OK,ONLINE,F=1.00,D=30.00
I (102360) SensingCmd: Online sensing will auto-stop after 30.00 seconds
...
I (105360) SensingCmd: MQTT response sent: SENSE,OK,ONLINE,AUTO_STOPPED
I (105365) OnlineSensing: Online sensing stopped
Example 12: Command Queue Full¶
Example 13: Empty Command¶
I (124567) SensingCmd: Processing command:
I (124570) SensingCmd: MQTT response sent: SENSE,ERROR,EMPTY_COMMAND
Example 14: Unknown Command¶
I (135678) SensingCmd: Processing command: SENSE,UNKNOWN,COMMAND
I (135680) SensingCmd: MQTT response sent: SENSE,ERROR,UNKNOWN_COMMAND
Log Format¶
The logs follow this format:
- I: Info level log
- E: Error level log
- W: Warning level log
- D: Debug level log
Tag Names¶
SensingCmd: Command handler moduleOnlineSensing: Online sensing moduleOfflineSensing: Offline sensing module
Common Log Patterns¶
- Command Processing:
Processing command: <command> - MQTT Response:
MQTT response sent: <response> - Initialization: Module initialization messages
- Status Updates: Running status and configuration
- Error Messages: Error codes and descriptions