package android.emulation.bluetooth

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

service EmulatedBluetoothService

emulated_bluetooth.proto:31

An Emulated Bluetooth Service exposes a method to register an emulated bluetooth device.

service GattDeviceService

emulated_bluetooth_device.proto:37

You can provide your own GattDevice by implementing this service and registering it with the android emulator. The device will appear as a real bluetooth device, and you will receive callbacks when the bluetooth system wants to read, write or observe a characteristic.

The advertisement definition, this will be used to advertise the bluetooth device to android emulator. Every device that is registered will be discoverable by the emulator.

Used in: GattDevice

enum Advertisement.ConnectionMode

emulated_bluetooth_device.proto:334

Used in: Advertisement

enum Advertisement.DiscoveryMode

emulated_bluetooth_device.proto:348

Used in: Advertisement

message CallbackIdentifier

emulated_bluetooth_device.proto:65

A callback identifier is used by the service to identify who should handle the any of the requests above. This is only relevant if you have a single endpoint that emulates multiple devices.

Used in: CharacteristicValueRequest, ConnectionStateChange, RegistrationStatus

message CharacteristicValueRequest

emulated_bluetooth_device.proto:143

Data exchanged to read/write bluetooth characteristics

Used as request type in: GattDeviceService.OnCharacteristicObserveRequest, GattDeviceService.OnCharacteristicReadRequest, GattDeviceService.OnCharacteristicWriteRequest

message CharacteristicValueResponse

emulated_bluetooth_device.proto:166

Data exchanged to read/write bluetooth characteristics

Used as response type in: GattDeviceService.OnCharacteristicObserveRequest, GattDeviceService.OnCharacteristicReadRequest, GattDeviceService.OnCharacteristicWriteRequest

enum CharacteristicValueResponse.GattStatus

emulated_bluetooth_device.proto:167

Used in: CharacteristicValueResponse

enum ConnectionStateChange.ConnectionState

emulated_bluetooth_device.proto:78

Used in: ConnectionStateChange

message DeviceIdentifier

emulated_bluetooth_device.proto:71

A Device Identifier is used to uniquely identify an emulated bluetooth device on the rootcanal mesh.

Used in: CharacteristicValueRequest, ConnectionStateChange

message GattCharacteristic

emulated_bluetooth_device.proto:183

The Characteristic Properties bit field determines how the Characteristic Value can be used, or how the characteristic descriptors can be accessed.

Used in: GattService

enum GattCharacteristic.Permissions

emulated_bluetooth_device.proto:235

An attribute has a set of permission values associated with it. The permissions associated with an attribute specifies that it may be read and/or written. The permissions associated with the attribute specifies the security level required for read and/or write access, as well as notification and/or indication. The permissions of a given attribute are defined by a higher layer specification, and are not discoverable using the Attribute protocol.

enum GattCharacteristic.Properties

emulated_bluetooth_device.proto:188

Properties Value Description.

message GattProfile

emulated_bluetooth_device.proto:321

A Gatt profile consists of a series of services that are offered to clients. Gatt profiles are well defined in the spec. You can find more information about the various profiles in the official specifications: https://www.bluetooth.com/specifications/specs/ A concrete example is the Heart Rate Monitor: https://www.bluetooth.com/specifications/specs/heart-rate-service-1-0/

Used in: GattDevice

message GattService

emulated_bluetooth_device.proto:293

A Gatt service definition.

Used in: GattProfile

enum GattService.ServiceType

emulated_bluetooth_device.proto:294

Used in: GattService

message Uuid

emulated_bluetooth_device.proto:127

A UUID is a universally unique identifier that is guaranteed to be unique across all space and all time. UUIDs can be independently created in a distributed fashion. No central registry of assigned UUIDs is required. A UUID is a 128-bit value. To reduce the burden of storing and transferring 128-bit UUID values, a range of UUID values has been pre-allocated for assignment to often-used, registered purposes. The first UUID in this pre-allocated range is known as the Bluetooth Base UUID and has the value 00000000-0000-1000-8000- 00805F9B34FB, from Assigned Numbers. UUID values in the pre-allocated range have aliases that are represented as 16-bit or 32-bit values. These aliases are often called 16-bit and 32-bit UUIDs, but each actually represents a 128-bit UUID value. The full 128-bit value of a 16-bit or 32-bit UUID may be computed by a simple arithmetic operation: 128_bit_value = 16_bit_value * 2^96 + Bluetooth_Base_UUID 128_bit_value = 32_bit_value * 2^96 + Bluetooth_Base_UUID A 16-bit UUID may be converted to 32-bit UUID format by zero-extending the 16-bit value to 32-bits. An equivalent method is to add the 16-bit UUID value to a zero-valued 32-bit UUID. Note: Two 16-bit UUIDs may be compared directly, as may two 32-bit UUIDs or two 128-bit UUIDs. If two UUIDs of differing sizes are to be compared, the shorter UUID must be converted to the longer UUID format before comparison.

Used in: CharacteristicValueRequest, GattCharacteristic, GattService