blob: 6903e4a9055414557cf421b623f1fc7beeebf1de [file] [log] [blame]
syntax = "proto3";
package chip.rpc;
import 'pw_protobuf_protos/common.proto';
message PairingInfo {
uint32 code = 1;
uint32 discriminator = 2;
string qr_code = 3;
string qr_code_url = 4;
}
message SpakeInfo {
optional bytes verifier = 1;
optional bytes salt = 2;
optional uint32 iteration_count = 3;
}
// type lengths defined in chip spec 8.2.3.1
message DeviceInfo {
uint32 vendor_id = 1;
uint32 product_id = 2;
uint32 software_version = 3;
string serial_number = 4;
PairingInfo pairing_info = 5;
string software_version_string = 6;
}
message FabricInfo {
uint32 fabric_id = 1;
uint64 node_id = 2;
}
message DeviceState {
uint64 time_since_boot_millis = 1;
repeated FabricInfo fabric_info = 2;
}
message PairingState {
bool pairing_enabled = 1;
}
message MetadataForProvider {
bytes tlv = 1;
}
service Device {
rpc FactoryReset(pw.protobuf.Empty) returns (pw.protobuf.Empty){}
rpc Reboot(pw.protobuf.Empty) returns (pw.protobuf.Empty){}
rpc TriggerOta(pw.protobuf.Empty) returns (pw.protobuf.Empty){}
rpc SetOtaMetadataForProvider(MetadataForProvider) returns (pw.protobuf.Empty){}
rpc GetDeviceInfo(pw.protobuf.Empty) returns (DeviceInfo){}
rpc GetDeviceState(pw.protobuf.Empty) returns (DeviceState){}
rpc SetPairingState(PairingState) returns (pw.protobuf.Empty){}
rpc GetPairingState(pw.protobuf.Empty) returns (PairingState){}
rpc SetPairingInfo(PairingInfo) returns (pw.protobuf.Empty){}
rpc GetSpakeInfo(pw.protobuf.Empty) returns (SpakeInfo){}
rpc SetSpakeInfo(SpakeInfo) returns (pw.protobuf.Empty){}
}