Skip to content

[Feat][Settings] SPIFFSからWi-Fi/APIキー設定を読み込む / Load Wi-Fi/API key settings from SPIFFS #8

@Keitark

Description

@Keitark

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 カード動作を削除しない。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions