• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2024, The Android Open Source Project
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 use crate::derive::{Read, Write};
16 use crate::reader::{Read, Reader};
17 use crate::writer::{Write, Writer};
18 
19 /// Status / Error codes, as defined in Part F
20 #[derive(Debug, PartialEq, Read, Write)]
21 #[allow(missing_docs)]
22 pub enum Status {
23     Success = 0x00,
24     UnknownHciCommand = 0x01,
25     UnknownConnectionIdentifier = 0x02,
26     HardwareFailure = 0x03,
27     PageTimeout = 0x04,
28     AuthenticationFailure = 0x05,
29     PinorKeyMissing = 0x06,
30     MemoryCapacityExceeded = 0x07,
31     ConnectionTimeout = 0x08,
32     ConnectionLimitExceeded = 0x09,
33     SynchronousConnectionLimitExceeded = 0x0A,
34     ConnectionAlreadyExists = 0x0B,
35     CommandDisallowed = 0x0C,
36     ConnectionRejectedLimitedResources = 0x0D,
37     ConnectionRejectedSecurityReasons = 0x0E,
38     ConnectionRejectedUnacceptableBdAddr = 0x0F,
39     ConnectionAcceptTimeoutExceeded = 0x10,
40     UnsupportedFeatureOrParameterValue = 0x11,
41     InvalidHciCommandParameters = 0x12,
42     RemoteUserTerminatedConnection = 0x13,
43     RemoteDeviceTerminatedConnectionLowResources = 0x14,
44     RemoteDeviceTerminatedConnectionPowerOff = 0x15,
45     ConnectionTerminatedByLocalHost = 0x16,
46     RepeatedAttempts = 0x17,
47     PairingNotAllowed = 0x18,
48     UnknownLmpPdu = 0x19,
49     UnsupportedRemoteFeature = 0x1A,
50     ScoOffsetRejected = 0x1B,
51     ScoIntervalRejected = 0x1C,
52     ScoAirModeRejected = 0x1D,
53     InvalidLmpParameters = 0x1E,
54     UnspecifiedError = 0x1F,
55     UnsupportedLmpParameterValue = 0x20,
56     RoleChangeNotAllowed = 0x21,
57     LmpResponseTimeout = 0x22,
58     LmpErrorTransactionCollision = 0x23,
59     LmpPduNotAllowed = 0x24,
60     EncryptionModeNotAcceptable = 0x25,
61     LinkKeyCannotBeChanged = 0x26,
62     RequestedQosNotSupported = 0x27,
63     InstantPassed = 0x28,
64     PairingWithUnitKeyNotSupported = 0x29,
65     DifferentTransactionCollision = 0x2A,
66     ReservedForUse2B = 0x2B,
67     QosUnacceptableParameter = 0x2C,
68     QosRejected = 0x2D,
69     ChannelClassificationNotSupported = 0x2E,
70     InsufficientSecurity = 0x2F,
71     ParameterOutOfMandatoryRange = 0x30,
72     ReservedForUse31 = 0x31,
73     RoleSwitchPending = 0x32,
74     ReservedForUse33 = 0x33,
75     ReservedSlotViolation = 0x34,
76     RoleSwitchFailed = 0x35,
77     ExtendedInquiryResponseTooLarge = 0x36,
78     SecureSimplePairingNotSupportedByHost = 0x37,
79     HostBusy = 0x38,
80     ConnectionRejectedNoSuitableChannelFound = 0x39,
81     ControllerBusy = 0x3A,
82     UnacceptableConnectionParameters = 0x3B,
83     AdvertisingTimeout = 0x3C,
84     ConnectionTerminatedMicFailure = 0x3D,
85     ConnectionFailedEstablished = 0x3E,
86     PreviouslyUsed3F = 0x3F,
87     CoarseClockAdjustmentRejected = 0x40,
88     Type0SubmapNotDefined = 0x41,
89     UnknownAdvertisingIdentifier = 0x42,
90     LimitReached = 0x43,
91     OperationCancelledByHost = 0x44,
92     PacketTooLong = 0x45,
93     TooLate = 0x46,
94     TooEarly = 0x47,
95 }
96