Hi,
I’ve built a custom board using the ESP32 with an Ethernet connection only — no WiFi support (at least for now). Because of this, I can’t use Blynk.Edgent and I’m currently hardcoding the AUTH TOKEN directly into the sketch.
This setup becomes problematic as the number of deployed devices increases, since I have to recompile and reflash the firmware with a new AUTH TOKEN for each device.
I’d like to know if it’s possible to input the AUTH TOKEN via Serial on the first boot, save it to NVS (non-volatile storage), and use it afterward without recompiling the code for each device.
Here’s the general logic I’m aiming for:
- On boot, check if an AUTH TOKEN is stored in NVS.
- If it exists, start Blynk using the stored token.
- If it doesn’t exist, wait for the user to input the token via Serial.
- Once received, save it to NVS and reboot the device.
Is this possible with the current Blynk library (non-Edgent)?
If you have any example code or tips, I’d really appreciate it!
Thanks in advance.