apple / HomeKitADK

Apache License 2.0
2.55k stars 232 forks source link

No setup code found in key-value store. #97

Closed ilyamordasov closed 3 years ago

ilyamordasov commented 3 years ago

I compile and run example under Ubuntu 20.04

make tools
sudo ./Tools/provision_raspi.sh --category 5 --setup-code 111-22-333 ./Output/Linux-x86_64-pc-linux-gnu/Debug/IP/Applications/.HomeKitStore
make TARGET=Linux apps
./Output/Linux-x86_64-pc-linux-gnu/Debug/IP/Applications/Lightbulb.OpenSSL

So, in the first terminal I see QR code, in the second - LightBulb logs, when I scan this QR code with Add accessory and push "Add Anyway" on a modal with "Uncertified Accessory" I get

2021-02-24'T'13:17:53'Z'    Error   [com.apple.mfi.HomeKit.Platform:AccessorySetup] No setup code found in key-value store.
2021-02-24'T'13:17:53'Z'    Fault   fatal error - HAPPlatformAccessorySetupLoadSetupInfo @ PAL/Linux/HAPPlatformAccessorySetup.c:50

In the .HomeKitStore directory I see two files 40.10 & 40.11

UPD: The solution is to put .HomeKitStore to the root dir

d4rkmen commented 1 year ago

damn, i have same issue. will try the workaround now anyway its a bit weird: the provisioning utility made a KVS and the example app cant see it