The main objective is to have the possibility of reconfiguring the WiFi credentials from USB cable without touching any button, when the current WiFi credentials are set wrong by accident and the Photon cannot connect to the Particle or local , from where the by user-code we could force entering in Listen Mode (by calling WiFi.listen()) or to Clear the WiFi credentials (by calling WiFi.clearCredentials() and then System.reset()) => Finally calling
particle setup wifi to fix the wrong credentials => Reboot.
As we can enter and exit DFU mode from USB cable without touching any button , I was wondering if we can clear the WiFi credentials from DFU mode (to force the Listen mode in next reboot), but without overwritting the current firmware.
Any advice? Maybe is it possible to call any function of the bootloader from DFU mode to clear the WiFi credentials?.
PD: I know that the WiFi credentials can be usually fixed from Listening mode, but if they are stored in the internal or external flash memory after being set-up, I thought that they could maybe be cleared with dfu-util to force a Listen Mode in the next reboot.