Enum stm32wb_hci::vendor::stm32wb::event::Stm32Wb5xError
source · pub enum Stm32Wb5xError {
Show 32 variants
UnknownEvent(u16),
UnknownFirmwareKind(u8),
BadGapPairingStatus(u8),
BadGapDeviceFoundEvent(u8),
BadGapBdAddrType(u8),
BadGapProcedure(u8),
BadGapProcedureStatus(u8),
BadL2CapDataLength(u8, u8),
BadL2CapLength(u16, u16),
BadL2CapRejectionReason(u16),
BadL2CapConnectionResponseCode(u8),
BadL2CapConnectionResponseResult(u16),
BadConnectionInterval(ConnectionIntervalError),
BadL2CapConnectionUpdateRequestInterval(Duration, Duration),
BadL2CapConnectionUpdateRequestLatency(u16, u16),
BadL2CapConnectionUpdateRequestTimeout(Duration),
BadAttFindInformationResponseFormat(u8),
AttFindInformationResponsePartialPair16,
AttFindInformationResponsePartialPair128,
AttFindByTypeValuePartial,
AttReadByTypeResponsePartial,
AttReadByGroupTypeResponsePartial,
BadGattProcedureStatus(u8),
BadAttRequestOpcode(u8),
BadAttError(u8),
AttReadMultiplePermitRequestPartial,
BadConfigParameterLength(usize),
UnknownLinkState(u8),
BadBooleanValue(u8),
BadPassKeyRequirement(u8),
PartialBondedDeviceAddress,
BadBdAddrType(u8),
}Expand description
Enumeration of potential errors when sending commands or deserializing events.
Variants§
UnknownEvent(u16)
The event is not recognized. Includes the unknown opcode.
UnknownFirmwareKind(u8)
For the CoprocessorReady event: the kind of firmware running on radio coprocessor is not recognized.
BadGapPairingStatus(u8)
For the GAP Pairing Complete event: The status was not recognized. Includes the unrecognized byte.
BadGapDeviceFoundEvent(u8)
For the GAP Device Found event: the type of event was not recognized. Includes the unrecognized byte.
BadGapBdAddrType(u8)
For the GAP Device Found event: the type of BDADDR was not recognized. Includes the unrecognized byte.
BadGapProcedure(u8)
For the GAP Procedure Complete event: The procedure code was not recognized. Includes the unrecognized byte.
BadGapProcedureStatus(u8)
For the GAP Procedure Complete event: The procedure status was not recognized. Includes the unrecognized byte.
BadL2CapDataLength(u8, u8)
For any L2CAP event: The event data length did not match the expected length. The first field is the required length, and the second is the actual length.
BadL2CapLength(u16, u16)
For any L2CAP event: The L2CAP length did not match the expected length. The first field is the required length, and the second is the actual length.
BadL2CapRejectionReason(u16)
For any L2CAP response event: The L2CAP command was rejected, but the rejection reason was not recognized. Includes the unknown value.
BadL2CapConnectionResponseCode(u8)
For the L2CAP Connection Update Response event: The code byte did not indicate either Rejected or Updated. Includes the invalid byte.
BadL2CapConnectionResponseResult(u16)
For the L2CAP Connection Update Response event: The command was accepted, but the result was not recognized. It did not indicate the parameters were either updated or rejected. Includes the unknown value.
BadConnectionInterval(ConnectionIntervalError)
For the L2CAP Connection Update Request event: The provided connection interval is invalid. Includes the underlying error.
BadL2CapConnectionUpdateRequestInterval(Duration, Duration)
For the L2CAP Connection Update Request event: The provided interval is invalid. Potential errors:
- Either the minimum or maximum is out of range. The minimum value for either is 7.5 ms, and the maximum is 4 s.
- The min is greater than the max
See the Bluetooth specification, Vol 3, Part A, Section 4.20. Versions 4.1, 4.2 and 5.0.
Inclues the provided minimum and maximum, respectively.
BadL2CapConnectionUpdateRequestLatency(u16, u16)
For the L2CAP Connection Update Request event: The provided connection latency is invalid. The maximum value for connection latency is defined in terms of the timeout and maximum connection interval.
connIntervalMax = Interval MaxconnSupervisionTimeout = TimeoutmaxConnLatency = min(500, ((connSupervisionTimeout / (2 * connIntervalMax)) - 1))
See the Bluetooth specification, Vol 3, Part A, Section 4.20. Versions 4.1, 4.2 and 5.0.
Inclues the provided value and maximum allowed value, respectively.
BadL2CapConnectionUpdateRequestTimeout(Duration)
For the L2CAP Connection Update Request event: The provided timeout is invalid. The timeout field shall have a value in the range of 100 ms to 32 seconds (inclusive).
See the Bluetooth specification, Vol 3, Part A, Section 4.20. Versions 4.1, 4.2 and 5.0.
Inclues the provided value.
BadAttFindInformationResponseFormat(u8)
For the ATT Find Information Response event: The format code is invalid. Includes the unrecognized byte.
AttFindInformationResponsePartialPair16
For the ATT Find Information Response event: The format code indicated 16-bit UUIDs, but the packet ends with a partial pair.
AttFindInformationResponsePartialPair128
For the ATT Find Information Response event: The format code indicated 128-bit UUIDs, but the packet ends with a partial pair.
AttFindByTypeValuePartial
For the ATT Find by Type Value Response event: The packet ends with a partial attribute pair.
AttReadByTypeResponsePartial
For the ATT Read by Type Response event: The packet ends with a partial attribute handle-value pair.
AttReadByGroupTypeResponsePartial
For the ATT Read by Group Type Response event: The packet ends with a partial attribute data group.
BadGattProcedureStatus(u8)
For the GATT Procedure Complete event: The status code was not recognized. Includes the unrecognized byte.
BadAttRequestOpcode(u8)
For the ATT Error Response event: The request opcode was not recognized. Includes the unrecognized byte.
BadAttError(u8)
For the ATT Error Response event: The error code was not recognized. Includes the unrecognized byte.
AttReadMultiplePermitRequestPartial
For the ATT Read Multiple Permit Request event: The packet ends with a partial attribute handle.
BadConfigParameterLength(usize)
For the HAL Read Config Data command complete event: The returned value has a length that does not correspond to a requested parameter. Known lengths are 1, 2, 6, or 16. Includes the number of bytes returned.
UnknownLinkState(u8)
For the HAL Get Link Status command complete event: One of the bytes representing a link state does not represent a known link state. Returns the unknown value.
BadBooleanValue(u8)
For the GAP Get Security Level command complete
event: One of the boolean values
(mitm_protection_required,
bonding_required, or
out_of_band_data_present) was
neither 0 nor 1. The unknown value is provided.
BadPassKeyRequirement(u8)
For the GAP Get Security Level command complete event: the pass key requirement field was an invalid value. The unknown byte is provided.
PartialBondedDeviceAddress
For the GAP Get Bonded Devices command complete event: the packat was not long enough to contain the number of addresses it claimed to contain.
BadBdAddrType(u8)
For the GAP Get Bonded Devices command complete event: one of the address type bytes was invalid. Includes the invalid byte.
Trait Implementations§
source§impl Clone for Stm32Wb5xError
impl Clone for Stm32Wb5xError
source§fn clone(&self) -> Stm32Wb5xError
fn clone(&self) -> Stm32Wb5xError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for Stm32Wb5xError
impl Debug for Stm32Wb5xError
source§impl Format for Stm32Wb5xError
impl Format for Stm32Wb5xError
source§impl PartialEq<Stm32Wb5xError> for Stm32Wb5xError
impl PartialEq<Stm32Wb5xError> for Stm32Wb5xError
source§fn eq(&self, other: &Stm32Wb5xError) -> bool
fn eq(&self, other: &Stm32Wb5xError) -> bool
self and other values to be equal, and is used
by ==.