I am working with a Raspberry Pico W that has to act as a MQTT client and I am programming it against the Pico-SDK for C / C++ API.
Since I am going to use the code for several Raspberry Pico W, I would like to be able to transfer a customizable configuration file to the pico using the BOOTSEL mode and then be able to read the custom file from my code running on the pico.
The configuration file will be pretty basic JSON file, which contains essentially only which WiFi to connect to along with password and a unique identifier for the pico.
I would rather compile one UF2 file and upload that to all devices in my network along with a customizable configuration file, than generate a unique UF2 file for each pico with all configurations hardcoded in the file.
Particularly since I want to be able to support over-the-air updates in the future, which is easier, if all units uses the same image.
--
A quick test revealed that I cannot copy paste a configuration file to the pico when it is in BOOTSEL mode, since the file will be gone the next time I put the pico in BOOTSEL mode.
So what are my options?
Is it possible with PICO-SDK to make a small dedicated FAT partition on the pico (like 1 MB), that can be read when mounting the device to a computer?
... or are the only option to use a dedicated SD card and read it via SPI?