• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto3";
2
3package bluetooth.neighbor;
4
5import "google/protobuf/empty.proto";
6
7service NeighborFacade {
8  rpc SetConnectability(EnableMsg) returns (google.protobuf.Empty) {}
9  rpc SetDiscoverability(DiscoverabilitiyMsg) returns (google.protobuf.Empty) {}
10  rpc SetInquiryMode(InquiryMsg) returns (stream InquiryResultMsg) {}
11  rpc ReadRemoteName(RemoteNameRequestMsg) returns (google.protobuf.Empty) {}
12  rpc GetRemoteNameEvents(google.protobuf.Empty) returns (stream RemoteNameResponseMsg) {}
13  rpc EnableInquiryScan(EnableMsg) returns (google.protobuf.Empty) {}
14  rpc EnablePageScan(EnableMsg) returns (google.protobuf.Empty) {}
15}
16
17message EnableMsg {
18  bool enabled = 1;
19}
20
21enum DiscoverabilityMode {
22  OFF = 0;
23  LIMITED = 1;
24  GENERAL = 2;
25}
26
27message DiscoverabilitiyMsg {
28  DiscoverabilityMode mode = 1;
29}
30
31enum ResultMode {
32  STANDARD = 0;
33  RSSI = 1;
34  EXTENDED = 2;
35}
36
37message InquiryMsg {
38  DiscoverabilityMode inquiry_mode = 1;
39  ResultMode result_mode = 2;
40  uint32 length_1_28s = 3;
41  uint32 max_results = 4;  // 0 is unlimited
42}
43
44message InquiryResultMsg {
45  bytes packet = 1;
46}
47
48message RemoteNameRequestMsg {
49  bytes address = 1;
50  uint32 page_scan_repetition_mode = 2;  // r0, r1, r2
51  uint32 clock_offset = 3;
52}
53
54message RemoteNameResponseMsg {
55  uint32 status = 1;
56  bytes address = 2;
57  bytes name = 3;
58}
59