Symbian3/SDK/Source/GUID-FDA7B932-B9C6-502D-8699-C18C8D86BCC6.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     6
<!-- Initial Contributors:
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     7
    Nokia Corporation - initial contribution.
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     8
Contributors: 
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     9
-->
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    10
<!DOCTYPE concept
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    12
<concept xml:lang="en" id="GUID-FDA7B932-B9C6-502D-8699-C18C8D86BCC6"><title>Performing Low-level Configuration</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>The Bluetooth specification defines commands and options that can be used with the various layers of the protocol. </p> <section><title>How to perform low-level configuration</title> <p>The Bluetooth Sockets API provides some of the commands and options for configuring Sockets at various layers as described below: </p> <p><b>Socket Configuration Options</b> </p> <p>The following Socket configuration options are provided by the Bluetooth Sockets API: </p> <ol id="GUID-B0C63411-0EE7-5307-9E5A-E2CDF05CC6C4"><li id="GUID-7BF0FF43-8ABE-5026-8632-D710D0B9EF97"><p> <b>Host Controller Interface (HCI) commands</b>: provide a command interface to the baseband controller and link manager. These are provided through asynchronous I/O control (ioctl) commands on an L2CAP or RFCOMM socket, as there is no direct Symbian OS interface to the HCI. Ioctls are issued through <xref href="GUID-D4F08503-F1EF-3531-9C3C-4AF24A6255F0.dita#GUID-D4F08503-F1EF-3531-9C3C-4AF24A6255F0/GUID-1DEB83AF-C681-30D4-951C-4C2A5572E59C"><apiname>RSocket::Ioctl()</apiname></xref>. For details, see the reference for the <codeph>KHCIxxx</codeph> constants, such as <xref href="GUID-754AB23A-BA33-384C-81CF-FC6A84B94D16.dita"><apiname>KHCIAddSCOConnIoctl</apiname></xref>. </p> </li> <li id="GUID-42F05040-48EE-522D-8358-F0E290F60B17"><p> <b>L2CAP-level options</b>: these are also issued through ioctls on an L2CAP socket. For details, see the reference for the <codeph>KL2CAPxxx</codeph> constants, such as <xref href="GUID-8E3F3CDF-078E-3E0A-B5E1-5B5D64E12F50.dita"><apiname>KL2CAPEchoRequestIoctl</apiname></xref>. </p> </li> <li id="GUID-DD573402-37EC-5597-A5B2-D90AF33A15C1"><p> <b>RFCOMM commands and options</b>: these are issued through ioctls on an RFCOMM socket, and sockets option settings (<xref href="GUID-D4F08503-F1EF-3531-9C3C-4AF24A6255F0.dita#GUID-D4F08503-F1EF-3531-9C3C-4AF24A6255F0/GUID-F6BB908A-2E57-3259-8F7F-AC089C6D0C56"><apiname>RSocket::GetOpt()</apiname></xref> and <xref href="GUID-D4F08503-F1EF-3531-9C3C-4AF24A6255F0.dita#GUID-D4F08503-F1EF-3531-9C3C-4AF24A6255F0/GUID-F6BB908A-2E57-3259-8F7F-AC089C6D0C56"><apiname>RSocket::GetOpt()</apiname></xref>). For details, see the reference for the <codeph>KRFCOMMxxx</codeph> constants, such as <xref href="GUID-4C9AAC3D-12A1-3DFC-837F-97BE009B24A9.dita"><apiname>KRFCOMMModemStatusCmdIoctl</apiname></xref>. </p> </li> </ol> <p><b>Example: Reading L2CAP Socket Class of Device</b> </p> <p>The following example shows the HCI command Read_Class_of_Device being issued on an L2CAP socket. The ioctl for this is <xref href="GUID-BFFD4B1A-78F6-346C-A195-D34317382A47.dita"><apiname>KHCIReadDeviceClassIoctl</apiname></xref>, which returns a <xref href="GUID-A20B8F64-51BC-31C8-AC43-80AA6F3C5BBE.dita"><apiname>THCIDeviceClassIoctl</apiname></xref> object packaged in a <xref href="GUID-6649CEA7-2307-32E3-8474-346B11E57DEE.dita"><apiname>THCIDeviceClassBuf</apiname></xref> package buffer. The example extracts the device class into a variable <codeph>majorClass</codeph>. </p> <codeblock id="GUID-EEF819B3-DFA3-5FA4-B1B3-BC6975433656" xml:space="preserve">THCIDeviceClassBuf codbuf;
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    13
TRequestStatus status;
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    14
socket.Ioctl(KHCIReadDeviceClassIoctl, status, &amp;codbuf, KSolBtHCI);
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    15
User::WaitForRequest(status);
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    16
TUint16 majorClass = codbuf().iMajorDeviceClass;
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    17
</codeblock> </section> <section><title>Where Next?</title> <p>This tutorial set takes you through all the steps involved in setting up and communicating over a Bluetooth connection. </p> <ul><li id="GUID-7C78114A-C780-54D0-916C-179B63BFDA17"><p> <xref href="GUID-70339E6A-63CD-5A74-846C-50771FDAC763.dita">Listening for Incoming Bluetooth Connections</xref>  </p> </li> <li id="GUID-D502FBFF-0B64-53E8-8CDE-58E75BF921A0"><p> <xref href="GUID-834BD3BB-B39C-5EE9-8A62-9DC435930F95.dita">Handling the Local Device Name</xref>  </p> </li> <li id="GUID-F6417852-20EF-5287-AE48-A7A3CBD07502"><p> <b>Performing Low-level Configuration</b> - This document </p> </li> <li id="GUID-51BBC780-11ED-57E9-A9F5-F6A202400FF7"><p> <xref href="GUID-5C63EF5C-826D-5838-BB7E-12FF4EA1DFCE.dita">Debugging the Host Controller</xref>  </p> </li> <li id="GUID-699728A1-AE3F-5BA4-9B16-12EDC458E215"><p> <xref href="GUID-01A0682A-50B1-57AB-9939-6CC8FCCD782D.dita">Disconnecting ACL links</xref>  </p> </li> </ul> </section> </conbody></concept>