MB6HC+SBC inaccessible after emergency stop
-
We have a machine that has been working fine for months, it's a custom IDEX machine with the MB6HC in SBC mode (with a raspberry 4) running RRF 3.3. We have modified and compiled our own RRF and DWC versions but i don't think it has any relation with the problem. I've tried the same thing in RRF 3.4.0rc2 (SBC mode) and it does the same.
Yesterday while it was printing a file we turned off the machine (equivalent to unpluging the printer) without pausing or stopping the job. We have done this hundreds of times, but yesterday after this event there was no way to reconect to the machine, look at this screenshot:
We could not connect to the machine, you can see the "connecting..." message.
But the tool names were visible, even the temperatures were working fine (in this screenshot the sensors are disconnected ), the input voltage was also visible. So DWC was working, the problem being that we couldn't click anywhere.After investigating the JSON files in the directory "/opt/dsf" I've found that the file "dwc-settings.json" is not a valid JSON.
After deleting this JSON and replacing it with a back up, everything has worked perfectly.The bad JSON file ends exactly like this:
.....,"extruderFeedrates":[60,30,15,5,1],"temperatures":{"tool":{"active"
Here you have the file to look at it if you want (I've changed the extension from .json to ".txt") dwc-settings_WRONG.txt
,
,
,
,
While investigating this error I've found that there is a JSON file that i suspect it's named incorrectly.The name in the folder "/opt/dsf/sd/sys" -> "dwc2settings.json"
The name in the code of DWC -> legacyDwcSettingsFile: '0:/sys/dwc2-settings.json',I don't know if this naming mishap would affect our issue but i think it should be corrected.
-
For now i've fixed the problem but what should i do to make sure it doesn't keep happening??
-
@ja I haven't seen corrupted/truncated settings files in either SBC or standalone mode yet but I just added improved error handling to DWC (to be included in the next version) to prevent it from getting stuck while connecting (see here). If this is a frequent problem on your machines, consider saving the settings in the localStorage object instead.
-
@chrishamm Thank you , it's by no mean a frequent problem, its the first time it hapened.
@chrishamm said in MB6HC+SBC inaccessible after emergency stop:
consider saving the settings in the localStorage object
You mean toggling this right??
,
,did you look at this??
@ja said in MB6HC+SBC inaccessible after emergency stop:
While investigating this error I've found that there is a JSON file that i suspect it's named incorrectly.
The name in the folder "/opt/dsf/sd/sys" -> "dwc2settings.json"
The name in the code of DWC -> legacyDwcSettingsFile: '0:/sys/dwc2-settings.json', -
@ja Yes and yes.
dwc2-settings.json
is a legacy file as implied by the field name in the Path object, so it is not used by default any more. It is only checked when you upgrade from DWC2 anddwc-settings.json
could not be found. -
@chrishamm Hello, I have compiled a new version of DWC with the changes you made and now it doesn't get stuck on "connecting", but there is still a problem, it doesnt say anything on the console.
It doesn't send any warning message and the faulty JSON file doesn't get fixed.
So now the JSON file doesn't work, for example, if i disable the appearance "dark theme" it changes to white but after recharging the page it continues to be in dark, if i start a plugin it works but when the page is recharged it isn't started.I see that you put this line to send a warning to the console:
" console.warn('Failed to load settings: ' + e); "
but it doesn't do anything, i dont see any message in the console. -
@ja I cannot confirm this with the latest version from GitHub. If the JSON file (for whatever reason) fails to be loaded, it is replaced with the stock settings + custom changes as soon as a change like the dark theme mode is made. In the dev tools -> network requests I can see
/sys/dwc-settings.json
being uploaded as soon as I change something on the settings page.