Merge "uwb_uci_packets: align missing capabilities"
diff --git a/src/rust/uwb_core/protos/uwb_service.proto b/src/rust/uwb_core/protos/uwb_service.proto
index 171747f..0f99fef 100644
--- a/src/rust/uwb_core/protos/uwb_service.proto
+++ b/src/rust/uwb_core/protos/uwb_service.proto
@@ -103,6 +103,7 @@
 
   UCI_STATUS_ERROR_CCC_SE_BUSY = 80;
   UCI_STATUS_ERROR_CCC_LIFECYCLE = 81;
+  UCI_STATUS_ERROR_STOPPED_DUE_TO_OTHER_SESSION_CONFLICT = 82;
 }
 
 // Represents uwb_uci_packets::OwrAoaStatusCode
@@ -131,13 +132,46 @@
   STATE_CHANGE_WITH_SESSION_MANAGEMENT_COMMANDS = 0;
   MAX_RANGING_ROUND_RETRY_COUNT_REACHED = 1;
   MAX_NUMBER_OF_MEASUREMENTS_REACHED = 2;
+  SESSION_SUSPENDED_DUE_TO_INBAND_SIGNAL = 3;
+  SESSION_RESUMED_DUE_TO_INBAND_SIGNAL = 4;
+  SESSION_STOPPED_DUE_TO_INBAND_SIGNAL = 5;
   ERROR_INVALID_UL_TDOA_RANDOM_WINDOW = 29;
+  ERROR_MIN_RFRAMES_PER_RR_NOT_SUPPORTED = 30;
+  ERROR_TX_DELAY_NOT_SUPPORTED = 31;
   ERROR_SLOT_LENGTH_NOT_SUPPORTED = 32;
   ERROR_INSUFFICIENT_SLOTS_PER_RR = 33;
   ERROR_MAC_ADDRESS_MODE_NOT_SUPPORTED = 34;
-  ERROR_INVALID_RANGING_INTERVAL = 35;
+  ERROR_INVALID_RANGING_DURATION = 35;
   ERROR_INVALID_STS_CONFIG = 36;
   ERROR_INVALID_RFRAME_CONFIG = 37;
+  ERROR_HUS_NOT_ENOUGH_SLOTS = 38;
+  ERROR_HUS_CFP_PHASE_TOO_SHORT = 39;
+  ERROR_HUS_CAP_PHASE_TOO_SHORT = 40;
+  ERROR_HUS_OTHERS = 41;
+  ERROR_STATUS_SESSION_KEY_NOT_FOUND = 42;
+  ERROR_STATUS_SUB_SESSION_KEY_NOT_FOUND = 43;
+  ERROR_INVALID_PREAMBLE_CODE_INDEX = 44;
+  ERROR_INVALID_SFD_ID = 45;
+  ERROR_INVALID_PSDU_DATA_RATE = 46;
+  ERROR_INVALID_PHR_DATA_RATE = 47;
+  ERROR_INVALID_PREAMBLE_DURATION = 48;
+  ERROR_INVALID_STS_LENGTH = 49;
+  ERROR_INVALID_NUM_OF_STS_SEGMENTS = 50;
+  ERROR_INVALID_NUM_OF_CONTROLEES = 51;
+  ERROR_MAX_RANGING_REPLY_TIME_EXCEEDED = 52;
+  ERROR_INVALID_DST_ADDRESS_LIST = 53;
+  ERROR_INVALID_OR_NOT_FOUND_SUB_SESSION_ID = 54;
+  ERROR_INVALID_RESULT_REPORT_CONFIG = 55;
+  ERROR_INVALID_RANGING_ROUND_CONTROL_CONFIG = 56;
+  ERROR_INVALID_RANGING_ROUND_USAGE = 57;
+  ERROR_INVALID_MULTI_NODE_MODE = 58;
+  ERROR_RDS_FETCH_FAILURE = 59;
+  ERROR_REF_UWB_SESSION_DOES_NOT_EXIST = 60;
+  ERROR_REF_UWB_SESSION_RANGING_DURATION_MISMATCH = 61;
+  ERROR_REF_UWB_SESSION_INVALID_OFFSET_TIME = 62;
+  ERROR_REF_UWB_SESSION_LOST = 63;
+  ERROR_INVALID_CHANNEL_WITH_AOA = 128;
+  ERROR_STOPPED_DUE_TO_OTHER_SESSION_CONFLICT = 129;
 }
 
 // Represent uwb_uci_packets::RangingMeasurementType.
