blob: 588ef568311466bad14f01a87e7d858df991e326 [file] [log] [blame]
syntax = "proto3";
package bluetooth.hci.facade;
import "google/protobuf/empty.proto";
service LeScanningManagerFacade {
rpc RegisterScanner(RegisterScannerRequest) returns (google.protobuf.Empty) {}
rpc Unregister(UnregisterRequest) returns (google.protobuf.Empty) {}
rpc Scan(ScanRequest) returns (google.protobuf.Empty) {}
rpc SetScanParameters(SetScanParametersRequest) returns (google.protobuf.Empty) {}
rpc FetchCallbackEvents(google.protobuf.Empty) returns (stream ScanningCallbackMsg) {}
rpc FetchAdvertisingReports(google.protobuf.Empty) returns (stream AdvertisingReportMsg) {}
}
enum LeScanType {
PASSIVE = 0x0;
ACTIVE = 0x1;
}
enum ScanningCallbackMsgType {
SCANNER_REGISTERED = 0;
SET_SCANNER_PARAMETER_COMPLETE = 1;
SCAN_RESULT = 2;
TRACK_ADV_FOUND_LOST = 3;
BATCH_SCAN_REPORTS = 4;
BATCH_SCAN_THRESHOLD_CROSSED = 5;
TIMEOUT = 6;
FILTER_ENABLE = 7;
FILTER_PARAMETER_SETUP = 8;
FILTER_CONFIG = 9;
}
enum ScanningStatus {
SCAN_SUCCESS = 0x00;
SCAN_NO_RESOURCES = 0x80;
SCAN_INTERNAL_ERROR = 0x85;
SCAN_ILLEGAL_PARAMETER = 0x87;
};
message RegisterScannerRequest {
uint32 uuid = 1;
}
message UnregisterRequest {
uint32 scanner_id = 1;
}
message ScanRequest {
bool start = 1;
}
message SetScanParametersRequest {
uint32 scanner_id = 1;
LeScanType scan_type = 2;
uint32 scan_interval = 3;
uint32 scan_window = 4;
}
message AdvertisingReportMsg {
bytes event = 1;
}
message ScanningCallbackMsg {
ScanningCallbackMsgType message_type = 1;
ScanningStatus status = 2;
uint32 data = 3;
}