Symbian3/PDK/Source/GUID-01A0682A-50B1-57AB-9939-6CC8FCCD782D.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 11:56:28 +0100
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
permissions -rw-r--r--
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5
f345bda72bc4 Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 3
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
f345bda72bc4 Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 3
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
f345bda72bc4 Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 3
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
f345bda72bc4 Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 3
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
f345bda72bc4 Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 3
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
f345bda72bc4 Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 3
diff changeset
     6
<!-- Initial Contributors:
f345bda72bc4 Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 3
diff changeset
     7
    Nokia Corporation - initial contribution.
f345bda72bc4 Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 3
diff changeset
     8
Contributors: 
f345bda72bc4 Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 3
diff changeset
     9
-->
f345bda72bc4 Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 3
diff changeset
    10
<!DOCTYPE concept
f345bda72bc4 Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 3
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
f345bda72bc4 Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 3
diff changeset
    12
<concept xml:lang="en" id="GUID-01A0682A-50B1-57AB-9939-6CC8FCCD782D"><title>Disconnecting ACL links</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>A link layer level <codeph>ioctl</codeph> is provided to disconnect an baseband link without first closing the open sockets using that link. This provides the ability to quickly disconnect one or all current Bluetooth asynchronous connection-oriented links (ACL) open on a device. </p> <section><title>How to disconnect ACL links</title> <p>The <xref href="GUID-8C16D394-89A5-3D26-84C0-B1E27CB93D82.dita"><apiname>TLMDisconnectACLIoctl</apiname></xref> structure contains the device address of the remote device to be disconnected and the reason code to be supplied during the disconnection. </p> <p><b>Basic Procedure</b> </p> <p>To directly disconnect individual Bluetooth ACL links: </p> <ol id="GUID-3C90E888-F916-5C02-892E-23B8EFBF5611"><li id="GUID-43EEBD38-73D0-5435-BCB3-8E68F8A5EA86"><p>Create a <xref href="GUID-C9F64608-D4E1-3CD4-A25D-22F26D8E81EF.dita"><apiname>TLMDisconnectACLBuf</apiname></xref> packaged structure, which contains the address of the Bluetooth device to be disconnected and the reason to be given to the other device for its disconnection. </p> </li> <li id="GUID-048AC487-6C80-52D7-AA98-A66FBC9B05FE"><p>Call the <codeph>KLMDisconnectACLIoctl</codeph> ioctl on the socket with the link manager level <codeph>KSolBtLM</codeph>, passing the package buffer. </p> </li> </ol> <p><b>Example: Disconnecting ACL links</b> </p> <p>Here is a simple disconnect example. </p> <ol id="GUID-DCC41584-154F-5D87-9FE8-84780EA77DB9"><li id="GUID-982FF396-8845-5850-B969-42D5238A4471"><p>Starting with an open socket </p> <codeblock id="GUID-B492479C-BFAA-5925-A63E-300739D1DD16" xml:space="preserve">RSocket sock;
f345bda72bc4 Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 3
diff changeset
    13
ret=sock.Open(ss,pInfo.iAddrFamily,pInfo.iSockType,pInfo.iProtocol);</codeblock> </li> <li id="GUID-20985159-E0C5-56FA-BD3C-BC57CEE334AA"><p>Identify the Bluetooth device to be disconnected and provide a reason for the disconnect. </p> <codeblock id="GUID-994ED249-45D0-5519-8425-6C697FCEF60F" xml:space="preserve">TLMDisconnectACLBuf aclConnBuf;
f345bda72bc4 Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 3
diff changeset
    14
aclConnBuf().iDevAddr = devAddr; // devAddr is a TBTDevAddr
f345bda72bc4 Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 3
diff changeset
    15
aclConnBuf().iReason = 0x13; // Remote User Ended Connection
f345bda72bc4 Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 3
diff changeset
    16
TRequestStatus stat;</codeblock> </li> <li id="GUID-25D62E85-3017-5762-8545-7279B5B019A4"><p>Send <codeph>Ioctl</codeph> command to disconnect. </p> <codeblock id="GUID-98010DF4-BCE1-5165-A286-65E37C8BCDC9" xml:space="preserve">sock.Ioctl(KLMDisconnectACLIoctl, stat,  &amp;aclConnBuf, KSolBtLM);
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    17
User::WaitForRequest(stat);</codeblock> </li> </ol> </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-F8A5A2B6-E93D-5615-BC8E-FF8A4C54D30C"><p> <xref href="GUID-70339E6A-63CD-5A74-846C-50771FDAC763.dita">Listening for Incoming Bluetooth Connections</xref>  </p> </li> <li id="GUID-B2107098-26AA-5B59-AEBE-2D39363AEB8A"><p> <xref href="GUID-834BD3BB-B39C-5EE9-8A62-9DC435930F95.dita">Handling the Local Device Name</xref>  </p> </li> <li id="GUID-3D789CC2-B228-5710-8DA1-5C23DDEF4D27"><p> <xref href="GUID-FDA7B932-B9C6-502D-8699-C18C8D86BCC6.dita">Performing Low-level Configuration</xref>  </p> </li> <li id="GUID-D758F0E1-DBF4-5189-91EF-3D58E7F212EA"><p> <xref href="GUID-5C63EF5C-826D-5838-BB7E-12FF4EA1DFCE.dita">Debugging the Host Controller</xref>  </p> </li> <li id="GUID-7BE63877-6C7E-5F57-9E2F-D585AD3C6986"><p> <b>Disconnecting ACL links</b> - This document </p> </li> </ul> </section> </conbody></concept>