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 WHITELISTED_SCAN = 0x1; 30 WHITELISTED_CONNECT = 0x2; 31 WHITELISTED_SCAN_AND_CONNECT = 0x3; 32}; 33 34message AdvertisingConfig { 35 repeated GapDataMsg advertisement = 1; 36 repeated GapDataMsg scan_response = 2; 37 bluetooth.facade.BluetoothAddress random_address = 3; 38 // Unit: number of Bluetooth slots in 0.125 ms increment 39 int32 interval_min = 4; 40 // Unit: number of Bluetooth slots in 0.125 ms increment 41 int32 interval_max = 5; 42 AdvertisingEventType event_type = 6; 43 bluetooth.facade.BluetoothAddressTypeEnum address_type = 7; 44 bluetooth.facade.BluetoothPeerAddressTypeEnum peer_address_type = 8; 45 bluetooth.facade.BluetoothAddress peer_address = 9; 46 int32 channel_map = 10; 47 AdvertisingFilterPolicy filter_policy = 11; 48 int32 tx_power = 12; 49} 50 51message ExtendedAdvertisingConfig { 52 AdvertisingConfig advertising_config = 1; 53 bool connectable = 2; 54 bool scannable = 3; 55 bool directed = 4; 56 bool high_duty_directed_connectable = 5; 57 bool legacy_pdus = 6; 58 bool anonymous = 7; 59 bool include_tx_power = 8; 60 bool use_le_coded_phy = 9; 61 int32 secondary_map_skip = 10; 62 int32 secondary_advertising_phy = 11; 63 int32 sid = 12; 64 bool enable_scan_request_notification = 13; 65} 66 67message CreateAdvertiserRequest { 68 AdvertisingConfig config = 1; 69} 70 71message CreateAdvertiserResponse { 72 // -1 on error 73 int32 advertiser_id = 1; 74} 75 76message ExtendedCreateAdvertiserRequest { 77 ExtendedAdvertisingConfig config = 1; 78} 79 80message ExtendedCreateAdvertiserResponse { 81 int32 advertiser_id = 1; 82} 83 84message GetNumberOfAdvertisingInstancesResponse { 85 int32 num_advertising_instances = 1; 86} 87 88message RemoveAdvertiserRequest { 89 int32 advertiser_id = 1; 90}