diff --git a/src/rust/uwb_core/src/proto/mappings.rs b/src/rust/uwb_core/src/proto/mappings.rs
index 2722307..328b675 100644
--- a/src/rust/uwb_core/src/proto/mappings.rs
+++ b/src/rust/uwb_core/src/proto/mappings.rs
@@ -145,6 +145,7 @@
     UCI_STATUS_DATA_RX_CRC_ERROR => UciStatusDataRxCrcError,
     UCI_STATUS_ERROR_CCC_SE_BUSY => UciStatusErrorCccSeBusy,
     UCI_STATUS_ERROR_CCC_LIFECYCLE => UciStatusErrorCccLifecycle,
+    UCI_STATUS_ERROR_STOPPED_DUE_TO_OTHER_SESSION_CONFLICT => UciStatusErrorStoppedDueToOtherSessionConflict,
 }
 
 enum_mapping! {
@@ -173,13 +174,46 @@
     STATE_CHANGE_WITH_SESSION_MANAGEMENT_COMMANDS => StateChangeWithSessionManagementCommands,
     MAX_RANGING_ROUND_RETRY_COUNT_REACHED => MaxRangingRoundRetryCountReached,
     MAX_NUMBER_OF_MEASUREMENTS_REACHED => MaxNumberOfMeasurementsReached,
+    SESSION_SUSPENDED_DUE_TO_INBAND_SIGNAL => SessionSuspendedDueToInbandSignal,
+    SESSION_RESUMED_DUE_TO_INBAND_SIGNAL => SessionResumedDueToInbandSignal,
+    SESSION_STOPPED_DUE_TO_INBAND_SIGNAL => SessionStoppedDueToInbandSignal,
     ERROR_INVALID_UL_TDOA_RANDOM_WINDOW => ErrorInvalidUlTdoaRandomWindow,
+    ERROR_MIN_RFRAMES_PER_RR_NOT_SUPPORTED => ErrorMinRframesPerRrNotSupported,
+    ERROR_TX_DELAY_NOT_SUPPORTED => ErrorTxDelayNotSupported,
     ERROR_SLOT_LENGTH_NOT_SUPPORTED => ErrorSlotLengthNotSupported,
     ERROR_INSUFFICIENT_SLOTS_PER_RR => ErrorInsufficientSlotsPerRr,
     ERROR_MAC_ADDRESS_MODE_NOT_SUPPORTED => ErrorMacAddressModeNotSupported,
-    ERROR_INVALID_RANGING_INTERVAL => ErrorInvalidRangingInterval,
+    ERROR_INVALID_RANGING_DURATION => ErrorInvalidRangingDuration,
     ERROR_INVALID_STS_CONFIG => ErrorInvalidStsConfig,
     ERROR_INVALID_RFRAME_CONFIG => ErrorInvalidRframeConfig,
+    ERROR_HUS_NOT_ENOUGH_SLOTS => ErrorHusNotEnoughSlots,
+    ERROR_HUS_CFP_PHASE_TOO_SHORT => ErrorHusCfpPhaseTooShort,
+    ERROR_HUS_CAP_PHASE_TOO_SHORT => ErrorHusCapPhaseTooShort,
+    ERROR_HUS_OTHERS => ErrorHusOthers,
+    ERROR_STATUS_SESSION_KEY_NOT_FOUND => ErrorStatusSessionKeyNotFound,
+    ERROR_STATUS_SUB_SESSION_KEY_NOT_FOUND => ErrorStatusSubSessionKeyNotFound,
+    ERROR_INVALID_PREAMBLE_CODE_INDEX => ErrorInvalidPreambleCodeIndex,
+    ERROR_INVALID_SFD_ID => ErrorInvalidSfdId,
+    ERROR_INVALID_PSDU_DATA_RATE => ErrorInvalidPsduDataRate,
+    ERROR_INVALID_PHR_DATA_RATE => ErrorInvalidPhrDataRate,
+    ERROR_INVALID_PREAMBLE_DURATION => ErrorInvalidPreambleDuration,
+    ERROR_INVALID_STS_LENGTH => ErrorInvalidStsLength,
+    ERROR_INVALID_NUM_OF_STS_SEGMENTS => ErrorInvalidNumOfStsSegments,
+    ERROR_INVALID_NUM_OF_CONTROLEES => ErrorInvalidNumOfControlees,
+    ERROR_MAX_RANGING_REPLY_TIME_EXCEEDED => ErrorMaxRangingReplyTimeExceeded,
+    ERROR_INVALID_DST_ADDRESS_LIST => ErrorInvalidDstAddressList,
+    ERROR_INVALID_OR_NOT_FOUND_SUB_SESSION_ID => ErrorInvalidOrNotFoundSubSessionId,
+    ERROR_INVALID_RESULT_REPORT_CONFIG => ErrorInvalidResultReportConfig,
+    ERROR_INVALID_RANGING_ROUND_CONTROL_CONFIG => ErrorInvalidRangingRoundControlConfig,
+    ERROR_INVALID_RANGING_ROUND_USAGE => ErrorInvalidRangingRoundUsage,
+    ERROR_INVALID_MULTI_NODE_MODE => ErrorInvalidMultiNodeMode,
+    ERROR_RDS_FETCH_FAILURE => ErrorRdsFetchFailure,
+    ERROR_REF_UWB_SESSION_DOES_NOT_EXIST => ErrorRefUwbSessionDoesNotExist,
+    ERROR_REF_UWB_SESSION_RANGING_DURATION_MISMATCH => ErrorRefUwbSessionRangingDurationMismatch,
+    ERROR_REF_UWB_SESSION_INVALID_OFFSET_TIME => ErrorRefUwbSessionInvalidOffsetTime,
+    ERROR_REF_UWB_SESSION_LOST => ErrorRefUwbSessionLost,
+    ERROR_INVALID_CHANNEL_WITH_AOA => ErrorInvalidChannelWithAoa,
+    ERROR_STOPPED_DUE_TO_OTHER_SESSION_CONFLICT => ErrorStoppedDueToOtherSessionConflict,
 }
 
 enum_mapping! {
diff --git a/src/rust/uwb_core/src/session/session_manager.rs b/src/rust/uwb_core/src/session/session_manager.rs
index c525e07..3b08b52 100644
--- a/src/rust/uwb_core/src/session/session_manager.rs
+++ b/src/rust/uwb_core/src/session/session_manager.rs
@@ -26,6 +26,7 @@
 use crate::uci::notification::{SessionNotification as UciSessionNotification, SessionRangeData};
 use crate::uci::uci_manager::UciManager;
 use crate::utils::clean_mpsc_receiver;
+use num_traits::FromPrimitive;
 
 const MAX_SESSION_COUNT: usize = 5;
 
@@ -295,6 +296,16 @@
     fn handle_uci_notification(&mut self, notf: UciSessionNotification) {
         match notf {
             UciSessionNotification::Status { session_id, session_state, reason_code } => {
+                let reason_code = match ReasonCode::from_u8(reason_code) {
+                    Some(r) => r,
+                    None => {
+                        error!(
+                            "Received unknown reason_code {:?} in UciSessionNotification",
+                            reason_code
+                        );
+                        return;
+                    }
+                };
                 if session_state == SessionState::SessionStateDeinit {
                     debug!("Session {} is deinitialized", session_id);
                     let _ = self.active_sessions.remove(&session_id);
@@ -435,6 +446,7 @@
     use crate::uci::mock_uci_manager::MockUciManager;
     use crate::uci::notification::{RangingMeasurements, UciNotification};
     use crate::utils::init_test_logging;
+    use num_traits::ToPrimitive;
 
     pub(crate) fn generate_params() -> AppConfigParams {
         FiraAppConfigParamsBuilder::new()
@@ -504,7 +516,7 @@
         UciNotification::Session(UciSessionNotification::Status {
             session_id,
             session_state,
-            reason_code: ReasonCode::StateChangeWithSessionManagementCommands,
+            reason_code: ReasonCode::StateChangeWithSessionManagementCommands.to_u8().unwrap(),
         })
     }
 
@@ -545,7 +557,7 @@
     use crate::params::ccc_started_app_config_params::CccStartedAppConfigParams;
     use crate::params::uci_packets::{
         AppConfigTlv, AppConfigTlvType, ControleeStatus, Controlees, MulticastUpdateStatusCode,
-        SetAppConfigResponse, StatusCode,
+        ReasonCode, SetAppConfigResponse, StatusCode,
     };
     use crate::params::utils::{u32_to_bytes, u64_to_bytes, u8_to_bytes};
     use crate::params::{FiraAppConfigParamsBuilder, KeyRotation};
diff --git a/src/rust/uwb_core/src/uci/notification.rs b/src/rust/uwb_core/src/uci/notification.rs
index a390d58..4438f83 100644
--- a/src/rust/uwb_core/src/uci/notification.rs
+++ b/src/rust/uwb_core/src/uci/notification.rs
@@ -16,7 +16,7 @@
 
 use log::{debug, error};
 use num_traits::ToPrimitive;
-use uwb_uci_packets::{parse_diagnostics_ntf, Packet};
+use uwb_uci_packets::{parse_diagnostics_ntf, Packet, UCI_PACKET_HEADER_LEN};
 
 use crate::error::{Error, Result};
 use crate::params::fira_app_config_params::UwbAddress;
@@ -24,7 +24,7 @@
     ControleeStatus, CreditAvailability, DataRcvStatusCode, DataTransferNtfStatusCode, DeviceState,
     ExtendedAddressDlTdoaRangingMeasurement, ExtendedAddressOwrAoaRangingMeasurement,
     ExtendedAddressTwoWayRangingMeasurement, FiraComponent, RangingMeasurementType, RawUciMessage,
-    ReasonCode, SessionId, SessionState, ShortAddressDlTdoaRangingMeasurement,
+    SessionId, SessionState, ShortAddressDlTdoaRangingMeasurement,
     ShortAddressOwrAoaRangingMeasurement, ShortAddressTwoWayRangingMeasurement, StatusCode,
 };
 
@@ -58,7 +58,7 @@
         /// uwb_uci_packets::SessionState.
         session_state: SessionState,
         /// uwb_uci_packets::Reasoncode.
-        reason_code: ReasonCode,
+        reason_code: u8,
     },
     /// SessionUpdateControllerMulticastListNtf equivalent.
     UpdateControllerMulticastList {
@@ -300,7 +300,7 @@
     fn try_from(
         evt: uwb_uci_packets::SessionInfoNtfPacket,
     ) -> std::result::Result<Self, Self::Error> {
-        let raw_ranging_data = evt.clone().to_vec();
+        let raw_ranging_data = evt.clone().to_bytes()[UCI_PACKET_HEADER_LEN..].to_vec();
         use uwb_uci_packets::SessionInfoNtfChild;
         let ranging_measurements = match evt.specialize() {
             SessionInfoNtfChild::ShortMacTwoWaySessionInfoNtf(evt) => {
@@ -559,7 +559,8 @@
                 two_way_ranging_measurements: vec![extended_measurement.clone()],
             }
             .build();
-        let raw_ranging_data = extended_two_way_session_info_ntf.clone().to_vec();
+        let raw_ranging_data =
+            extended_two_way_session_info_ntf.clone().to_bytes()[UCI_PACKET_HEADER_LEN..].to_vec();
         let range_notification =
             uwb_uci_packets::SessionInfoNtfPacket::try_from(extended_two_way_session_info_ntf)
                 .unwrap();
@@ -608,7 +609,8 @@
             two_way_ranging_measurements: vec![short_measurement.clone()],
         }
         .build();
-        let raw_ranging_data = short_two_way_session_info_ntf.clone().to_vec();
+        let raw_ranging_data =
+            short_two_way_session_info_ntf.clone().to_bytes()[UCI_PACKET_HEADER_LEN..].to_vec();
         let range_notification =
             uwb_uci_packets::SessionInfoNtfPacket::try_from(short_two_way_session_info_ntf)
                 .unwrap();
@@ -653,7 +655,8 @@
                 owr_aoa_ranging_measurements: vec![extended_measurement.clone()],
             }
             .build();
-        let raw_ranging_data = extended_owr_aoa_session_info_ntf.clone().to_vec();
+        let raw_ranging_data =
+            extended_owr_aoa_session_info_ntf.clone().to_bytes()[UCI_PACKET_HEADER_LEN..].to_vec();
         let range_notification =
             uwb_uci_packets::SessionInfoNtfPacket::try_from(extended_owr_aoa_session_info_ntf)
                 .unwrap();
@@ -697,7 +700,8 @@
             owr_aoa_ranging_measurements: vec![short_measurement.clone()],
         }
         .build();
-        let raw_ranging_data = short_owr_aoa_session_info_ntf.clone().to_vec();
+        let raw_ranging_data =
+            short_owr_aoa_session_info_ntf.clone().to_bytes()[UCI_PACKET_HEADER_LEN..].to_vec();
         let range_notification =
             uwb_uci_packets::SessionInfoNtfPacket::try_from(short_owr_aoa_session_info_ntf)
                 .unwrap();
@@ -723,7 +727,9 @@
         let session_status_ntf = uwb_uci_packets::SessionStatusNtfBuilder {
             session_id: 0x20,
             session_state: uwb_uci_packets::SessionState::SessionStateActive,
-            reason_code: uwb_uci_packets::ReasonCode::StateChangeWithSessionManagementCommands,
+            reason_code: uwb_uci_packets::ReasonCode::StateChangeWithSessionManagementCommands
+                .to_u8()
+                .unwrap(),
         }
         .build();
         let session_notification_packet =
@@ -737,7 +743,9 @@
             UciNotification::Session(SessionNotification::Status {
                 session_id: 0x20,
                 session_state: uwb_uci_packets::SessionState::SessionStateActive,
-                reason_code: uwb_uci_packets::ReasonCode::StateChangeWithSessionManagementCommands,
+                reason_code: uwb_uci_packets::ReasonCode::StateChangeWithSessionManagementCommands
+                    .to_u8()
+                    .unwrap(),
             })
         );
     }
diff --git a/src/rust/uwb_core/src/uci/pcapng_block.rs b/src/rust/uwb_core/src/uci/pcapng_block.rs
index c94ddac..6fcc670 100644
--- a/src/rust/uwb_core/src/uci/pcapng_block.rs
+++ b/src/rust/uwb_core/src/uci/pcapng_block.rs
@@ -143,7 +143,7 @@
 impl Default for InterfaceDescriptionBlockBuilder {
     fn default() -> Self {
         Self {
-            link_type: 293, // USB 2.0 Low Speed
+            link_type: 299, // FiRa UCI
             snap_len: 0,    // unlimited
             block_options: vec![],
         }
@@ -422,7 +422,7 @@
     #[test]
     fn test_interface_description_block_with_options_build() {
         let comment_opt = BlockOption::new(0x1, "ABCDEF".to_owned().into_bytes());
-        let link_type: u16 = 293; // 0x125
+        let link_type: u16 = 299; // 0x12b
         let snap_len: u32 = 0;
         let interface_description_block = InterfaceDescriptionBlockBuilder::new()
             .link_type(link_type)
@@ -433,7 +433,7 @@
         let expected_block: Vec<u8> = vec![
             0x01, 0x00, 0x00, 0x00, // block type
             0x24, 0x00, 0x00, 0x00, // block length
-            0x25, 0x01, 0x00, 0x00, // link type, reserved
+            0x2b, 0x01, 0x00, 0x00, // link type, reserved
             0x00, 0x00, 0x00, 0x00, // SnapLen
             0x01, 0x00, 0x06, 0x00, // option code, padded length
             0x41, 0x42, 0x43, 0x44, // option (ABCD)
diff --git a/src/rust/uwb_core/src/uci/uci_manager.rs b/src/rust/uwb_core/src/uci/uci_manager.rs
index 709df2f..aa2ac51 100644
--- a/src/rust/uwb_core/src/uci/uci_manager.rs
+++ b/src/rust/uwb_core/src/uci/uci_manager.rs
@@ -1317,7 +1317,9 @@
                     session_id,
                     session_state: uwb_uci_packets::SessionState::SessionStateInit,
                     reason_code:
-                        uwb_uci_packets::ReasonCode::StateChangeWithSessionManagementCommands,
+                        uwb_uci_packets::ReasonCode::StateChangeWithSessionManagementCommands
+                            .to_u8()
+                            .unwrap(),
                 });
                 resp.append(&mut notf);
 
diff --git a/src/rust/uwb_uci_packets/src/lib.rs b/src/rust/uwb_uci_packets/src/lib.rs
index 7b3aee0..bd3ffdb 100644
--- a/src/rust/uwb_uci_packets/src/lib.rs
+++ b/src/rust/uwb_uci_packets/src/lib.rs
@@ -32,7 +32,7 @@
 // Real UCI packet header len.
 pub const UCI_PACKET_HAL_HEADER_LEN: usize = 4;
 // Unfragmented UCI packet header len.
-const UCI_PACKET_HEADER_LEN: usize = 7;
+pub const UCI_PACKET_HEADER_LEN: usize = 7;
 // Unfragmented UCI DATA_MESSAGE_SND packet header len.
 const UCI_DATA_SND_PACKET_HEADER_LEN: usize = 6;
 
diff --git a/src/rust/uwb_uci_packets/uci_packets.pdl b/src/rust/uwb_uci_packets/uci_packets.pdl
index 1724eca..cfb895a 100644
--- a/src/rust/uwb_uci_packets/uci_packets.pdl
+++ b/src/rust/uwb_uci_packets/uci_packets.pdl
@@ -135,6 +135,7 @@
     // Vendor Specific Status Codes
     UCI_STATUS_ERROR_CCC_SE_BUSY = 0x50,
     UCI_STATUS_ERROR_CCC_LIFECYCLE = 0x51,
+    UCI_STATUS_ERROR_STOPPED_DUE_TO_OTHER_SESSION_CONFLICT = 0x52,
 }
 
 // This needs a separate type as the Status code values in an OWR for AOA
@@ -339,13 +340,48 @@
     STATE_CHANGE_WITH_SESSION_MANAGEMENT_COMMANDS = 0x00,
     MAX_RANGING_ROUND_RETRY_COUNT_REACHED = 0x01,
     MAX_NUMBER_OF_MEASUREMENTS_REACHED = 0x02,
+    SESSION_SUSPENDED_DUE_TO_INBAND_SIGNAL = 0x03,
+    SESSION_RESUMED_DUE_TO_INBAND_SIGNAL = 0x04,
+    SESSION_STOPPED_DUE_TO_INBAND_SIGNAL = 0x05,
     ERROR_INVALID_UL_TDOA_RANDOM_WINDOW = 0x1D,
+    ERROR_MIN_RFRAMES_PER_RR_NOT_SUPPORTED = 0x1E,
+    ERROR_TX_DELAY_NOT_SUPPORTED = 0x1F,
     ERROR_SLOT_LENGTH_NOT_SUPPORTED = 0x20,
     ERROR_INSUFFICIENT_SLOTS_PER_RR = 0x21,
     ERROR_MAC_ADDRESS_MODE_NOT_SUPPORTED = 0x22,
-    ERROR_INVALID_RANGING_INTERVAL = 0x23,
+    ERROR_INVALID_RANGING_DURATION = 0x23,
     ERROR_INVALID_STS_CONFIG = 0x24,
     ERROR_INVALID_RFRAME_CONFIG = 0x25,
+    ERROR_HUS_NOT_ENOUGH_SLOTS = 0x26,
+    ERROR_HUS_CFP_PHASE_TOO_SHORT = 0x27,
+    ERROR_HUS_CAP_PHASE_TOO_SHORT = 0x28,
+    ERROR_HUS_OTHERS = 0x29,
+    ERROR_STATUS_SESSION_KEY_NOT_FOUND = 0x2A,
+    ERROR_STATUS_SUB_SESSION_KEY_NOT_FOUND = 0x2B,
+    ERROR_INVALID_PREAMBLE_CODE_INDEX = 0x2C,
+    ERROR_INVALID_SFD_ID = 0x2D,
+    ERROR_INVALID_PSDU_DATA_RATE = 0x2E,
+    ERROR_INVALID_PHR_DATA_RATE = 0x2F,
+    ERROR_INVALID_PREAMBLE_DURATION = 0x30,
+    ERROR_INVALID_STS_LENGTH = 0x31,
+    ERROR_INVALID_NUM_OF_STS_SEGMENTS = 0x32,
+    ERROR_INVALID_NUM_OF_CONTROLEES = 0x33,
+    ERROR_MAX_RANGING_REPLY_TIME_EXCEEDED = 0x34,
+    ERROR_INVALID_DST_ADDRESS_LIST = 0x35,
+    ERROR_INVALID_OR_NOT_FOUND_SUB_SESSION_ID = 0x36,
+    ERROR_INVALID_RESULT_REPORT_CONFIG = 0x37,
+    ERROR_INVALID_RANGING_ROUND_CONTROL_CONFIG = 0x38,
+    ERROR_INVALID_RANGING_ROUND_USAGE = 0x39,
+    ERROR_INVALID_MULTI_NODE_MODE = 0x3A,
+    ERROR_RDS_FETCH_FAILURE = 0x3B,
+    ERROR_REF_UWB_SESSION_DOES_NOT_EXIST = 0x3C,
+    ERROR_REF_UWB_SESSION_RANGING_DURATION_MISMATCH = 0x3D,
+    ERROR_REF_UWB_SESSION_INVALID_OFFSET_TIME = 0x3E,
+    ERROR_REF_UWB_SESSION_LOST = 0x3F,
+    // TODO(b/272775225): Add a range for the vendor specific space, after PDL supports
+    // this feature (requested in b/267339120).
+    ERROR_INVALID_CHANNEL_WITH_AOA = 0x80,
+    ERROR_STOPPED_DUE_TO_OTHER_SESSION_CONFLICT = 0x81,
 }
 
 enum MulticastUpdateStatusCode : 8 {
@@ -688,11 +724,14 @@
 packet SessionStatusNtf : SessionConfigNotification (opcode = 0x2) { //SESSION_STATUS_NTF
     session_id: 32,
     session_state: SessionState,
-    reason_code: ReasonCode,
+    // TODO(b/272775225): Switch back to the enum type ReasonCode, once PDL supports defining a
+    // range inside an enum (for the vendor-specific space), in b/267339120.
+    reason_code: 8,
 }
 
 test SessionStatusNtf {
     "\x61\x02\x00\x06\x00\x00\x00\x01\x02\x03\x04\x02\x21",
+    "\x61\x02\x00\x06\x00\x00\x00\x01\x02\x03\x04\x01\x82", // Vendor Specific Reason Code
 }
 
 struct AppConfigTlv {