Chapter 3 Terminal Specific Function Library
175
Pairing
With the information on nearby Bluetooth devices, the application can then try to pair with
any of the remote devices by calling
BTPairingTest()
.
BTPairingTest
Purpose
To pair with one Bluetooth device.
Syntax
int BTPairingTest (BTSearchInfo *Info, int TargetMachine);
Example
BTSearchInfo Info[4];
int Rst;
.........
Rst = BTInquiryDevice (&Info, 4);
if (Rst) {
printf ("Find %d devices in range", Result);
Rst = BTPairingTest (Info[0], BTSerialPort);
if (Rst) printf ("Pair OK");
else printf ("Pair Fail");
............
}
Description
This routine tries to pair with one Bluetooth device with matching type of
service (AP, SPP, or DUN) specified by
TargetMachine
.
Once pairing successfully, the MAC ID, PIN Code, and Link Key of this
remote device will be updated to the Frequent Device List.
The value of the parameter
TargetMachine
can be one of the following:
1
BTNetworkAccessPoint
3
BTSerialPort
4
BTDialUpNetworking
Return
If successful, it returns 1.
On error, it returns 0.
See Also
BTInquiryDevice
Summary of Contents for Optimus R
Page 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Page 6: ......
Page 8: ...2 C Programming Guide For Optimus S R...
Page 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Page 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Page 24: ...18 C Programming Guide For Optimus S R...
Page 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...