Devices going offline in mDash


I have got a device set up in mDash, to be able to flash code OTA (which I have done several times without problems). But my devices (ESP32) seem to go offline in the mDash console every now and then, even though I’ve run mos config-set dash.enable=true dash.token=XXXXX. I would have thought they should connect again automatically, even if they happen to disconnect from wifi for a short while, or lose power, but this doesn’t seem to be the case.


They do reconnect after losing power, wifi.
But after flashing (not OTA update), mos config-set dash... is required in order to connect.


Ok, that’s great, thanks. I have yet to understand why my devices have gone offline from mDash, even after no flashes. But good to know that a flash would make it go offline. I will have to research further what actually happens when they go offline.


You can add the file-logger library to your application and check the logs when the device goes offline.


Ok, so file-logger is a way to get logs OTA? This is something I’ve been looking for so it would be great! Am not getting it to work atm though. Have added the following to mos.yml:

Under config.schema:

 - ["debug.level", 3]
 - ["debug.event_level", "i", 2, {title: "Max level for which a MGOS_EVENT_LOG is raised"}]
 - ["file_logger.enable", true]	#logging OTA
 - ["file_logger.dir", "s", "/home/ingrid/esp/mongoose/logs/", {"title": "Directory to store log files into"}]

Under libs:

- origin:

Or did I misunderstand and it only works with device connected via USB?


The file-logger saves the logs on the device’s filesystem.
Don’t override file_logger.dir.


Ah, of course, thanks! Now I get the logs.