diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSoundingSingleSideData.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSoundingSingleSideData.aidl index ddaba720f7..172ac5e9e8 100644 --- a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSoundingSingleSideData.aidl +++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ChannelSoundingSingleSideData.aidl @@ -34,13 +34,13 @@ package android.hardware.bluetooth.ranging; @VintfStability parcelable ChannelSoundingSingleSideData { - @nullable List stepTonePcts; + @nullable android.hardware.bluetooth.ranging.StepTonePct[] stepTonePcts; @nullable byte[] packetQuality; @nullable byte[] packetRssiDbm; @nullable android.hardware.bluetooth.ranging.Nadm[] packetNadm; @nullable int[] measuredFreqOffset; - @nullable List packetPct1; - @nullable List packetPct2; + @nullable android.hardware.bluetooth.ranging.ComplexNumber[] packetPct1; + @nullable android.hardware.bluetooth.ranging.ComplexNumber[] packetPct2; byte referencePowerDbm; @nullable byte[] vendorSpecificCsSingleSidedata; } diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeType.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeType.aidl index 75cdabca07..1e8ae91037 100644 --- a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeType.aidl +++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/ModeType.aidl @@ -32,7 +32,7 @@ // later when a module using the interface is updated, e.g., Mainline modules. package android.hardware.bluetooth.ranging; -@Backing(type="int") @VintfStability +@Backing(type="byte") @VintfStability enum ModeType { ZERO = 0x00, ONE = 0x01, diff --git a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/SubModeType.aidl b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/SubModeType.aidl index f660c91741..b72a97d090 100644 --- a/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/SubModeType.aidl +++ b/bluetooth/ranging/aidl/aidl_api/android.hardware.bluetooth.ranging/current/android/hardware/bluetooth/ranging/SubModeType.aidl @@ -32,10 +32,10 @@ // later when a module using the interface is updated, e.g., Mainline modules. package android.hardware.bluetooth.ranging; -@Backing(type="int") @VintfStability +@Backing(type="byte") @VintfStability enum SubModeType { ONE = 0x01, TWO = 0x02, THREE = 0x03, - UNUSED = 0xff, + UNUSED = 0xffu8, } diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/AddressType.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/AddressType.aidl index bd032135ef..499d42f98e 100644 --- a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/AddressType.aidl +++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/AddressType.aidl @@ -16,9 +16,13 @@ package android.hardware.bluetooth.ranging; +/** + * Same as the BLE address type, except anonymous isn't supported for ranging. + */ @VintfStability @Backing(type="int") enum AddressType { PUBLIC = 0x00, + /* Still may be fixed on the device and is not randomized on boot */ RANDOM = 0x01, } diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoudingRawData.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoudingRawData.aidl index 0106865b97..78ce4f4925 100644 --- a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoudingRawData.aidl +++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoudingRawData.aidl @@ -21,6 +21,9 @@ import android.hardware.bluetooth.ranging.ModeType; /** * Raw ranging data of Channel Sounding. + * 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/ */ @VintfStability parcelable ChannelSoudingRawData { diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoundingSingleSideData.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoundingSingleSideData.aidl index 942fc0d35e..9c4b47250b 100644 --- a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoundingSingleSideData.aidl +++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ChannelSoundingSingleSideData.aidl @@ -21,14 +21,17 @@ import android.hardware.bluetooth.ranging.Nadm; import android.hardware.bluetooth.ranging.StepTonePct; /** - * Raw ranging data of Channel Sounding from either Initator or Reflector + * Raw ranging data of Channel Sounding from either Initator or Reflector. + * 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/ */ @VintfStability parcelable ChannelSoundingSingleSideData { /** * PCT (complex value) measured from mode-2 or mode-3 steps in a CS procedure (in time order). */ - @nullable List stepTonePcts; + @nullable StepTonePct[] stepTonePcts; /** * Packet Quality from mode-1 or mode-3 steps in a CS procedures (in time order). */ @@ -49,8 +52,8 @@ parcelable ChannelSoundingSingleSideData { * Packet_PCT1 or packet_PCT2 of mode-1 or mode-3, if sounding sequence is used and sounding * phase-based ranging is supported. */ - @nullable List packetPct1; - @nullable List packetPct2; + @nullable ComplexNumber[] packetPct1; + @nullable ComplexNumber[] packetPct2; /** * Reference power level (-127 to 20) of the signal in the procedure, in dBm. */ diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeType.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeType.aidl index 2058ae8411..3a727aa353 100644 --- a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeType.aidl +++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/ModeType.aidl @@ -17,7 +17,7 @@ package android.hardware.bluetooth.ranging; @VintfStability -@Backing(type="int") +@Backing(type="byte") enum ModeType { ZERO = 0x00, ONE = 0x01, diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/Nadm.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/Nadm.aidl index 3cfb22f464..74cf7317c9 100644 --- a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/Nadm.aidl +++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/Nadm.aidl @@ -16,6 +16,12 @@ package android.hardware.bluetooth.ranging; +/** + * Normalized Attack Detector Metric. + * See Channel Sounding CR_PR, 3.13.24 for details. + * + * Specification: https://www.bluetooth.com/specifications/specs/channel-sounding-cr-pr/ + */ @VintfStability @Backing(type="byte") enum Nadm { @@ -26,5 +32,7 @@ enum Nadm { ATTACK_IS_LIKELY = 0x04, ATTACK_IS_VERY_LIKELY = 0x05, ATTACK_IS_EXTREMELY_LIKELY = 0x06, + /* If a device is unable to determine a NADM value, then it shall report a NADM value of Unknown + */ UNKNOWN = 0xFFu8, } diff --git a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/SubModeType.aidl b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/SubModeType.aidl index ca9bfcb836..b775002eab 100644 --- a/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/SubModeType.aidl +++ b/bluetooth/ranging/aidl/android/hardware/bluetooth/ranging/SubModeType.aidl @@ -17,10 +17,10 @@ package android.hardware.bluetooth.ranging; @VintfStability -@Backing(type="int") +@Backing(type="byte") enum SubModeType { ONE = 0x01, TWO = 0x02, THREE = 0x03, - UNUSED = 0xff, + UNUSED = 0xffu8, }