A link layer level ioctl 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.
The TLMDisconnectACLIoctl structure contains the device address of the remote device to be disconnected and the reason code to be supplied during the disconnection.
To directly disconnect individual Bluetooth ACL links:
Create a TLMDisconnectACLBuf 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.
Call the KLMDisconnectACLIoctl ioctl on the socket with the link manager level KSolBtLM , passing the package buffer.
Example: Disconnecting ACL links
Here is a simple disconnect example.
Starting with an open socket
Identify the Bluetooth device to be disconnected and provide a reason for the disconnect.
Send Ioctl command to disconnect.
This tutorial set takes you through all the steps involved in setting up and communicating over a Bluetooth connection.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.