1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
27 #include <bluetooth/hci/hcitypes.h>
28 #include <bluetooth/hci/hciframe.h>
30 static const TUint8 KSCODefaultTransmissionInterval = 4;
31 static const TUint8 KSCODefaultRetransmissionWindow = 0;
32 static const TUint16 KSCODefaultRxPacketLength = 20;
33 static const TUint16 KSCODefaultTxPacketLength = 20;
35 static const TUint KHCIMaxEventSize = 257; // 255 + 2 header bytes
37 // For backwards compatibility with HCI v1
38 static const TUint16 KSCOTxDefaultPacketLength = KSCODefaultTxPacketLength;
40 static const TAirMode KSCODefaultAirMode = ECVSD;
42 static const THCIConnHandle KHCIMinimumHandle = 0x000; /*!< Minimum Handle. */
43 static const THCIConnHandle KHCIBroadcastHandle = 0xbca; /*!< Broadcast Handle. */
44 static const THCIConnHandle KHCIMaximumHandle = 0xeff; /*!< Maximum Handle. */
45 static const THCIConnHandle KInvalidConnectionHandle = 0xBADC; /*!< Invalid Connection Handle. */
47 static const TInt KHCILocalDeviceNameMaxLength = 248; /*!< Local Device Name Max Length. */
48 static const TInt KHCIRemoteDeviceNameMaxLength = KHCILocalDeviceNameMaxLength; /*!< Remote device name max length. */
50 static const TInt KHCIAFHChannelMapLength = 10; /*!< AFH Channel Map Length (in bytes, 1 bit per channel, 79 channels). */
52 // Inquiry stuff - see page 562 of BT Standard 1.1
53 static const TUint8 KHCIMaximumAmountOfInquiryTime = 0x30; /*!< Maximum amount of inquiry time. */
56 static const TUint8 KHCIRemoteNameReqCompleteEventPacketLength = 255; /*!< Remote name request complete event packet length. */
58 static const TUint16 KHCIClockOffsetValidBit = 1<<15; /*!< Clock offset valid bit. */
60 // Constants Declaration
61 static const TUint KHCIMajorVersionNumber=2;
62 static const TUint KHCIMinorVersionNumber=0;
63 static const TUint KHCIBuildVersionNumber=1;
64 static const TUint16 KMaxConnectionAcceptTimeout=0xB540;
65 static const TUint16 KMinConnectionAcceptTimeout=0x0001;
66 static const TUint16 KMaxPageTimeout=0xFFFF;
67 static const TUint16 KMinPageTimeout=0x0001;
69 static const TUint16 KInvalidParameter=0xDEAD;
70 static const THCIConnHandle KHCILargestSupportedConnectionHandle=0x3eff;
72 static const TInt KHCIWriteLinkKeyNumKeysOffset = CHctlCommandFrame::KHCICommandPacketHeaderLength + 0;
74 // used by the HCTL Rx Framer (only in hci_v1, hci_v2 hctls has their own configuration
76 static const TUint KHCIRecvBufSize=2048;
77 static const TUint KHCISendBufSize=1024;
80 enum TRemotePageScanRepetitionMode
87 static const TInt KDefaultBluetoothPageScanRepMode = EPageScanModeR2; //R2 works better than R0: see DEF040531
88 static const TInt KDefaultBluetoothPageScanMode = 0;
89 static const TInt KDefaultBluetoothClockOffset = 0;
90 static const TInt KDefaultBluetoothClassOfDevice = 0;