mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 15:58:43 +00:00
Merge changes from topic "bt-cs-hal-v2" into main am: d60f75431e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3324176 Change-Id: I73af17166e57d6749ebe760a193f0216ef993901 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -3,3 +3,4 @@
|
||||
include platform/packages/modules/Bluetooth:/OWNERS
|
||||
|
||||
chienyuanhuang@google.com
|
||||
steveliu@google.com
|
||||
|
||||
@@ -42,6 +42,6 @@ aidl_interface {
|
||||
imports: [],
|
||||
},
|
||||
],
|
||||
frozen: true,
|
||||
frozen: false,
|
||||
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ parcelable BluetoothChannelSoundingParameters {
|
||||
int aclHandle;
|
||||
int l2capCid;
|
||||
int realTimeProcedureDataAttHandle;
|
||||
/**
|
||||
* @deprecated use the role in Config.aidl
|
||||
*/
|
||||
android.hardware.bluetooth.ranging.Role role;
|
||||
boolean localSupportsSoundingPhaseBasedRanging;
|
||||
boolean remoteSupportsSoundingPhaseBaseRanging;
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@Backing(type="byte") @VintfStability
|
||||
enum Ch3cShapeType {
|
||||
HAT_SHAPE = 0x00,
|
||||
X_SHAPE = 0x01,
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@Backing(type="byte") @VintfStability
|
||||
enum ChannelSelectionType {
|
||||
ALOGRITHM_3B = 0x00,
|
||||
ALOGRITHM_3C = 0x01,
|
||||
}
|
||||
@@ -32,6 +32,9 @@
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
/**
|
||||
* @deprecated use ChannelSoundingProcedureData
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable ChannelSoudingRawData {
|
||||
int procedureCounter;
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@VintfStability
|
||||
parcelable ChannelSoundingProcedureData {
|
||||
int procedureCounter;
|
||||
int procedureSequence;
|
||||
byte initiatorSelectedTxPower = SELECTED_TX_POWER_UNAVAILABLE /* 127 */;
|
||||
byte reflectorSelectedTxPower = SELECTED_TX_POWER_UNAVAILABLE /* 127 */;
|
||||
android.hardware.bluetooth.ranging.SubeventResultData[] initiatorSubeventResultData;
|
||||
android.hardware.bluetooth.ranging.ProcedureAbortReason initiatorProcedureAbortReason;
|
||||
android.hardware.bluetooth.ranging.SubeventResultData[] reflectorSubeventResultData;
|
||||
android.hardware.bluetooth.ranging.ProcedureAbortReason reflectorProcedureAbortReason;
|
||||
const byte SELECTED_TX_POWER_UNAVAILABLE = 0x7Fu8;
|
||||
}
|
||||
@@ -32,6 +32,9 @@
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
/**
|
||||
* @deprecated use ChannelSoundingProcedureData
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable ChannelSoundingSingleSideData {
|
||||
@nullable android.hardware.bluetooth.ranging.StepTonePct[] stepTonePcts;
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
/**
|
||||
* @deprecated use PctIQSample instead for V2 and above.
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable ComplexNumber {
|
||||
double real;
|
||||
|
||||
@@ -38,4 +38,22 @@ parcelable Config {
|
||||
android.hardware.bluetooth.ranging.SubModeType subModeType;
|
||||
android.hardware.bluetooth.ranging.RttType rttType;
|
||||
byte[10] channelMap;
|
||||
int minMainModeSteps;
|
||||
int maxMainModeSteps;
|
||||
byte mainModeRepetition;
|
||||
byte mode0Steps;
|
||||
android.hardware.bluetooth.ranging.Role role;
|
||||
android.hardware.bluetooth.ranging.CsSyncPhyType csSyncPhyType;
|
||||
android.hardware.bluetooth.ranging.ChannelSelectionType channelSelectionType;
|
||||
android.hardware.bluetooth.ranging.Ch3cShapeType ch3cShapeType;
|
||||
byte ch3cJump;
|
||||
int channelMapRepetition;
|
||||
int tIp1TimeUs;
|
||||
int tIp2TimeUs;
|
||||
int tFcsTimeUs;
|
||||
byte tPmTimeUs;
|
||||
byte tSwTimeUsSupportedByLocal;
|
||||
byte tSwTimeUsSupportedByRemote;
|
||||
int bleConnInterval = BLE_CONN_INTERVAL_UNAVAILABLE /* 0 */;
|
||||
const int BLE_CONN_INTERVAL_UNAVAILABLE = 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@Backing(type="byte") @VintfStability
|
||||
enum CsSyncPhyType {
|
||||
NOT_VALID_PHY = 0x00,
|
||||
LE_1M_PHY = 0x01,
|
||||
LE_2M_PHY = 0x02,
|
||||
LE_2M_2BT_PHY = 0x03,
|
||||
}
|
||||
@@ -36,6 +36,10 @@ package android.hardware.bluetooth.ranging;
|
||||
interface IBluetoothChannelSounding {
|
||||
@nullable android.hardware.bluetooth.ranging.VendorSpecificData[] getVendorSpecificData();
|
||||
@nullable android.hardware.bluetooth.ranging.SessionType[] getSupportedSessionTypes();
|
||||
/**
|
||||
* @deprecated use getSupportedCsSecurityLevels() instead
|
||||
*/
|
||||
android.hardware.bluetooth.ranging.CsSecurityLevel getMaxSupportedCsSecurityLevel();
|
||||
@nullable android.hardware.bluetooth.ranging.IBluetoothChannelSoundingSession openSession(in android.hardware.bluetooth.ranging.BluetoothChannelSoundingParameters params, in android.hardware.bluetooth.ranging.IBluetoothChannelSoundingSessionCallback callback);
|
||||
android.hardware.bluetooth.ranging.CsSecurityLevel[] getSupportedCsSecurityLevels();
|
||||
}
|
||||
|
||||
@@ -39,4 +39,8 @@ interface IBluetoothChannelSoundingSession {
|
||||
boolean isAbortedProcedureRequired();
|
||||
void writeRawData(in android.hardware.bluetooth.ranging.ChannelSoudingRawData rawData);
|
||||
void close(android.hardware.bluetooth.ranging.Reason reason);
|
||||
void writeProcedureData(in android.hardware.bluetooth.ranging.ChannelSoundingProcedureData procedureData);
|
||||
void updateChannelSoundingConfig(in android.hardware.bluetooth.ranging.Config conifg);
|
||||
void updateProcedureEnableConfig(in android.hardware.bluetooth.ranging.ProcedureEnableConfig procedureEnableConfig);
|
||||
void updateBleConnInterval(in int bleConnInterval);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@VintfStability
|
||||
union ModeData {
|
||||
android.hardware.bluetooth.ranging.ModeZeroData modeZeroData;
|
||||
android.hardware.bluetooth.ranging.ModeOneData modeOneData;
|
||||
android.hardware.bluetooth.ranging.ModeTwoData modeTwoData;
|
||||
android.hardware.bluetooth.ranging.ModeThreeData modeThreeData;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@VintfStability
|
||||
parcelable ModeOneData {
|
||||
byte packetQuality;
|
||||
android.hardware.bluetooth.ranging.Nadm packetNadm;
|
||||
byte packetRssiDbm = PACKET_RSSI_UNAVAILABLE /* 127 */;
|
||||
android.hardware.bluetooth.ranging.RttToaTodData rttToaTodData;
|
||||
byte packetAntenna;
|
||||
@nullable android.hardware.bluetooth.ranging.PctIQSample packetPct1;
|
||||
@nullable android.hardware.bluetooth.ranging.PctIQSample packetPct2;
|
||||
const byte FLAG_CS_ACCESS_ADDR_SUCCESS = 0x0;
|
||||
const byte FLAG_CS_ACCESS_ADDR_ERRORS = 0x1;
|
||||
const byte FLAG_CS_ACCESS_ADDR_NOT_FOUND = 0x2;
|
||||
const byte FLAG_CS_ACCESS_ADDR_MASK = 0xF;
|
||||
const byte RANDOM_OR_SOUNDING_SEQUENCE_ERROR_COUNT_SHIFT = 4;
|
||||
const byte PACKET_RSSI_UNAVAILABLE = 0x7Fu8;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@VintfStability
|
||||
parcelable ModeThreeData {
|
||||
android.hardware.bluetooth.ranging.ModeOneData modeOneData;
|
||||
android.hardware.bluetooth.ranging.ModeTwoData modeTwoData;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@VintfStability
|
||||
parcelable ModeTwoData {
|
||||
byte antennaPermutationIndex;
|
||||
android.hardware.bluetooth.ranging.PctIQSample[] tonePctIQSamples;
|
||||
byte[] toneQualityIndicators;
|
||||
const int TONE_QUALITY_HIGH = 0x0;
|
||||
const int TONE_QUALITY_MEDIUM = 0x1;
|
||||
const int TONE_QUALITY_LOW = 0x2;
|
||||
const int TONE_QUALITY_UNAVAILABLE = 0x3;
|
||||
const int EXTENSION_SLOT_NONE = 0x0;
|
||||
const int EXTENSION_SLOT_TONE_NOT_EXPECTED_TO_BE_PRESENT = 0x1;
|
||||
const int EXTENSION_SLOT_TONE_EXPECTED_TO_BE_PRESENT = 0x2;
|
||||
const int EXTENSION_SLOT_SHIFT = 4;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@VintfStability
|
||||
parcelable ModeZeroData {
|
||||
byte packetQuality;
|
||||
byte packetRssiDbm = PACKET_RSSI_UNAVAILABLE /* 127 */;
|
||||
byte packetAntenna;
|
||||
int initiatorMeasuredFreqOffset = MEASURED_FREQ_OFFSET_UNAVAILABLE /* -16384 */;
|
||||
const byte FLAG_CS_ACCESS_ADDR_SUCCESS = 0x0;
|
||||
const byte FLAG_CS_ACCESS_ADDR_ERRORS = 0x1;
|
||||
const byte FLAG_CS_ACCESS_ADDR_NOT_FOUND = 0x2;
|
||||
const byte FLAG_CS_ACCESS_ADDR_MASK = 0xF;
|
||||
const byte RANDOM_OR_SOUNDING_SEQUENCE_ERROR_COUNT_SHIFT = 4;
|
||||
const byte PACKET_RSSI_UNAVAILABLE = 0x7Fu8;
|
||||
const int MEASURED_FREQ_OFFSET_UNAVAILABLE = 0xFFFFC000;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@VintfStability
|
||||
parcelable PctIQSample {
|
||||
int iSample = SAMPLE_UNAVAILABLE /* -1 */;
|
||||
int qSample = SAMPLE_UNAVAILABLE /* -1 */;
|
||||
const int SAMPLE_UNAVAILABLE = 0xFFFFFFFF;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@Backing(type="byte") @VintfStability
|
||||
enum ProcedureAbortReason {
|
||||
SUCCESS = 0x0,
|
||||
LOCAL_OR_REMOTE_REQUEST = 0x01,
|
||||
FILTERED_CHANNEL_MAP_LESS_THAN_15 = 0x02,
|
||||
CHANNEL_MAP_UPDATE_INSTANT_PASSED = 0x03,
|
||||
UNSPECIFIED = 0x0F,
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@VintfStability
|
||||
parcelable ProcedureEnableConfig {
|
||||
byte toneAntennaConfigSelection;
|
||||
int subeventLenUs;
|
||||
byte subeventsPerEvent;
|
||||
int subeventInterval;
|
||||
int eventInterval;
|
||||
int procedureInterval;
|
||||
int procedureCount;
|
||||
int maxProcedureLen;
|
||||
}
|
||||
@@ -45,4 +45,6 @@ parcelable RangingResult {
|
||||
android.hardware.bluetooth.ranging.Nadm detectedAttackLevel;
|
||||
double velocityMetersPerSecond;
|
||||
@nullable byte[] vendorSpecificCsRangingResultsData;
|
||||
android.hardware.bluetooth.ranging.RangingResultStatus rangingResultStatus;
|
||||
long timestampNanos;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@Backing(type="byte") @VintfStability
|
||||
enum RangingResultStatus {
|
||||
SUCCESS = 0x00,
|
||||
FAIL_INITIATOR_ABORT = 0x01,
|
||||
FAIL_REFLECTOR_ABORT = 0x02,
|
||||
FAIL_BOTH_ABORT = 0x03,
|
||||
FAIL_UNSPECIFIED = 0xFFu8,
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@VintfStability
|
||||
union RttToaTodData {
|
||||
int toaTodInitiator = TOA_TOD_UNAVAILABLE /* -32768 */;
|
||||
int todToaReflector = TOA_TOD_UNAVAILABLE /* -32768 */;
|
||||
const int TOA_TOD_UNAVAILABLE = 0xFFFF8000;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@VintfStability
|
||||
parcelable StepData {
|
||||
byte stepChannel;
|
||||
android.hardware.bluetooth.ranging.ModeType stepMode;
|
||||
android.hardware.bluetooth.ranging.ModeData stepModeData;
|
||||
}
|
||||
@@ -32,6 +32,9 @@
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
/**
|
||||
* @deprecated use ModeTwoData
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable StepTonePct {
|
||||
List<android.hardware.bluetooth.ranging.ComplexNumber> tonePcts;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@Backing(type="byte") @VintfStability
|
||||
enum SubeventAbortReason {
|
||||
SUCCESS = 0x0,
|
||||
LOCAL_OR_REMOTE_REQUEST = 0x01,
|
||||
NO_CS_SYNC_RECEIVED = 0x02,
|
||||
SCHEDULING_CONFLICTS_OR_LIMITED_RESOURCES = 0x03,
|
||||
UNSPECIFIED = 0x0F,
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
@VintfStability
|
||||
parcelable SubeventResultData {
|
||||
int startAclConnEventCounter;
|
||||
int frequencyCompensation = FREQ_COMPENSATION_UNAVAILABLE /* -16384 */;
|
||||
byte referencePowerLevelDbm;
|
||||
byte numAntennaPaths;
|
||||
android.hardware.bluetooth.ranging.SubeventAbortReason subeventAbortReason;
|
||||
android.hardware.bluetooth.ranging.StepData[] stepData;
|
||||
long timestampNanos;
|
||||
const int FREQ_COMPENSATION_UNAVAILABLE = 0xFFFFC000;
|
||||
}
|
||||
@@ -44,6 +44,7 @@ parcelable BluetoothChannelSoundingParameters {
|
||||
int realTimeProcedureDataAttHandle;
|
||||
/**
|
||||
* Role of the local device.
|
||||
* @deprecated use the role in Config.aidl
|
||||
*/
|
||||
Role role;
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
/**
|
||||
* The selected shape to be rendered when Channel Selection Algorithm #3c is used
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.42 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/core60-html/
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="byte")
|
||||
enum Ch3cShapeType {
|
||||
/**
|
||||
* Use Hat shape for user-specified channel sequence
|
||||
*/
|
||||
HAT_SHAPE = 0x00,
|
||||
/**
|
||||
* Use X shape for user-specified channel sequence
|
||||
*/
|
||||
X_SHAPE = 0x01,
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
/**
|
||||
* The channel selection algorithm for non-mode-0 steps
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.42 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/core60-html/
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="byte")
|
||||
enum ChannelSelectionType {
|
||||
/**
|
||||
* Use Channel Selection Algorithm #3b for non-mode-0 CS steps
|
||||
*/
|
||||
ALOGRITHM_3B = 0x00,
|
||||
/**
|
||||
* Use Channel Selection Algorithm #3c for non-mode-0 CS steps
|
||||
*/
|
||||
ALOGRITHM_3C = 0x01,
|
||||
}
|
||||
@@ -24,6 +24,7 @@ import android.hardware.bluetooth.ranging.ModeType;
|
||||
* See Channel Sounding CR_PR 3.1.10 and Channel Sounding HCI Updates CR_PR 3.1.23 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/channel-sounding-cr-pr/
|
||||
* @deprecated use ChannelSoundingProcedureData
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable ChannelSoudingRawData {
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
import android.hardware.bluetooth.ranging.ProcedureAbortReason;
|
||||
import android.hardware.bluetooth.ranging.SubeventResultData;
|
||||
|
||||
/**
|
||||
* The measured data for a whole procedure, it includes all local and remote related data.
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable ChannelSoundingProcedureData {
|
||||
/**
|
||||
* CS procedure count since completion of the Channel Sounding Security Start procedure
|
||||
*/
|
||||
int procedureCounter;
|
||||
/**
|
||||
* The procequre sequence since completion of the Channel Sounding Procecedure Enable procedure,
|
||||
* this is not defined by spec, BT
|
||||
*/
|
||||
int procedureSequence;
|
||||
const byte SELECTED_TX_POWER_UNAVAILABLE = 0x7Fu8;
|
||||
/**
|
||||
* Transmit power level used for CS procedure of initiator.
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.43
|
||||
* ** HCI_LE_CS_Procedure_Enable_Complete#selected_tx_power
|
||||
* See BLUETOOTH Ranging Service Version 1.0 3.2.1.2
|
||||
* ** Ranging Header#Selected TX power
|
||||
* Range: -127 to 20
|
||||
* Unit: dBm
|
||||
* value: 0x7F - Transmit power level is unavailable
|
||||
*/
|
||||
byte initiatorSelectedTxPower = SELECTED_TX_POWER_UNAVAILABLE;
|
||||
/**
|
||||
* Transmit power level used for CS procedure of reflector.
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.43
|
||||
* ** HCI_LE_CS_Procedure_Enable_Complete#selected_tx_power
|
||||
* See BLUETOOTH Ranging Service Version 1.0 3.2.1.2
|
||||
* ** Ranging Header#Selected TX power
|
||||
* Range: -127 to 20
|
||||
* Unit: dBm
|
||||
* value: 0x7F - Transmit power level is unavailable
|
||||
*/
|
||||
byte reflectorSelectedTxPower = SELECTED_TX_POWER_UNAVAILABLE;
|
||||
/**
|
||||
* The subevent result data of initiator
|
||||
*/
|
||||
SubeventResultData[] initiatorSubeventResultData;
|
||||
/**
|
||||
* Indicates the procedure abort reason of the initiator
|
||||
*/
|
||||
ProcedureAbortReason initiatorProcedureAbortReason;
|
||||
/**
|
||||
* The subevent result data of reflector
|
||||
*/
|
||||
SubeventResultData[] reflectorSubeventResultData;
|
||||
/**
|
||||
* Indicates the procedure abort reason of the initiator
|
||||
*/
|
||||
ProcedureAbortReason reflectorProcedureAbortReason;
|
||||
}
|
||||
@@ -25,6 +25,7 @@ import android.hardware.bluetooth.ranging.StepTonePct;
|
||||
* See Channel Sounding CR_PR 3.1.10 and Channel Sounding HCI Updates CR_PR 3.1.23 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/channel-sounding-cr-pr/
|
||||
* @deprecated use ChannelSoundingProcedureData
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable ChannelSoundingSingleSideData {
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
/**
|
||||
* @deprecated use PctIQSample instead for V2 and above.
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable ComplexNumber {
|
||||
double real;
|
||||
|
||||
@@ -16,10 +16,20 @@
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
import android.hardware.bluetooth.ranging.Ch3cShapeType;
|
||||
import android.hardware.bluetooth.ranging.ChannelSelectionType;
|
||||
import android.hardware.bluetooth.ranging.CsSyncPhyType;
|
||||
import android.hardware.bluetooth.ranging.ModeType;
|
||||
import android.hardware.bluetooth.ranging.Role;
|
||||
import android.hardware.bluetooth.ranging.RttType;
|
||||
import android.hardware.bluetooth.ranging.SubModeType;
|
||||
|
||||
/**
|
||||
* LE CS Config Complete data of Channel Sounding.
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.8.137 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/core60-html/
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable Config {
|
||||
/**
|
||||
@@ -42,4 +52,96 @@ parcelable Config {
|
||||
* Channel n is disabled for CS procedure = 0
|
||||
*/
|
||||
byte[10] channelMap;
|
||||
/**
|
||||
* Minimum number of CS main mode steps to be executed before a submode step is executed
|
||||
* Value: 0x02 to 0xFF
|
||||
*/
|
||||
int minMainModeSteps;
|
||||
/**
|
||||
* Maximum number of CS main mode steps to be executed before a submode step is executed
|
||||
* Value: 0x02 to 0xFF
|
||||
*/
|
||||
int maxMainModeSteps;
|
||||
/**
|
||||
* Number of main mode steps taken from the end of the last CS subevent to be repeated at
|
||||
* the beginning of the current CS subevent directly after the last mode-0 step of that event
|
||||
* Value: 0x00 to 0x03
|
||||
*/
|
||||
byte mainModeRepetition;
|
||||
/**
|
||||
* Number of CS mode-0 steps to be included at the beginning of each CS subevent
|
||||
* Value: 0x00 to 0x03
|
||||
*/
|
||||
byte mode0Steps;
|
||||
/**
|
||||
* The Channel Sounding role of the local device
|
||||
*/
|
||||
Role role;
|
||||
/**
|
||||
* Indicates the PHY to be used for CS_SYNC exchanges during the CS procedure
|
||||
*/
|
||||
CsSyncPhyType csSyncPhyType;
|
||||
/**
|
||||
* Indicates the Channel Selection Algorithm to be used during the CS procedure for non-mode-0
|
||||
* steps
|
||||
*/
|
||||
ChannelSelectionType channelSelectionType;
|
||||
/**
|
||||
* Indicates the selected shape
|
||||
*/
|
||||
Ch3cShapeType ch3cShapeType;
|
||||
/**
|
||||
* Number of channels skipped in each rising and falling sequence
|
||||
* Value: 0x02 to 0x08
|
||||
*/
|
||||
byte ch3cJump;
|
||||
/**
|
||||
* The number of times the map represented by the Channel_Map field is to be cycled through
|
||||
* for non-mode-0 steps within a CS procedure
|
||||
* Value: 0x01 to 0xFF
|
||||
*/
|
||||
int channelMapRepetition;
|
||||
/**
|
||||
* Interlude time in microseconds between the RTT packets
|
||||
* Value: 0x0A, 0x14, 0x1E, 0x28, 0x32, 0x3C, 0x50, or 0x91
|
||||
* unit: us
|
||||
*/
|
||||
int tIp1TimeUs;
|
||||
/**
|
||||
* Interlude time in microseconds between the CS tones
|
||||
* Value: 0x0A, 0x14, 0x1E, 0x28, 0x32, 0x3C, 0x50, or 0x91
|
||||
* unit: us
|
||||
*/
|
||||
int tIp2TimeUs;
|
||||
/**
|
||||
* Time in microseconds for frequency changes
|
||||
* Value: 0x0F, 0x14, 0x1E, 0x28, 0x32, 0x3C, 0x50, 0x64, 0x78, or 0x96
|
||||
* unit: us
|
||||
*/
|
||||
int tFcsTimeUs;
|
||||
/**
|
||||
* Time in microseconds for the phase measurement period of the CS tones
|
||||
* Value: 0x0A, 0x14, or 0x28
|
||||
* unit: us
|
||||
*/
|
||||
byte tPmTimeUs;
|
||||
/**
|
||||
* Time in microseconds for the antenna switch period of the CS tones supported by local device
|
||||
* Value: 0, 1, 2, 4, 10 us
|
||||
* see BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.8.130
|
||||
*/
|
||||
byte tSwTimeUsSupportedByLocal;
|
||||
/**
|
||||
* Time in microseconds for the antenna switch period of the CS tones supported by remote device
|
||||
* Value: 0, 1, 2, 4, 10 us
|
||||
* see BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.39
|
||||
*/
|
||||
byte tSwTimeUsSupportedByRemote;
|
||||
const int BLE_CONN_INTERVAL_UNAVAILABLE = 0;
|
||||
/**
|
||||
* BLE event connection interval, a multiple of 1.25 ms in the range 7.5 ms to 4.0 s
|
||||
* see BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 6, Part B 4.5.1
|
||||
* Unit: 1.25ms
|
||||
*/
|
||||
int bleConnInterval = BLE_CONN_INTERVAL_UNAVAILABLE;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
/**
|
||||
* The PHY to be used for CS_SYNC exchanges during the CS procedure
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.42 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/core60-html/
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="byte")
|
||||
enum CsSyncPhyType {
|
||||
NOT_VALID_PHY = 0x00,
|
||||
LE_1M_PHY = 0x01,
|
||||
LE_2M_PHY = 0x02,
|
||||
LE_2M_2BT_PHY = 0x03,
|
||||
}
|
||||
@@ -52,6 +52,7 @@ interface IBluetoothChannelSounding {
|
||||
*
|
||||
* @return CsSecurityLevel that indicates max supported security level of CS for ranging
|
||||
* algorithms.
|
||||
* @deprecated use getSupportedCsSecurityLevels() instead
|
||||
*/
|
||||
CsSecurityLevel getMaxSupportedCsSecurityLevel();
|
||||
|
||||
@@ -63,4 +64,13 @@ interface IBluetoothChannelSounding {
|
||||
@nullable IBluetoothChannelSoundingSession openSession(
|
||||
in BluetoothChannelSoundingParameters params,
|
||||
in IBluetoothChannelSoundingSessionCallback callback);
|
||||
|
||||
/**
|
||||
* API to get all supported security level (0 to 4) of CS for ranging algorithms.
|
||||
*
|
||||
* See: BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 3, Part C 10.11.1
|
||||
*
|
||||
* @return All supported security level of CS for ranging algorithms.
|
||||
*/
|
||||
CsSecurityLevel[] getSupportedCsSecurityLevels();
|
||||
}
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
import android.hardware.bluetooth.ranging.ChannelSoudingRawData;
|
||||
import android.hardware.bluetooth.ranging.ChannelSoundingProcedureData;
|
||||
import android.hardware.bluetooth.ranging.Config;
|
||||
import android.hardware.bluetooth.ranging.ProcedureEnableConfig;
|
||||
import android.hardware.bluetooth.ranging.Reason;
|
||||
import android.hardware.bluetooth.ranging.ResultType;
|
||||
import android.hardware.bluetooth.ranging.VendorSpecificData;
|
||||
@@ -63,4 +66,28 @@ interface IBluetoothChannelSoundingSession {
|
||||
* Close the current session. Object is no longer useful after this method.
|
||||
*/
|
||||
void close(Reason reason);
|
||||
|
||||
/**
|
||||
* API to provide raw ranging procedure data to the HAL. The HAL converts this data into
|
||||
* meaningful ranging results using a proprietary algorithm and then calls back to the
|
||||
* Bluetooth stack via BluetoothChannelSoundingSessionCallback.onResult().
|
||||
*/
|
||||
void writeProcedureData(in ChannelSoundingProcedureData procedureData);
|
||||
|
||||
/**
|
||||
* API to provide the latest CS config to the HAL.
|
||||
*/
|
||||
void updateChannelSoundingConfig(in Config conifg);
|
||||
|
||||
/**
|
||||
* API to provide the latest CS procedure enable complete information.
|
||||
*/
|
||||
void updateProcedureEnableConfig(in ProcedureEnableConfig procedureEnableConfig);
|
||||
|
||||
/**
|
||||
* API to provide the latest BLE event connection interval.
|
||||
* BLE event connection interval, a multiple of 1.25 ms in the range 7.5 ms to 4.0 s
|
||||
* see BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 6, Part B 4.5.1
|
||||
*/
|
||||
void updateBleConnInterval(in int bleConnInterval);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
import android.hardware.bluetooth.ranging.ModeOneData;
|
||||
import android.hardware.bluetooth.ranging.ModeThreeData;
|
||||
import android.hardware.bluetooth.ranging.ModeTwoData;
|
||||
import android.hardware.bluetooth.ranging.ModeZeroData;
|
||||
|
||||
/**
|
||||
* Mode specific data for a CS step of Channel Sounding.
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/core60-html/
|
||||
*/
|
||||
@VintfStability
|
||||
union ModeData {
|
||||
ModeZeroData modeZeroData;
|
||||
ModeOneData modeOneData;
|
||||
ModeTwoData modeTwoData;
|
||||
ModeThreeData modeThreeData;
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
import android.hardware.bluetooth.ranging.Nadm;
|
||||
import android.hardware.bluetooth.ranging.PctIQSample;
|
||||
import android.hardware.bluetooth.ranging.RttToaTodData;
|
||||
|
||||
/**
|
||||
* Mode 1 data for a CS step of Channel Sounding.
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/core60-html/
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable ModeOneData {
|
||||
const byte FLAG_CS_ACCESS_ADDR_SUCCESS = 0x0;
|
||||
const byte FLAG_CS_ACCESS_ADDR_ERRORS = 0x1;
|
||||
const byte FLAG_CS_ACCESS_ADDR_NOT_FOUND = 0x2;
|
||||
const byte FLAG_CS_ACCESS_ADDR_MASK = 0xF; // bit 3 is reserved
|
||||
const byte RANDOM_OR_SOUNDING_SEQUENCE_ERROR_COUNT_SHIFT = 4;
|
||||
/**
|
||||
* bits 0 to 3:
|
||||
* ** 0x0 = CS Access Address check is successful, and all bits match the expected sequence
|
||||
* ** 0x1 = CS Access Address check contains one or more bit errors
|
||||
* ** 0x2 = CS Access Address not found
|
||||
* bits 4 to 7: Number of bit errors being reported on the payload with a random or sounding
|
||||
* sequence. Value 0 may indicate zero bit errors or no report available.
|
||||
* Value 15 may indicate 15 or more bit errors.
|
||||
*/
|
||||
byte packetQuality;
|
||||
/**
|
||||
* Normalized Attack Detector Metric.
|
||||
*/
|
||||
Nadm packetNadm;
|
||||
const byte PACKET_RSSI_UNAVAILABLE = 0x7Fu8;
|
||||
/**
|
||||
* Range: -127 to +20
|
||||
* Unit: dBm
|
||||
* Value: 0x7F - RSSI is not available
|
||||
*/
|
||||
byte packetRssiDbm = PACKET_RSSI_UNAVAILABLE;
|
||||
/**
|
||||
* Time difference of the time of arrival and the time of depature of the CS packets.
|
||||
* see RttToaTodData for details.
|
||||
*/
|
||||
RttToaTodData rttToaTodData;
|
||||
/**
|
||||
* Antenna identifier used for the RTT packet
|
||||
* Value: 0x01 to 0x04
|
||||
*/
|
||||
byte packetAntenna;
|
||||
/**
|
||||
* Phase Correction Term 1 of the sounding sequence.
|
||||
*/
|
||||
@nullable PctIQSample packetPct1;
|
||||
/**
|
||||
* Phase Correction Term 2 of the sounding sequence.
|
||||
*/
|
||||
@nullable PctIQSample packetPct2;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
import android.hardware.bluetooth.ranging.ModeOneData;
|
||||
import android.hardware.bluetooth.ranging.ModeTwoData;
|
||||
|
||||
/**
|
||||
* Mode 3 data for a CS step of Channel Sounding.
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/core60-html/
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable ModeThreeData {
|
||||
ModeOneData modeOneData;
|
||||
ModeTwoData modeTwoData;
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
import android.hardware.bluetooth.ranging.PctIQSample;
|
||||
|
||||
/**
|
||||
* Mode 2 data for a CS step of Channel Sounding.
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/core60-html/
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable ModeTwoData {
|
||||
/**
|
||||
* Antenna Permutation Index for the chosen Num_Antenna_Paths parameter used during the
|
||||
* phase measurement stage of the CS step
|
||||
*/
|
||||
byte antennaPermutationIndex;
|
||||
/**
|
||||
* The I and Q sample of Phase Correction Term for (Num_Antenna_Paths + 1) CS tone
|
||||
* The order is the same as the BT core defined
|
||||
*/
|
||||
PctIQSample[] tonePctIQSamples;
|
||||
|
||||
const int TONE_QUALITY_HIGH = 0x0;
|
||||
const int TONE_QUALITY_MEDIUM = 0x1;
|
||||
const int TONE_QUALITY_LOW = 0x2;
|
||||
const int TONE_QUALITY_UNAVAILABLE = 0x3;
|
||||
const int EXTENSION_SLOT_NONE = 0x0;
|
||||
const int EXTENSION_SLOT_TONE_NOT_EXPECTED_TO_BE_PRESENT = 0x1;
|
||||
const int EXTENSION_SLOT_TONE_EXPECTED_TO_BE_PRESENT = 0x2;
|
||||
/**
|
||||
* Shift amount for extension slot (bits 4 to 7).
|
||||
*/
|
||||
const int EXTENSION_SLOT_SHIFT = 4;
|
||||
/**
|
||||
* Tone quality indicator for (Num_Antenna_Paths + 1) CS tone
|
||||
* bits 0 to 3:
|
||||
* ** 0x0 = Tone quality is high
|
||||
* ** 0x1 = Tone quality is medium
|
||||
* ** 0x2 = Tone quality is low
|
||||
* ** 0x3 = Tone quality is unavailable
|
||||
* bits 4 to 7:
|
||||
* ** 0x0 = Not tone extension slot
|
||||
* ** 0x1 = Tone extension slot; tone not expected to be present
|
||||
* ** 0x2 = Tone extension slot; tone expected to be present
|
||||
*/
|
||||
byte[] toneQualityIndicators;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
/**
|
||||
* Mode 0 data for a CS step of Channel Sounding.
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/core60-html/
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable ModeZeroData {
|
||||
const byte FLAG_CS_ACCESS_ADDR_SUCCESS = 0x0;
|
||||
const byte FLAG_CS_ACCESS_ADDR_ERRORS = 0x1;
|
||||
const byte FLAG_CS_ACCESS_ADDR_NOT_FOUND = 0x2;
|
||||
const byte FLAG_CS_ACCESS_ADDR_MASK = 0xF; // bit 3 is reserved
|
||||
const byte RANDOM_OR_SOUNDING_SEQUENCE_ERROR_COUNT_SHIFT = 4;
|
||||
/**
|
||||
* bits 0 to 3:
|
||||
* ** 0x0 = CS Access Address check is successful, and all bits match the expected sequence
|
||||
* ** 0x1 = CS Access Address check contains one or more bit errors
|
||||
* ** 0x2 = CS Access Address not found
|
||||
* bits 4 to 7: Number of bit errors being reported on the payload with a random or sounding
|
||||
* sequence. Value 0 may indicate zero bit errors or no report available.
|
||||
* Value 15 may indicate 15 or more bit errors.
|
||||
*/
|
||||
byte packetQuality;
|
||||
const byte PACKET_RSSI_UNAVAILABLE = 0x7Fu8;
|
||||
/**
|
||||
* Range: -127 to +20
|
||||
* Unit: dBm
|
||||
* Value: 0x7F - RSSI is not available
|
||||
*/
|
||||
byte packetRssiDbm = PACKET_RSSI_UNAVAILABLE;
|
||||
/**
|
||||
* Antenna identifier used for the RTT packet
|
||||
* Value: 0x01 to 0x04
|
||||
*/
|
||||
byte packetAntenna;
|
||||
const int MEASURED_FREQ_OFFSET_UNAVAILABLE = 0xFFFFC000;
|
||||
/**
|
||||
* Measured frequency offset in units of 0.01 ppm (15-bit signed integer, it had been converted
|
||||
* as int here.) for initiator, this should be ignored for relector.
|
||||
* Range: -100 ppm (0x58F0) to +100 ppm (0x2710)
|
||||
* Unit: 0.01 ppm
|
||||
* Value: 0xFFFFC000 - Frequency offset is not available
|
||||
*/
|
||||
int initiatorMeasuredFreqOffset = MEASURED_FREQ_OFFSET_UNAVAILABLE;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
/**
|
||||
* I and Q sample data of PCT.
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/core60-html/
|
||||
*
|
||||
* BT core defines the I and Q sample as following, they were converted to 2 integers here.
|
||||
* ** bits 0 to 11 are the I sample with type sint12
|
||||
* ** bits 12 to 23 are the Q sample with type sint12
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable PctIQSample {
|
||||
const int SAMPLE_UNAVAILABLE = 0xFFFFFFFF;
|
||||
|
||||
int iSample = SAMPLE_UNAVAILABLE;
|
||||
int qSample = SAMPLE_UNAVAILABLE;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
/**
|
||||
* Procedure abort reason of Channel Sounding.
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.42 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/core60-html/
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="byte")
|
||||
enum ProcedureAbortReason {
|
||||
SUCCESS = 0x0,
|
||||
LOCAL_OR_REMOTE_REQUEST = 0x01,
|
||||
FILTERED_CHANNEL_MAP_LESS_THAN_15 = 0x02,
|
||||
CHANNEL_MAP_UPDATE_INSTANT_PASSED = 0x03,
|
||||
UNSPECIFIED = 0x0F,
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
/**
|
||||
* LE CS Procedure Enable Complete data
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.43 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/core60-html/
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable ProcedureEnableConfig {
|
||||
/**
|
||||
* Antenna Configuration Index as described in [Vol 6] Part A, Section 5.3
|
||||
* Value: 0x00 to 0x07
|
||||
*/
|
||||
byte toneAntennaConfigSelection;
|
||||
/**
|
||||
* Duration for each CS subevent in microseconds
|
||||
* Value: 1250 μs to 4 s
|
||||
*/
|
||||
int subeventLenUs;
|
||||
/**
|
||||
* Number of CS subevents anchored off the same ACL connection event
|
||||
* Value: 0x01 to 0x20
|
||||
*/
|
||||
byte subeventsPerEvent;
|
||||
/**
|
||||
* Time between consecutive CS subevents anchored off the same ACL connection event.
|
||||
* Unit: 0.625 ms
|
||||
*/
|
||||
int subeventInterval;
|
||||
/**
|
||||
* Number of ACL connection events between consecutive CS event anchor points
|
||||
*/
|
||||
int eventInterval;
|
||||
/**
|
||||
* Number of ACL connection events between consecutive CS procedure anchor points
|
||||
*/
|
||||
int procedureInterval;
|
||||
/**
|
||||
* Number of CS procedures to be scheduled.
|
||||
* Value: 0x0000 to 0xFFFF
|
||||
* Value 0: CS procedures to continue until disabled
|
||||
*/
|
||||
int procedureCount;
|
||||
/**
|
||||
* Maximum duration for each CS procedure
|
||||
* Range: 0x0001 to 0xFFFF
|
||||
* unit: 0.625 ms
|
||||
* Time range: 0.625 ms to 40.959375 s
|
||||
*/
|
||||
int maxProcedureLen;
|
||||
}
|
||||
@@ -17,6 +17,7 @@
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
import android.hardware.bluetooth.ranging.Nadm;
|
||||
import android.hardware.bluetooth.ranging.RangingResultStatus;
|
||||
|
||||
/**
|
||||
* Generic structure to return the ranging result
|
||||
@@ -90,4 +91,13 @@ parcelable RangingResult {
|
||||
* Parameter for vendors to place vendor-specific ranging results data.
|
||||
*/
|
||||
@nullable byte[] vendorSpecificCsRangingResultsData;
|
||||
/**
|
||||
* If the result is valid, for e.g. the result was gotten from an aborted procedure.
|
||||
*/
|
||||
RangingResultStatus rangingResultStatus;
|
||||
/**
|
||||
* The timestamp of the first subevent with the measured procedure.
|
||||
* see SubeventResultData#timestampNanos
|
||||
*/
|
||||
long timestampNanos;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
@VintfStability
|
||||
@Backing(type="byte")
|
||||
enum RangingResultStatus {
|
||||
SUCCESS = 0x00,
|
||||
/**
|
||||
* The procedure of the initiator was aborted
|
||||
*/
|
||||
FAIL_INITIATOR_ABORT = 0x01,
|
||||
/**
|
||||
* The procedure of the reflector was aborted
|
||||
*/
|
||||
FAIL_REFLECTOR_ABORT = 0x02,
|
||||
/**
|
||||
* The procedure of both the initiator and the reflector were aborted
|
||||
*/
|
||||
FAIL_BOTH_ABORT = 0x03,
|
||||
FAIL_UNSPECIFIED = 0xFFu8,
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
/**
|
||||
* The ToA/ToD data for the initator or reflector.
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/core60-html/
|
||||
*/
|
||||
@VintfStability
|
||||
union RttToaTodData {
|
||||
const int TOA_TOD_UNAVAILABLE = 0xFFFF8000;
|
||||
/**
|
||||
* Time difference in units of 0.5 nanoseconds between the time of arrival and
|
||||
* the time of departure of the CS packets at the initiator during a CS step
|
||||
* (16-bit signed integer, it had been converted to 'int' here), where the known
|
||||
* nominal offsets are excluded.
|
||||
* value: 0xFFFF8000 (0x8000 as signed 16-bit) - Time difference is not available
|
||||
*/
|
||||
int toaTodInitiator = TOA_TOD_UNAVAILABLE;
|
||||
/**
|
||||
* Time difference in units of 0.5 nanoseconds between the time of departure
|
||||
* and the time of arrival of the CS packets at the reflector during a CS step
|
||||
* (16-bit signed integer, it had been converted to 'int' here), where the known
|
||||
* nominal offsets are excluded.
|
||||
* value: 0xFFFF8000 (0x8000 as signed 16-bit) - Time difference is not available
|
||||
*/
|
||||
int todToaReflector = TOA_TOD_UNAVAILABLE;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
import android.hardware.bluetooth.ranging.ModeData;
|
||||
import android.hardware.bluetooth.ranging.ModeType;
|
||||
|
||||
/**
|
||||
* The data for a CS step of Channel Sounding.
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/core60-html/
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable StepData {
|
||||
/**
|
||||
* CS channel index
|
||||
* Value: 0x00 to 0x4E
|
||||
*/
|
||||
byte stepChannel;
|
||||
ModeType stepMode;
|
||||
ModeData stepModeData;
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import android.hardware.bluetooth.ranging.ComplexNumber;
|
||||
|
||||
/**
|
||||
* Tone PCT data with quality indicator from a mode-2 or mode-3 step.
|
||||
* @deprecated use ModeTwoData
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable StepTonePct {
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
/**
|
||||
* The subevent abort reason of Channel Sounding.
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.42 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/core60-html/
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="byte")
|
||||
enum SubeventAbortReason {
|
||||
SUCCESS = 0x0,
|
||||
LOCAL_OR_REMOTE_REQUEST = 0x01,
|
||||
NO_CS_SYNC_RECEIVED = 0x02,
|
||||
SCHEDULING_CONFLICTS_OR_LIMITED_RESOURCES = 0x03,
|
||||
UNSPECIFIED = 0x0F,
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.bluetooth.ranging;
|
||||
|
||||
import android.hardware.bluetooth.ranging.StepData;
|
||||
import android.hardware.bluetooth.ranging.SubeventAbortReason;
|
||||
|
||||
/**
|
||||
* The subevent data within a CS procedure of Channel Sounding.
|
||||
* See BLUETOOTH CORE SPECIFICATION Version 6.0 | Vol 4, Part E 7.7.65.44 for details.
|
||||
*
|
||||
* Specification: https://www.bluetooth.com/specifications/specs/core60-html/
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable SubeventResultData {
|
||||
/**
|
||||
* Starting ACL connection event counter for the results reported in the event
|
||||
*/
|
||||
int startAclConnEventCounter;
|
||||
const int FREQ_COMPENSATION_UNAVAILABLE = 0xFFFFC000;
|
||||
/**
|
||||
* Frequency compensation value in units of 0.01 ppm (15-bit signed integer, it had been
|
||||
* converted as int here.)
|
||||
* Unit: 0.01 ppm
|
||||
* 0xFFFFC000 - Frequency compensation value is not available, or the role is not initiator
|
||||
*/
|
||||
int frequencyCompensation = FREQ_COMPENSATION_UNAVAILABLE;
|
||||
/**
|
||||
* Reference power level
|
||||
* Range: -127 to 20
|
||||
* Unit: dBm
|
||||
*/
|
||||
byte referencePowerLevelDbm;
|
||||
/**
|
||||
* 0x00 Ignored because phase measurement does not occur during the CS step
|
||||
* 0x01 to 0x04 Number of antenna paths used during the phase measurement stage of the CS step
|
||||
*/
|
||||
byte numAntennaPaths;
|
||||
/**
|
||||
* Indicates the abort reason
|
||||
*/
|
||||
SubeventAbortReason subeventAbortReason;
|
||||
/**
|
||||
* The measured data for all steps
|
||||
*/
|
||||
StepData[] stepData;
|
||||
/**
|
||||
* Timestamp when all subevent data are received by the host; Not defined by the spec.
|
||||
* Using epoch time in nano seconds (e.g., 1697673127175).
|
||||
*/
|
||||
long timestampNanos;
|
||||
}
|
||||
@@ -14,7 +14,7 @@ cc_binary {
|
||||
"service.cpp",
|
||||
],
|
||||
shared_libs: [
|
||||
"android.hardware.bluetooth.ranging-V1-ndk",
|
||||
"android.hardware.bluetooth.ranging-V2-ndk",
|
||||
"libbase",
|
||||
"libbinder_ndk",
|
||||
"libhidlbase",
|
||||
|
||||
@@ -55,4 +55,11 @@ ndk::ScopedAStatus BluetoothChannelSounding::openSession(
|
||||
*_aidl_return = session;
|
||||
return ::ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus BluetoothChannelSounding::getSupportedCsSecurityLevels(
|
||||
std::vector<CsSecurityLevel>* _aidl_return) {
|
||||
std::vector<CsSecurityLevel> supported_security_levels = {};
|
||||
*_aidl_return = supported_security_levels;
|
||||
return ::ndk::ScopedAStatus::ok();
|
||||
}
|
||||
} // namespace aidl::android::hardware::bluetooth::ranging::impl
|
||||
|
||||
@@ -47,6 +47,8 @@ class BluetoothChannelSounding : public BnBluetoothChannelSounding {
|
||||
const std::shared_ptr<IBluetoothChannelSoundingSessionCallback>&
|
||||
in_callback,
|
||||
std::shared_ptr<IBluetoothChannelSoundingSession>* _aidl_return) override;
|
||||
ndk::ScopedAStatus getSupportedCsSecurityLevels(
|
||||
std::vector<CsSecurityLevel>* _aidl_return) override;
|
||||
};
|
||||
|
||||
} // namespace aidl::android::hardware::bluetooth::ranging::impl
|
||||
|
||||
@@ -52,4 +52,20 @@ ndk::ScopedAStatus BluetoothChannelSoundingSession::close(Reason in_reason) {
|
||||
callback_->onClose(in_reason);
|
||||
return ::ndk::ScopedAStatus::ok();
|
||||
}
|
||||
ndk::ScopedAStatus BluetoothChannelSoundingSession::writeProcedureData(
|
||||
const ChannelSoundingProcedureData& /*in_procedureData*/) {
|
||||
return ::ndk::ScopedAStatus::ok();
|
||||
}
|
||||
ndk::ScopedAStatus BluetoothChannelSoundingSession::updateChannelSoundingConfig(
|
||||
const Config& /*in_config*/) {
|
||||
return ::ndk::ScopedAStatus::ok();
|
||||
}
|
||||
ndk::ScopedAStatus BluetoothChannelSoundingSession::updateProcedureEnableConfig(
|
||||
const ProcedureEnableConfig& /*in_procedureEnableConfig*/) {
|
||||
return ::ndk::ScopedAStatus::ok();
|
||||
}
|
||||
ndk::ScopedAStatus BluetoothChannelSoundingSession::updateBleConnInterval(
|
||||
int /*in_bleConnInterval*/) {
|
||||
return ::ndk::ScopedAStatus::ok();
|
||||
}
|
||||
} // namespace aidl::android::hardware::bluetooth::ranging::impl
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
namespace aidl::android::hardware::bluetooth::ranging::impl {
|
||||
|
||||
using ::aidl::android::hardware::bluetooth::ranging::ChannelSoudingRawData;
|
||||
using ::aidl::android::hardware::bluetooth::ranging::
|
||||
ChannelSoundingProcedureData;
|
||||
using ::aidl::android::hardware::bluetooth::ranging::Config;
|
||||
using ::aidl::android::hardware::bluetooth::ranging::ProcedureEnableConfig;
|
||||
using ::aidl::android::hardware::bluetooth::ranging::Reason;
|
||||
using ::aidl::android::hardware::bluetooth::ranging::ResultType;
|
||||
using ::aidl::android::hardware::bluetooth::ranging::VendorSpecificData;
|
||||
@@ -42,6 +46,13 @@ class BluetoothChannelSoundingSession
|
||||
ndk::ScopedAStatus writeRawData(
|
||||
const ChannelSoudingRawData& in_rawData) override;
|
||||
ndk::ScopedAStatus close(Reason in_reason) override;
|
||||
ndk::ScopedAStatus writeProcedureData(
|
||||
const ChannelSoundingProcedureData& in_procedureData) override;
|
||||
ndk::ScopedAStatus updateChannelSoundingConfig(
|
||||
const Config& in_config) override;
|
||||
ndk::ScopedAStatus updateProcedureEnableConfig(
|
||||
const ProcedureEnableConfig& in_procedureEnableConfig) override;
|
||||
ndk::ScopedAStatus updateBleConnInterval(int in_bleConnInterval) override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<IBluetoothChannelSoundingSessionCallback> callback_;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<manifest version="1.0" type="device">
|
||||
<hal format="aidl">
|
||||
<name>android.hardware.bluetooth.ranging</name>
|
||||
<version>1</version>
|
||||
<version>2</version>
|
||||
<fqname>IBluetoothChannelSounding/default</fqname>
|
||||
</hal>
|
||||
</manifest>
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
</hal>
|
||||
<hal format="aidl">
|
||||
<name>android.hardware.bluetooth.ranging</name>
|
||||
<version>1</version>
|
||||
<version>1-2</version>
|
||||
<interface>
|
||||
<name>IBluetoothChannelSounding</name>
|
||||
<instance>default</instance>
|
||||
|
||||
Reference in New Issue
Block a user