ADC Home > Reference Library > Reference > Hardware & Drivers > Bluetooth > Bluetooth Framework Reference

 


IOBluetoothHostController

Inherits from:

NSObject

Declared In:

Overview

This class is a representation of a Bluetooth Host Controller Interface that is present on the local computer (either plugged in externally or available internally).

Discussion

This object can be used to ask a Bluetooth HCI for certain pieces of information, and be used to make it perform certain functions.



Methods

-addressAsString

Convience routine to get the HCI controller's Bluetooth address as an NSString object.

-classOfDevice

Gets the current class of device value.

+controllerWithDelegate

Gets the default HCI controller object.

+defaultController

Gets the default HCI controller object.

-delegate

Returns the current delegate, if any.

-getAddress:

Gets the HCI controller's Bluetooth address.

-getSupportedFeatures:

Get the HCI controller's supported features. See Bluetooth.h for a list of flags.

-name

Gets the "friendly" name of HCI controller.

-readLinkQualityForDevice:

Gets the RSSI value for a Bluetooth device.

-readRSSIForDevice

Gets the RSSI value for a Bluetooth device.

-readRSSIForDevice:

Gets the RSSI value for a Bluetooth device.

-setClassOfDevice:forTimeInterval:

Sets the current class of device value, for the specified amount of time. Note that the time interval *must* be set and valid. The range of acceptable values is 30-120 seconds. Anything above or below will be rounded up, or down, as appropriate.

-setDelegate:

Set the delegate that will receive delegate messages, as defined below.


addressAsString


Convience routine to get the HCI controller's Bluetooth address as an NSString object.

- (NSString *)addressAsString; 
Return Value

Returns NSString *. nil if the address could not be retrieved.


classOfDevice


Gets the current class of device value.

- (BluetoothClassOfDevice)classOfDevice; 
Return Value

Returns the current class of device value.


controllerWithDelegate


Gets the default HCI controller object.

See Also:

defaultController

+ (IOBluetoothHostController *)defaultController; 
Return Value

A pointer to the created IOBluetoothHostController object.


defaultController


Gets the default HCI controller object.

See Also:

controllerWithDelegate

+ (IOBluetoothHostController *)defaultController; 


delegate


Returns the current delegate, if any.

- (id)delegate; 
Return Value

Returns delegate object, otherwise returns nil.


getAddress:


Gets the HCI controller's Bluetooth address.

- (IOReturn)getAddress:(BluetoothDeviceAddress*)ioDeviceAddress; 
Parameters
sender

Pointer to a BluetoothDeviceAddress structure.

Return Value

Returns error, if there was one.


getSupportedFeatures:


Get the HCI controller's supported features. See Bluetooth.h for a list of flags.

- (IOReturn)getSupportedFeatures:(BluetoothHCISupportedFeatures*)features; 
Return Value

Returns error, if there was one.


name


Gets the "friendly" name of HCI controller.

- (NSString *)name; 
Return Value

Returns NSString with the device name, nil if there is not one or it cannot be read.


readLinkQualityForDevice:


Gets the RSSI value for a Bluetooth device.

See Also:

readRSSIForDevice

- (IOReturn)readLinkQualityForDevice:(IOBluetoothDevice*)device; 


readRSSIForDevice


Gets the RSSI value for a Bluetooth device.

See Also:

readLinkQualityForDevice:

- (IOReturn)readLinkQualityForDevice:(IOBluetoothDevice*)device; 
Return Value

Returns noErr if the command was successfully sent to the hardware. Results will be returned on the delegate method -linkQualityForDevice.


readRSSIForDevice:


Gets the RSSI value for a Bluetooth device.

- (IOReturn)readRSSIForDevice:(IOBluetoothDevice*)device; 
Return Value

Returns noErr if the command was successfully sent to the hardware. Results will be returned on the delegate method -RSSIForDevice.


setClassOfDevice:forTimeInterval:


Sets the current class of device value, for the specified amount of time. Note that the time interval *must* be set and valid. The range of acceptable values is 30-120 seconds. Anything above or below will be rounded up, or down, as appropriate.

- (IOReturn)setClassOfDevice:(BluetoothClassOfDevice)classOfDevice 
        forTimeInterval:(NSTimeInterval)seconds; 
Return Value

Returns the whether setting the class of device value was successful. 0 if success, error code otherwise.


setDelegate:


Set the delegate that will receive delegate messages, as defined below.

- (void)setDelegate:(id)delegate; 
Parameters
id

The object that should receive delegate messages.

Discussion

All delegate methods are optional, although it would be a good idea to implement them all.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.

 

Last Updated: 2008-08-07