RasPi+IoTCoreでAzure IoT Edgeは動くのか!?→動かない

一般提供開始(GA)したAzure IoT Edgeが動作するOSの一覧がこれです。

docs.microsoft.com

マイクロソフトが正式にサポートするものがTier 1というカテゴリになっていて、

  • 一般提供開始(GA)
  • パブリックプレビュー
    • Windows 10 Server 1803
    • Windows 10 IoT Enterprise (with April 2018 update)
    • Windows 10 IoT Core (with April 2018 update)

と、現時点で安心して使えるのはUbuntu Server 18.04/16.04とRaspbian-stretchだけのようです。用途によって注意が必要ですね。

ラズパイのWindows 10 IoT Coreでも動くのかな?
ということで、やってみることに。

環境

まだRasPi3B+、買っていないので、、、
Raspberry Pi Model B(RasPi3B)を使います。

Windows 10 IoT CoreのイメージをマイクロSDに書き込んで、RasPi3Bで起動。
OSバージョンはv.10.0.17134.1でした。Build 17134はVersion 1803なので、April 2018 updateに該当。(あぁ、ややこしい)

f:id:matsujirushix:20180722142214p:plain

IoT Edgeサービスをインストール

手順はこちら。

docs.microsoft.com

おっと、いきなりPowerShell
コンソール出し方を忘れた、、、のでググります。

これっぽい。

docs.microsoft.com

PowerShellを接続

PCでWindows PowerShellを管理者で実行してから、net start WinRMコマンドでWinRMサービスを有効にします。

f:id:matsujirushix:20180722143229p:plain

良さげ。

Set-Item WSMan:\localhost\Client\TrustedHosts -Value 192.168.0.4コマンドでIoT Coreラズパイを信頼します。

f:id:matsujirushix:20180722143457p:plain

Enter-PSSession -ComputerName 192.168.0.4 -Credential 192.168.0.4\AdministratorコマンドでIoT CoreラズパイのPowerShellに接続します。

f:id:matsujirushix:20180722143800p:plain

繋がりました!

IoT Edgeサービスパッケージをダウンロード

手順に従って、バシバシとコマンドを実行します。

Invoke-WebRequest https://aka.ms/iotedged-windows-latest -o .\iotedged-windows.zip
Expand-Archive .\iotedged-windows.zip C:\ProgramData\iotedge -f
Move-Item c:\ProgramData\iotedge\iotedged-windows\* C:\ProgramData\iotedge\ -Force
rmdir C:\ProgramData\iotedge\iotedged-windows
$env:Path += ";C:\ProgramData\iotedge"
SETX /M PATH "$env:Path"

f:id:matsujirushix:20180722144300p:plain

C:\ProgramData\iotedgeフォルダに放り込んだみたいなので確認すると、iotedgeやiotedged(デーモンかな?)が入っていました。

f:id:matsujirushix:20180722144626p:plain

vcruntimeをインストール

手順に従って(ry

Invoke-WebRequest -useb https://download.microsoft.com/download/0/6/4/064F84EA-D1DB-4EAA-9A5C-CC2F0FF6A638/vc_redist.x64.exe -o vc_redist.exe
.\vc_redist.exe /quiet /norestart

f:id:matsujirushix:20180722144933p:plain

vc_redistを実行したところでエラー。
OSプラットフォームが違うぞコラ!ってことですが、、、
よく見ると、ダウンロードしているファイル名がvc_redist.x64.exeとx64ぽい。

途中経過

現時点は動かない。
なんとなく予想はしていたが、、、ArmのIoTCoreは対応していないんだろうか??