mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-11-24 12:25:20 +01:00
Create GATT proto messages
This commit is contained in:
parent
df4ceeda97
commit
c65011094e
@ -1138,7 +1138,7 @@ message SubscribeBluetoothLEAdvertisementsRequest {
|
|||||||
|
|
||||||
message BluetoothServiceData {
|
message BluetoothServiceData {
|
||||||
string uuid = 1;
|
string uuid = 1;
|
||||||
repeated uint32 data = 2 [packed=false];
|
repeated uint32 data = 2 [packed=true];
|
||||||
}
|
}
|
||||||
message BluetoothLEAdvertisementResponse {
|
message BluetoothLEAdvertisementResponse {
|
||||||
option (id) = 67;
|
option (id) = 67;
|
||||||
@ -1154,3 +1154,112 @@ message BluetoothLEAdvertisementResponse {
|
|||||||
repeated BluetoothServiceData service_data = 5;
|
repeated BluetoothServiceData service_data = 5;
|
||||||
repeated BluetoothServiceData manufacturer_data = 6;
|
repeated BluetoothServiceData manufacturer_data = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum BluetoothDeviceRequestType {
|
||||||
|
BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT = 0;
|
||||||
|
BLUETOOTH_DEVICE_REQUEST_TYPE_DISCONNECT = 1;
|
||||||
|
BLUETOOTH_DEVICE_REQUEST_TYPE_PAIR = 2;
|
||||||
|
BLUETOOTH_DEVICE_REQUEST_TYPE_UNPAIR = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BluetoothDeviceRequest {
|
||||||
|
option (id) = 70;
|
||||||
|
option (source) = SOURCE_CLIENT;
|
||||||
|
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
||||||
|
|
||||||
|
uint64 address = 1;
|
||||||
|
BluetoothDeviceRequestType request_type = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BluetoothDeviceConnectionResponse {
|
||||||
|
option (id) = 71;
|
||||||
|
option (source) = SOURCE_SERVER;
|
||||||
|
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
||||||
|
|
||||||
|
uint64 address = 1;
|
||||||
|
bool connected = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BluetoothGATTGetServicesRequest {
|
||||||
|
option (id) = 72;
|
||||||
|
option (source) = SOURCE_CLIENT;
|
||||||
|
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
||||||
|
|
||||||
|
uint64 address = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BluetoothGATTDescriptor {
|
||||||
|
string uuid = 1;
|
||||||
|
uint32 handle = 2;
|
||||||
|
string description = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BluetoothGATTCharacteristic {
|
||||||
|
string uuid = 1;
|
||||||
|
uint32 handle = 2;
|
||||||
|
uint32 properties = 3;
|
||||||
|
repeated BluetoothGATTDescriptor descriptors = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BluetoothGATTService {
|
||||||
|
string uuid = 1;
|
||||||
|
uint32 handle = 2;
|
||||||
|
repeated BluetoothGATTCharacteristic characteristics = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BluetoothGATTGetServicesResponse {
|
||||||
|
option (id) = 73;
|
||||||
|
option (source) = SOURCE_SERVER;
|
||||||
|
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
||||||
|
option (no_delay) = true;
|
||||||
|
|
||||||
|
uint64 address = 1;
|
||||||
|
repeated BluetoothGATTService services = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BluetoothGATTReadRequest {
|
||||||
|
option (id) = 74;
|
||||||
|
option (source) = SOURCE_CLIENT;
|
||||||
|
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
||||||
|
|
||||||
|
uint64 address = 1;
|
||||||
|
bool is_descriptor = 2;
|
||||||
|
|
||||||
|
string service_uuid = 3;
|
||||||
|
string characteristic_uuid = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BluetoothGATTReadResponse {
|
||||||
|
option (id) = 75;
|
||||||
|
option (source) = SOURCE_SERVER;
|
||||||
|
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
||||||
|
|
||||||
|
uint64 address = 1;
|
||||||
|
bool is_descriptor = 2;
|
||||||
|
string service_uuid = 3;
|
||||||
|
string characteristic_uuid = 4;
|
||||||
|
|
||||||
|
repeated uint32 data = 5 [packed=true];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message BluetoothGATTWriteRequest {
|
||||||
|
option (id) = 76;
|
||||||
|
option (source) = SOURCE_CLIENT;
|
||||||
|
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
||||||
|
|
||||||
|
uint64 address = 1;
|
||||||
|
bool is_descriptor = 2;
|
||||||
|
|
||||||
|
string service_uuid = 3;
|
||||||
|
string characteristic_uuid = 4;
|
||||||
|
|
||||||
|
repeated uint32 data = 5 [packed=true];
|
||||||
|
}
|
||||||
|
|
||||||
|
message BluetoothGATTWriteResponse {
|
||||||
|
option (id) = 77;
|
||||||
|
option (source) = SOURCE_SERVER;
|
||||||
|
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
||||||
|
|
||||||
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user