1syntax = "proto3"; 2 3package bluetooth.hci.facade; 4 5import "google/protobuf/empty.proto"; 6import "facade/common.proto"; 7 8service LeAdvertisingManagerFacade { 9 rpc CreateAdvertiser(CreateAdvertiserRequest) returns (CreateAdvertiserResponse) {} 10 rpc ExtendedCreateAdvertiser(ExtendedCreateAdvertiserRequest) returns (ExtendedCreateAdvertiserResponse) {} 11 rpc GetNumberOfAdvertisingInstances(google.protobuf.Empty) returns (GetNumberOfAdvertisingInstancesResponse) {} 12 rpc RemoveAdvertiser(RemoveAdvertiserRequest) returns (google.protobuf.Empty) {} 13} 14 15message GapDataMsg { 16 bytes data = 1; 17} 18 19enum AdvertisingEventType { 20 ADV_IND = 0x0; 21 ADV_DIRECT_IND = 0x1; 22 ADV_SCAN_IND = 0x2; 23 ADV_NONCONN_IND = 0x3; 24 ADV_DIRECT_IND_LOW = 0x4; 25} 26 27enum AdvertisingFilterPolicy { 28 ALL_DEVICES = 0x0; 29 LISTED_SCAN = 0x1; 30 LISTED_CONNECT = 0x2; 31 LISTED_SCAN_AND_CONNECT = 0x3; 32}; 33 34message AdvertisingConfig { 35 repeated GapDataMsg advertisement = 1; 36 repeated GapDataMsg scan_response = 2; 37 // Unit: number of Bluetooth slots in 0.125 ms increment 38 int32 interval_min = 4; 39 // Unit: number of Bluetooth slots in 0.125 ms increment 40 int32 interval_max = 5; 41 AdvertisingEventType advertising_type = 6; 42 bluetooth.facade.BluetoothOwnAddressTypeEnum own_address_type = 7; 43 bluetooth.facade.BluetoothPeerAddressTypeEnum peer_address_type = 8; 44 bluetooth.facade.BluetoothAddress peer_address = 9; 45 int32 channel_map = 10; 46 AdvertisingFilterPolicy filter_policy = 11; 47 int32 tx_power = 12; 48} 49 50message ExtendedAdvertisingConfig { 51 AdvertisingConfig advertising_config = 1; 52 bool connectable = 2; 53 bool scannable = 3; 54 bool directed = 4; 55 bool high_duty_directed_connectable = 5; 56 bool legacy_pdus = 6; 57 bool anonymous = 7; 58 bool include_tx_power = 8; 59 bool use_le_coded_phy = 9; 60 int32 secondary_map_skip = 10; 61 int32 secondary_advertising_phy = 11; 62 int32 sid = 12; 63 bool enable_scan_request_notification = 13; 64} 65 66message CreateAdvertiserRequest { 67 AdvertisingConfig config = 1; 68} 69 70message CreateAdvertiserResponse { 71 // -1 on error 72 int32 advertiser_id = 1; 73} 74 75message ExtendedCreateAdvertiserRequest { 76 ExtendedAdvertisingConfig config = 1; 77} 78 79message ExtendedCreateAdvertiserResponse { 80 int32 advertiser_id = 1; 81} 82 83message GetNumberOfAdvertisingInstancesResponse { 84 int32 num_advertising_instances = 1; 85} 86 87message RemoveAdvertiserRequest { 88 int32 advertiser_id = 1; 89} 90