“Show status information, change NW credentials, ping your gateway, show sensor values or get more details by activating debugging…
When I handover Arduino IoT projects to friends I realize that I need to address the following requirements:
Various network credentials must be changeable by others without an IDE. Here some examples: SSID/Key for WiFi, APN/Pin/UN/PW for GSM, APP_EUI/KEY for LoRa-WAN, etc.)
A Hostname byside the THING_ID would be useful.
The Serial-Line is slow by design and therefore I avoid printing out unnecessary information’s. But in kind of troubles it must be possible to activate serial debugging. And of course, without restarting the Arduino - to avoid that the reboot temporary fix a problem…
Get some general status information’s out of the Arduino.
I use various Arduino MKRs (WiFi, LoRa, GSM) because of their IoT functions. The following solutions are possible for all the MKR variants…
The SAMD21G18 Microcontroller has an on-board flash with 256KB capacity. This is more than enough to store everything for my projects. No extra hardware is needed.
There is one important fact to know: The flash will be completely erased when you upload a new Sketch. So, the settings get lost in this case. Not a showstopper for my projects. But maybe for yours!!!
The ATECC508 Chip was also a possible storage place. But because only three Slots with 72 Bytes are free - it is not a good choice for me.
To keep it simple I selected the USB Port to interact with the user. This port is available on all Arduino’s and serial terminal client programs (putty) are free available on nearly all computers and mobile devices.
To protect from unauthorized access, the serial line must be secured with a password!
Recover from lost password
If the password will be forgotten, a button to reset the flash to factory defaults is required.”