Background / Goal / 背景・目的
Currently, when USE_SDCARD is enabled, Wi-Fi and API key settings are loaded from /wifi.txt and /apikey.txt on the SD card.
現在、USE_SDCARD 有効時は SD カード上の /wifi.txt と /apikey.txt から Wi-Fi 設定と API キー設定を読み込んでいます。
Core2 and CoreS3 already have a SPIFFS partition, and this project already uses SPIFFS for data such as role settings and wakeword data. This issue proposes using that existing SPIFFS area as a fallback source for these setting files when SD card settings are not available.
Core2 / CoreS3 には既に SPIFFS パーティションがあり、このプロジェクトでもロール設定やウェイクワードデータで SPIFFS が使われています。SD カード上の設定が利用できない場合に、既存の SPIFFS 領域を設定ファイルのフォールバック読み込み元として使えるようにする提案です。
Expected behavior / 期待する動作
-
First try to load /wifi.txt and /apikey.txt from SD card.
-
If either setting is not loaded from SD, try loading it from SPIFFS.
-
Preserve the existing fallback behavior when Wi-Fi settings are not found.
-
Preserve the existing serial output behavior for API key loading.
-
まず SD カードから /wifi.txt と /apikey.txt を読み込む。
-
SD カードから読み込めなかった設定があれば SPIFFS から読み込む。
-
Wi-Fi 設定が見つからない場合の既存フォールバック動作は維持する。
-
API キー読み込み時の既存シリアル出力動作は維持する。
Acceptance criteria / 受け入れ条件
-
m5stack-core2 builds successfully.
-
esp32-s3-devkitc-1 builds successfully.
-
Core2 can boot and connect to Wi-Fi using settings uploaded to SPIFFS.
-
Existing SD card behavior is not removed.
-
m5stack-core2 がビルド成功する。
-
esp32-s3-devkitc-1 がビルド成功する。
-
SPIFFS にアップロードした設定で Core2 が起動し Wi-Fi 接続できる。
-
既存の SD カード動作を削除しない。
Background / Goal / 背景・目的
Currently, when
USE_SDCARDis enabled, Wi-Fi and API key settings are loaded from/wifi.txtand/apikey.txton the SD card.現在、
USE_SDCARD有効時は SD カード上の/wifi.txtと/apikey.txtから Wi-Fi 設定と API キー設定を読み込んでいます。Core2 and CoreS3 already have a SPIFFS partition, and this project already uses SPIFFS for data such as role settings and wakeword data. This issue proposes using that existing SPIFFS area as a fallback source for these setting files when SD card settings are not available.
Core2 / CoreS3 には既に SPIFFS パーティションがあり、このプロジェクトでもロール設定やウェイクワードデータで SPIFFS が使われています。SD カード上の設定が利用できない場合に、既存の SPIFFS 領域を設定ファイルのフォールバック読み込み元として使えるようにする提案です。
Expected behavior / 期待する動作
First try to load
/wifi.txtand/apikey.txtfrom SD card.If either setting is not loaded from SD, try loading it from SPIFFS.
Preserve the existing fallback behavior when Wi-Fi settings are not found.
Preserve the existing serial output behavior for API key loading.
まず SD カードから
/wifi.txtと/apikey.txtを読み込む。SD カードから読み込めなかった設定があれば SPIFFS から読み込む。
Wi-Fi 設定が見つからない場合の既存フォールバック動作は維持する。
API キー読み込み時の既存シリアル出力動作は維持する。
Acceptance criteria / 受け入れ条件
m5stack-core2builds successfully.esp32-s3-devkitc-1builds successfully.Core2 can boot and connect to Wi-Fi using settings uploaded to SPIFFS.
Existing SD card behavior is not removed.
m5stack-core2がビルド成功する。esp32-s3-devkitc-1がビルド成功する。SPIFFS にアップロードした設定で Core2 が起動し Wi-Fi 接続できる。
既存の SD カード動作を削除しない。