Device Update for IoT Hubの使いどころ

1.6K Views

December 16, 23

スライド概要

2023/12/16 .NETラボ 勉強会 2023年12月
https://dotnetlab.connpass.com/event/303142/
https://www.youtube.com/watch?v=QXnpRWq5Buo

profile-image

SeeedKKの中の人。Microsoft MVP for Internet of Things。

シェア

またはPlayer版

埋め込む »CMSなどでJSが使えない場合

関連スライド

各ページのテキスト
1.

Device Update for IoT Hubの 使いどころ ~チュートリアルに騙されるな!~ MATSUOKA Takashi @matsujirushi12

2.

MATSUOKA Takashi @matsujirushi12 「e」3つ 2017~ MVP for Windows Development 2020~ for Microsoft Azure 2022~ for Internet of Things 1991年大手メーカーに入社し、 工場の自動化や情報システム の開発、運用に従事。2017年8 月、Seeed株式会社設立時に 転職。組み込みデバイスの開 発環境整備やライブラリ開発 を担当。 ↑ ↑ 仕事 (2017~) 趣味? (2016~)

3.

最近のしくじり サーバー LTE通信 マイコン センサー デバイス FeRAM

4.

デバイス展開前と展開後 展開前 • レビュー • テスト 展開後 • OTA(Over-the-Air) バラまいたデバイスのファームウェアを 安全に更新する仕組みが必要

5.

OTA(Over-the-Air) サーバー ✓ ✓ ✓ ✓ ファームウェア保管 デバイス管理・グループ管理 スケーリング 管理画面 Firmware ✓ 安全な通信 ✓ 相互認証 デバイス ✓ ✓ ✓ ✓ ✓ ファームウェアダウンロード ファームウェア適合チェック ファームウェア切替 ファームウェアロールバック 結果レポート

6.

Device Update for IoT Hub Device Update for Azure IoT Hub は、 IoT デバイスの無線更新をデプロイできるようにするサービスです。 https://learn.microsoft.com/ja-jp/azure/iot-hub-device-update/understand-device-update IoTデバイスのOTA更新をできるようにするサービス Microsoft Azure (Cloud) Device v2 v1 IoT Hub Device Update Agent Device v2 v1 Device Update Service v2 Device v1 v2 Firmware

7.

やってみよう! Microsoft Azure (Cloud) IoT Hub Device Update Service Device Device Update Agent ✓ Raspberry Pi 3 Model B+ ✓ Yocto Project (Honister) https://github.com/Azure/iot-hub-device-update-yocto https://learn.microsoft.com/ja-jp/azure/iot-hub-device-update/device-update-raspberry-pi

8.

やってみよう! IoT Hub作成 Device Updateは Japanリージョンに無い デバイスツイン必要

9.

やってみよう! Device Update作成 Device Updateは Japanリージョンに無い

10.

やってみよう! 権限付与

11.

やってみよう! インポート ✓ マニフェスト ✓ スクリプト ✓ イメージ

12.

やってみよう! デプロイ グループに対してデプロイ 日時指定可能

13.

やってみよう! 監視

14.

Device Update for IoT Hub Microsoft Azure (Cloud) Azure Portal Azure CLI REST API IoT Hub Device Device Device Update Service Update Update Update Device Update Agent ✓ Image-based ✓ Package-based ✓ Script-based → using SWUpdate Deploy Device to specific ADUGroup Storage Import Container Update Files NAME mmcblk0 |-mmcblk0p1 |-mmcblk0p2 |-mmcblk0p3 `-mmcblk0p4 MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS 179:0 0 59.5G 0 disk 179:1 0 50.5M 0 part /boot 179:2 0 1.1G 0 part 179:3 0 1.1G 0 part / 179:4 0 512M 0 part /adu

15.

わたしのIoTデバイス(一部) NOT Linux Seeed Studio XIAO ESP32S3 (Wi-Fi/BLE) Wio LTE Cat.1 (LTE Cat.1) Wio Terminal (Wi-Fi/BLE) Linux Raspberry Pi 4 (Wi-Fi/BLE/Ethernet) Beagle Bone Green (Ethernet) reTerminal (Wi-Fi/BLE/Ethernet)

16.

Device Updateで サポートしているプラットフォーム ※ マイクロソフトによってテスト、サポートされている Debian 10 (buster) • AMD64 • ARM32v7 • ARM64 Ubuntu Server 20.04 Ubuntu Server 18.04 • AMD64 • ARM64 • AMD64 • ARM64 https://learn.microsoft.com/ja-jp/azure/iot-hub-device-update/support#linux-operating-systems

17.

Device Updateの対応デバイスは? 「Device Update は、Linux や Azure RTOS (リアルタイム オペレーティング システム) を含む広範な IoT オペレーティング システムをサポートしており、オープンソース を通じて拡張できます。」 https://learn.microsoft.com/ja-jp/azure/iot-hub-device-update/understand-device-update

18.

Device Update Samples for MCU Azure RTOS Free RTOS Azure IoT Middleware for Azure RTOS Azure IoT Middleware for FreeRTOS https://github.com/azure-rtos/netxduo/tree/master/addons/azure_iot https://github.com/Azure/azure-iot-middleware-freertos Azure RTOS - Additional samples Azure IoT samples using Azure IoT middleware for FreeRTOS https://github.com/azure-rtos/samples https://github.com/Azure-Samples/iot-middleware-freertos-samples Company Devkit MCU Company Devkit MCU Microchip ATSAME54-XPRO ATSAME54P20A Espressif NXP MIMXRT1060-EVK MIMXRT1062DVL6B NXP MIMXRT1060-EVK MIMXRT1062DVL6B STM B-L4S5I-IOT01A STM32L4S5VIT6 STM B-L475E-IOT01A STM32L475VG STM B-U585I-IOT02A STM32U585AII6Q Renesas RX65N-RSK-2MB R5F565NE*DFC Renesas CK-RX65N (Ethernet) R5F565NEHDFB ESP32 Linux (simulation)

19.

Azure IoT Middleware for FreeRTOS ADU client API and ADU Agent Logic https://github.com/Azure/azure-iot-middleware-freertos/blob/main/docs/how_to_use_adu_client.md

20.

Device Updateのサポートはこれか? Microsoft Azure (Cloud) IoT Hub Device Update Service Device (Linux) マイクロソフトによってテスト、サポートされている ✓ Debian 10 ✓ Ubuntu Server 20.04 ✓ Ubuntu Server 18.04 Device Device Update Agent Device (NOT Linux) Device Update Agent相当 サンプルコードを参考にセルフサポート 広範なIoTオペレーティングシステムをサポート

21.

まとめ ✓ サーバーは素晴らしい ✓ 必要とする機能を全て備えている ✓ Azure Portalですぐに導入できるし、APIで自動化も可能 ✓ Storage Container不要だと、より嬉しい ✓ 通信は安全か? ✓ TLSで暗号化、SASやX.509で認証(IoT Hub) ✓ ダウンロードは通信暗号化していない?(CDN) ✓ https://learn.microsoft.com/ja-jp/azure/iot-hub-device-update/device-update-networking ✓ デバイスは実装工数に差 ✓ Debian 10, Ubuntu 20.04/18.04は簡単&安心(マイクロソフトサポート) ✓ Linuxは簡単かも?(ADU Agent + SWUpdate) ✓ Azure RTOS/Free RTOSはサンプルコード有り ✓ がんばれば上記以外でもイケる? ✓ IoT Hub必須 ✓ IoT Central+Device Update for IoT Hubはできない

22.

デバイスのOSに気をつけろよ! 油断すると、とっても工数ふくらむぞ