0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

M5StackでANCSを動かす

0
Posted at

M5Stack CoreS3でANCSを動かしてみた(ESP-IDF / PlatformIO)

M5StackでiPhone通知を扱える ANCS (Apple Notification Center Service) を動かしてみました。
ANCSの日本語記事が少なかったので、動作確認までの手順を記録しておきます。

環境

  • M5Stack CoreS3
  • macOS:macOS 15.2
  • VS Code
  • PlatformIO
  • framework:ESP-IDF(Arduinoでやりたかったが、ANCSの実用サンプルがESP-IDF側にまとまっていたため)

使ったサンプル

Espressif公式のサンプルを利用しました。

このプロジェクトのソースコードはGitHubで公開しています。

前提

  • VS Code + PlatformIO がインストール済み
  • PlatformIOで espressif32 platform と ESP-IDF のビルド環境が使える状態
  • iPhone側のBluetoothがON(通知が出るアプリの通知が許可されていること)

手順(ざっくり動作確認まで)

  1. PlatformIOで CoreS3 + ESP-IDF のプロジェクトを作成
  2. 上記サンプルの main 配下(main.c, ble_ancs.c/h など)をプロジェクトの main/ に反映
    • ※ファイル構成が変わるので、必要に応じて CMakeLists.txt も更新
  3. ビルドして書き込み
  4. シリアルモニタでログを確認
  5. iPhoneのBluetooth設定画面から ESP_BLE_ANCS を選択
  6. iPhoneに表示される「システム通知を許可しますか?」といったポップアップを許可
  7. iPhoneでリマインダー等の通知を発生させる

動作確認結果

iPhoneでカレンダーの通知が発生すると、M5Stack側のログにも通知イベントが出力され、同じ通知を確認できました。
スクリーンショット 2026-03-20 3.26.55.png

まとめ

今回はサンプルコードをほぼそのまま動かして、ANCSがCoreS3で動作することを確認しました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?