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 Max
  • connSupervisionTimeout = Timeout
  • maxConnLatency = 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

source§

fn clone(&self) -> Stm32Wb5xError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Stm32Wb5xError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Format for Stm32Wb5xError

source§

fn format(&self, f: Formatter<'_>)

Writes the defmt representation of self to fmt.
source§

impl PartialEq<Stm32Wb5xError> for Stm32Wb5xError

source§

fn eq(&self, other: &Stm32Wb5xError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Stm32Wb5xError

source§

impl StructuralPartialEq for Stm32Wb5xError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.