SWRU580 April   2021 CC2564C , CC2564MODA , CC2564MODN

 

  1.   Trademarks
  2. Introduction
  3. A2DP (AUD) Demo Guide
    1. 2.1 Demo Overview
    2. 2.2 Demo Application
    3. 2.3 Application Commands
  4. A3DP Sink Demo Guide
    1. 3.1 Demo Overview
    2. 3.2 Demo Application
    3. 3.3 Sink Reference Board Demo Application
    4. 3.4 Multiple Source Demo
    5. 3.5 Application Commands
  5. A3DP Source Demo Guide
    1. 4.1 Demo Overview
    2. 4.2 Demo Application
    3. 4.3 Application Commands
  6. HFP Demo Guide
    1. 5.1 Demo Overview
    2. 5.2 Demo Application
    3. 5.3 Application Commands
  7. HFP Audio Gateway Demo Guide
    1. 6.1 Demo Overview
    2. 6.2 Demo Application
    3. 6.3 Application Commands
  8. HID Demo Guide
    1. 7.1 Demo Overview
    2. 7.2 Demo Application
    3. 7.3 Application Commands
  9. HSP Demo Guide
    1. 8.1 Demo Overview
    2. 8.2 Demo Application
    3. 8.3 Application Command
  10. Map Demo Guide
    1. 9.1 Demo Overview
    2. 9.2 Demo Application
    3. 9.3 Application Command
  11. 10PBAP Demo Guide
    1. 10.1 Demo Overview
    2. 10.2 Demo Application
    3. 10.3 Application Commands
  12. 11SPP Demo Guide
    1. 11.1 Demo Overview
    2. 11.2 Demo Application
    3. 11.3 Application Commands
  13. 12SPPLE Demo Guide
    1. 12.1 Demo Overview
    2. 12.2 Demo Application
    3. 12.3 Demonstrating SPP LE on an iOS Device with the LightBlue App
    4. 12.4 Demonstrating SPP LE on an iOS Device with the SPPLE Transfer App - LEGACY
    5. 12.5 SPP Demo
    6. 12.6 Application Commands
  14. 13SPPDMMulti Demo Guide
    1. 13.1 Demo Overview
    2. 13.2 Demo Application
    3. 13.3 Application Commands
  15. 14ANP Demo Guide
    1. 14.1 Demo Overview
    2. 14.2 Demo Application
    3. 14.3 Application Commands
  16. 15HFP Demo Guide
    1. 15.1 Demo Overview
    2. 15.2 Demo Application
    3. 15.3 Application Commands
  17. 16HTP Demo Guide
    1. 16.1 Demo Overview
    2. 16.2 Demo Application
    3. 16.3 Application Commands
  18. 17PASP Demo Guide
    1. 17.1 Demo Overview
    2. 17.2 Demo Application
    3. 17.3 Application Commands
  19. 18HOGP Demo Guide
    1. 18.1 Demo Overview
    2. 18.2 Demo Application
    3. 18.3 Application Commands
  20. 19PXP Demo Guide
    1. 19.1 Demo Overview
    2. 19.2 Demo Application
    3. 19.3 Applications Commands
  21. 20FMP Demo Guide
    1. 20.1 Demo Overview
    2. 20.2 Demo Application
    3. 20.3 Application Commands
  22. 21CSCP Demo Guide
    1. 21.1 Demo Overview
    2. 21.2 Demo Application
    3. 21.3 Application Commands
  23. 22Revision History

Application Commands

Generic Access Profile Commands
Note: Reference the appendix for all Generic Access Profile Commands
Phone Book Access Profile Commands
Open (OpenServer)

Description

The following function is responsible for creating a local PBAP Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

The command only requires one parameter. This parameter is the Port Number.

Command Call Examples

"Open 1" Attempts to Open a PBA Port Server at Port Number #1".

Possible Return Values

(0)PBAP_Register_Server_SDP_Record

(-4) FUNCTION_ERROR

(-9) UNABLE_TO_REGISTER_SERVER

(-67) BTPS_ERROR_RFCOMM_NOT_INITIALIZED

(-85) BTPS_ERROR_SPP_NOT_INITIALIZED

(-1000) BTPBAP_ERROR_INVALID_PARAMETER

(-1001) BTPBAP_ERROR_NOT_INITIALIZED

(-1002) BTPBAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTPBAP_ERROR_LIBRARY_INITIALIZATION_ERROR

(-1004) BTPBAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTPBAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTPBAP_ERROR_ACTION_NOT_ALLOWED

API Call

PBAP_Open_Server_Port(BluetoothStackID, TempParam->Params[0].intParam, (PBAP_SUPPORTED_REPOSITORIES_LOCAL_PHONEBOOK), PBAP_Event_Callback_Server, 0)

API Prototype

int BTPSAPI PBAP_Open_Server_Port(unsigned int BluetoothStackID, unsigned int ServerPort, Byte_t SupportedRepositories, PBAP_Event_Callback_t EventCallback, unsigned long CallbackParameter)

Description of API

The following function is responsible for opening a local PBAP Server. The first parameter is the Bluetooth Stack ID on which to open the Server. The second parameter is the Port on which to open this Server, and *MUST* be between PBAP_PORT_NUMBER_MINIMUM and PBAP_PORT_NUMBER_MAXIMUM. The third parameter is a bitmask which determines which repositories are supported by this Server instance. The fourth parameter is the Callback function to call when an event occurs on this Server Port. The final parameter is a user-defined callback parameter that will be passed to the callback function with each event. This function returns a positive, non zero value if successful or a negative return error code if an error occurs. A successful return code will be a PBAP Profile ID that can be used to reference the Opened PBAP Profile Server Port in ALL other PBAP Server functions in this module. Once an PBAP Profile Server is opened, it can only be Un-Registered via a call to the PBAP_Close_Server() function (passing the return value from this function).


Close

Description

The following function is responsible for deleting a local PBAP Server that was created via a successful call to the OpenServer() function. This function returns zero if successful and a negative value if an error occurred.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the Server closing.

Possible Return Values

(0) Successfully Closed Server

(-4) FUNCTION_ERROR

(-2) BTPS_ERROR_INVALID_BLUETOOTH_STACK_ID

(-67) BTPS_ERROR_RFCOMM_NOT_INITIALIZED

(-85) BTPS_ERROR_SPP_NOT_INITIALIZED

(-1000) BTPBAP_ERROR_INVALID_PARAMETER

(-1001) BTPBAP_ERROR_NOT_INITIALIZED

(-1002) BTPBAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTPBAP_ERROR_LIBRARY_INITIALIZATION_ERROR

(-1004) BTPBAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTPBAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTPBAP_ERROR_ACTION_NOT_ALLOWED

API Call

PBAP_Close_Server_Port(BluetoothStackID, PBAPID);

API Prototype

int BTPSAPI PBAP_Close_Server_Port(unsigned int BluetoothStackID, unsigned int PBAPID)

Description of API

The following function is responsible for closing a PBAP Profile Server (which was opened by a successful call to the PBAP_Open_Server_Port() function). The first parameter is the Bluetooth Stack ID of the previously opened Server port. The second parameter is the PBAP ID returned from the previous call to PBAP_Open_Server_Port(). This function returns zero if successful, or a negative return error code if an error occurred (see BTERRORS.H). Note that this function does NOT delete any SDP Service Record Handles.


Client Commands
Open(OpenRemoteServer)

Description

The following function is responsible for initiating a connection with a Remote PBAP Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

The command takes two parameters to work. The first is the Inquiry Index which can be found using the DisplayInquiryList command after an Inquiry has been completed. The second is the RFCOMM Server Port which will be used to open a Remote PBAP Port.

Command Call Examples

"Open 12 4" Attempts to Open a Remote PhoneBook Port Server with the Remote Bluetooth Device whose address is found at the twelfth Inquiry Index using RFCOMM Server Port #4."

"Open 1 1" Attempts to Open a Remote PhoneBook Port Server with the Remote Bluetooth Device whose address is found at the first Inquiry Index using RFCOMM Server Port #1."

"Open 19 3" Attempts to Open a Remote PhoneBook Port Server with the Remote Bluetooth Device whose address is found at the nineteenth Inquiry Index using RFCOMM Server Port #3. "

Possible Return Values

(0) PBAP_Open_Remote_Server_Port: Function Successful

(-67) BTPS_ERROR_RFCOMM_NOT_INITIALIZED

(-72) BTPS_ERROR_RFCOMM_UNABLE_TO_CONNECT_TO_REMOTE_DEVICE

(-73) BTPS_ERROR_RFCOMM_UNABLE_TO_COMMUNICATE_WITH_REMOTE_DEVICE

(-85) BTPS_ERROR_SPP_NOT_INITIALIZED

(-1000) BTPBAP_ERROR_INVALID_PARAMETER

(-1001) BTPBAP_ERROR_NOT_INITIALIZED

(-1002) BTPBAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTPBAP_ERROR_LIBRARY_INITIALIZATION_ERROR

(-1004) BTPBAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTPBAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTPBAP_ERROR_ACTION_NOT_ALLOWED

API Call

PBAP_Open_Remote_Server_Port(BluetoothStackID, InquiryResultList[(TempParam->Params[0].intParam-1)], TempParam->Params[1].intParam, PBAP_Event_Callback_Client, 0);

API Prototype

int BTPSAPI PBAP_Open_Remote_Server_Port(unsigned int BluetoothStackID, BD_ADDR_t BD_ADDR, unsigned int ServerPort, PBAP_Event_Callback_t EventCallback, unsigned long CallbackParameter)

Description of API

The following function is responsible for opening a connection to a remote PBAP Server. The first parameter is the Bluetooth Stack ID of the local Bluetooth stack. The second parameter is the remote Bluetooth Device Address of the Bluetooth PBAP Profile Server with which to connect. The third parameter specifies the remote Server port with which to connect. The final two parameters specify the PBAP Profile Event Callback Function and the Callback Parameter to associate with this PBAP Profile Client. The ServerPort parameter *MUST* be between PBAP_PORT_NUMBER_MINIMUM and PBAP_PORT_NUMBER_MAXIMUM. This function returns a positive, non zero, value if successful or a negative return error code if an error occurs. A successful return code will be a PBAP ID that can be used to reference the remote opened PBAP Profile Server in ALL other PBAP Profile Client functions in this module. Once a remote Server is opened, it can only be closed via a call to the PBAP_Close_Connection() function (passing the return value from this function).


Close(CloseConnection)

Description

The following function is responsible for terminating a connection with a remote PBAP Client or Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the Server closing.

Possible Return Values

(0) PBAP_Open_Remote_Server_Port: Function Successful

(-4) FUNCTION_ERROR

(-67) BTPS_ERROR_RFCOMM_NOT_INITIALIZED

(-73) BTPS_ERROR_RFCOMM_UNABLE_TO_COMMUNICATE_WITH_REMOTE_DEVICE

(-85) BTPS_ERROR_SPP_NOT_INITIALIZED

(-1000) BTPBAP_ERROR_INVALID_PARAMETER

(-1001) BTPBAP_ERROR_NOT_INITIALIZED

(-1002) BTPBAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTPBAP_ERROR_LIBRARY_INITIALIZATION_ERROR

(-1004) BTPBAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTPBAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTPBAP_ERROR_ACTION_NOT_ALLOWED

API Call

PBAP_Close_Connection(BluetoothStackID, PBAPID);

API Prototype

BTPSAPI PBAP_Close_Connection(unsigned int BluetoothStackID, unsigned int PBAPID)

Description of API

The following function is responsible for closing a currently ongoing PBAP Profile connection. The first parameter is the Bluetooth Stack ID of the Bluetooth Protocol Stack Instance that is associated with the PBAP Profile connection being closed. The second parameter to this function is the PBAP ID of the PBAP Profile connection to be closed. This function returns zero if successful, or a negative return value if there was an error.

Note: If this function is called with a Server PBAP ID (a value returned from a call to PBAP_Open_Server_Port()) any clients currently connected to this Server will be terminated, but the Server will remained open and registered. If this function is called using a Client PBAP ID (a value returned from a call to PBAP_Open_Remote_Server_Port()), the Client connection will be terminated/closed entirely.

OBEXDisconnect

Description

The following function is responsible for terminating a connection with a remote PBAP Server by issuing an OBEX Disconnect. This function returns zero if successful and a negative value if an error occurred.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the Server closing.

Possible Return Values

(0) PBAP_Disconnect_Request: Function Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-73) BTPS_ERROR_RFCOMM_UNABLE_TO_COMMUNICATE_WITH_REMOTE_DEVICE

(-1000) BTPBAP_ERROR_INVALID_PARAMETER

(-1001) BTPBAP_ERROR_NOT_INITIALIZED

(-1002) BTPBAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTPBAP_ERROR_LIBRARY_INITIALIZATION_ERROR

(-1004) BTPBAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTPBAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTPBAP_ERROR_ACTION_NOT_ALLOWED

API Call

PBAP_Disconnect_Request(BluetoothStackID, PBAPID);

API Prototype

int BTPSAPI PBAP_Disconnect_Request(unsigned int BluetoothStackID, unsigned int PBAPID)

Description of API

The following function is responsible for sending an Disconnect Request to the remote device/entity. The first parameter to this function is the Bluetooth Stack ID of the Bluetooth Protocol Stack Instance that is associated with the PBAP Profile connection being disconnected. The second parameter to this function is the PBAP ID of the PBAP Profile connection to be disconnected (that was returned by a call to PBAP_Open_Remote_Server_Port()). This function returns zero if successful, or a negative return value if there was an error.

Note: Use of this function is optional and is provided for full compliance with some OBEX applications. Calling the PBAP_Close_Connection() function will achieve the same results without sending the OBEX disconnect packet beforehand. If is also possible to call this function and then immediately call PBAP_Close_Connection() without waiting for a confirmation because a Disconnect Request cannot be failed. Calling this function by itself and waiting for a response will cause the underlying connection to automatically be closed once the response is received. This will generate a Close Port Indication.

PullPhonebook

Description

The following function is responsible for issuing a PBAP Pull Phonebook Request with a remote PBAP Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

The command requires 3 parameters, the Max List Count, the List Start Offset and the Phonebook Path.

Command Call Examples

"PullPhonebook 65535 0 telecom/pb.vcf has 65535 as the Max List Count, 0 as the List Start Offset and telecom/pb.vcf as the Phonebook Path.

Possible Return Values

(0) PBAP_Pull_Phonebook_Request: Function Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTPBAP_ERROR_INVALID_PARAMETER

(-1001) BTPBAP_ERROR_NOT_INITIALIZED

(-1002) BTPBAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTPBAP_ERROR_LIBRARY_INITIALIZATION_ERROR

(-1004) BTPBAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTPBAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTPBAP_ERROR_ACTION_NOT_ALLOWED

API Call

PBAP_Set_Phonebook_Request(BluetoothStackID, PBAPID, (PBAP_Set_Path_Option_t)TempParam->Params[0].intParam, TempParam->Params[1].strParam);

API Prototype

int BTPSAPI PBAP_Pull_Phonebook_Request(unsigned int BluetoothStackID, unsigned int PBAPID, char *ObjectName, DWord_t FilterLow, DWord_t FilterHigh, PBAP_Format_t Format, Word_t MaxListCount, Word_t ListStartOffset)

Description of API

The following function generates a PBAP Pull Phonebook Request to the specified remote PBAP Server. The BluetoothStackID parameter the ID of the Bluetooth Stack that is associated with this PBAP Client. The PBAPID parameter specifies the PBAP ID for the local PBAP Client (returned from a successful call to the PBAP_Connect_Remote_Server_Port() function). The ObjectName parameter contains the Name/Path of the Phonebook being requested by this Pull Phonebook operation. The FilterLow parameter contains the lower 32 bits of the 64-bit filter attribute. The FilterHigh parameter contains the higher 32 bits of the 64-bit filter attribute. The Format parameter is an enumeration which specifies the vCard format requested in this Pull Phonebook request. If pfDefault is specified then the format will not be included in the request (note that the Server will default to pfvCard21 in this case). The MaxListCount parameter is an unsigned integer that specifies the maximum number of entries the Client can handle. A value of 65535 means that the number of entries is not restricted. A MaxListCount of ZERO (0) indicates that this is a request for the number of used indexes in the Phonebook specified by the ObjectName parameter. The ListStartOffset parameter specifies the index requested by the Client in this PullPhonebookRequest. This function returns zero if successful or a negative return error code if there was an error.

Note: A successful return code does not mean that the remote PBAP Profile Server successfully processed the command. The caller needs to check the confirmation result to determine if the remote PBAP Profile Server successfully executed the Request. There can only be one outstanding PBAP Profile Request active at any one time. Because of this, another PBAP Profile Request cannot be issued until either the current request is Aborted (by calling the PBAP_Abort_Request() function) or the current Request is completed (this is signified by receiving a Confirmation Event in the PBAP Profile Event Callback that was registered when the PBAP Profile Port was opened).

SetPhonebook

Description

The following function is responsible for issuing a PBAP Set Phonebook Request with a remote PBAP Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

This functions requires two parameters; the path change requested and the path name. E.g If down is selected as the path option then we require an additional paramters which is the path.

Command Call Examples

"SetPhonebook 1 telecom goes down a level to the telecom folder.

Possible Return Values

(0) PBAP_Set_Phonebook_Request: Function Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTPBAP_ERROR_INVALID_PARAMETER

(-1001) BTPBAP_ERROR_NOT_INITIALIZED

(-1002) BTPBAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTPBAP_ERROR_LIBRARY_INITIALIZATION_ERROR

(-1004) BTPBAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTPBAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTPBAP_ERROR_ACTION_NOT_ALLOWED

API Call

PBAP_Set_Phonebook_Request(BluetoothStackID, PBAPID, (PBAP_Set_Path_Option_t)TempParam->Params[0].intParam, TempParam->Params[1].strParam);

API Prototype

int BTPSAPI PBAP_Set_Phonebook_Request(unsigned int BluetoothStackID, unsigned int PBAPID, PBAP_Set_Path_Option_t PathOption, char *ObjectName)

Description of API

The following function generates a PBAP Set Phonebook Request to the specified remote PBAP Server. The BluetoothStackID parameter the ID of the Bluetooth Stack that is associated with this PBAP Client. The PBAPID parameter specifies the PBAP ID for the local PBAP Client (returned from a successful call to the PBAP_Connect_Remote_Server_Port() function). The PathOption parameter contains an enumerated value that indicates the type of path change to request. The ObjectName parameter contains the folder name to include with this Set Phonebook request. This value can be NULL if no name is required for the selected PathOption. See the PBAP specification for more information. This function returns zero if successful or a negative return error code if there was an error.

Note: A successful return code does not mean that the remote PBAP Profile Server successfully processed the command. The caller needs to check the confirmation result to determine if the remote PBAP Profile Server successfully executed the Request. There can only be one outstanding PBAP Profile Request active at any one time. Because of this, another PBAP Profile Request cannot be issued until either the current request is Aborted (by calling the PBAP_Abort_Request() function) or the current Request is completed (this is signified by receiving a Confirmation Event in the PBAP Profile Event Callback that was registered when the PBAP Profile Port was opened).

PullvCardList

Description

The following function is responsible for issuing a PBAP Pull vCARD Listing Request with a remote PBAP Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

The command requires 3 parameters, the Max List Count, the List Start Offset and the Phonebook Path.

Command Call Examples

"PullPhonebook 65535 0 pb has 65535 as the Max List Count, 0 as the List Start Offset and pb as the Phonebook Path. "

Possible Return Values

(0) PBAP_Pull_vCard_Listing_Request: Function Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTPBAP_ERROR_INVALID_PARAMETER

(-1001) BTPBAP_ERROR_NOT_INITIALIZED

(-1002) BTPBAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTPBAP_ERROR_LIBRARY_INITIALIZATION_ERROR

(-1004) BTPBAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTPBAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTPBAP_ERROR_ACTION_NOT_ALLOWED

API Call

PBAP_Pull_vCard_Listing_Request(BluetoothStackID, PBAPID, Phonebook, loDefault, saDefault, NULL, (Word_t)TempParam->Params[0].intParam, (Word_t)TempParam->Params[1].intParam);

API Prototype

int BTPSAPI PBAP_Pull_vCard_Listing_Request(unsigned int BluetoothStackID, unsigned int PBAPID, char *ObjectName, PBAP_List_Order_t ListOrder, PBAP_Search_Attribute_t SearchAttribute, char *SearchValue, Word_t MaxListCount, Word_t ListStartOffset)

Description of API

The following function generates a PBAP Pull vCard Listing Request to the specified remote PBAP Server. The BluetoothStackID parameter the ID of the Bluetooth Stack that is associated with this PBAP Client. The PBAPID parameter specifies the PBAP ID for the local PBAP Client (returned from a successful call to the PBAP_Connect_Remote_Server_Port() function). The ObjectName parameter contains the folder of the Phonebook being requested by this Pull vCard Listing operation. This value can be NULL if a PhonebookSize request is being performed. The ListOrder parameter is an enumerated type that determines the optionally requested order of the listing. Using the 'loDefault' value for this parameter will prevent this field from being added to the request (note that the Server will default to loIndexed in this case). The SearchAttribute is an enumerated type that determines the optionally requested attribute used to filter this request. Using the 'saDefault' value for this parameter will prevent this field from being added to the request (note that the Server will default to saIndexed in this case). The SearchValue parameter contains an optional ASCII, Null-terminated character string that contains the string requested for search/filter. If this parameter is NULL, this field will be excluded from the request. The MaxListCount parameter is an unsigned integer that specifies the maximum number of list entries the Client can handle. A value of 65535 means that the number of entries is not restricted. A MaxListCount of ZERO (0) indicates that this is a request for the number of used indexes in the Phonebook specified by the ObjectName parameter. The ListStartOffset parameter specifies the index requested by the Client in this Pull vCard Listing. This function returns zero if successful or a negative return error code if there was an error.

Note: A successful return code does not mean that the remote PBAP Profile Server successfully processed the command. The caller needs to check the confirmation result to determine if the remote PBAP Profile Server successfully executed the Request. There can only be one outstanding PBAP Profile Request active at any one time. Because of this, another PBAP Profile Request cannot be issued until either the current request is Aborted (by calling the PBAP_Abort_Request() function) or the current Request is completed (this is signified by receiving a Confirmation Event in the PBAP Profile Event Callback that was registered when the PBAP Profile Port was opened).

PullvCARDEntry

Description

The following function is responsible for issuing a PBAP Pull vCARD Entry Request with a remote PBAP Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

This function requires only one parameters, the vCard Name.

Command Call Examples

"PullvCARDEntry 0.vcf pulls the vcf file named 0."

Possible Return Values

(0) PBAP_Pull_vCard_Entry_Request: Function Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTPBAP_ERROR_INVALID_PARAMETER

(-1001) BTPBAP_ERROR_NOT_INITIALIZED

(-1002) BTPBAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTPBAP_ERROR_LIBRARY_INITIALIZATION_ERROR

(-1004) BTPBAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTPBAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTPBAP_ERROR_ACTION_NOT_ALLOWED

API Call

PBAP_Pull_vCard_Entry_Request(BluetoothStackID, PBAPID, TempParam->Params[0].strParam, 0, 0, pfvCard21);

API Prototype

int BTPSAPI PBAP_Pull_vCard_Entry_Request(unsigned int BluetoothStackID, unsigned int PBAPID, char *ObjectName, DWord_t FilterLow, DWord_t FilterHigh, PBAP_Format_t Format)

Description of API

The following function generates a PBAP Pull vCard Entry Request to the specified remote PBAP Server. The BluetoothStackID parameter the ID of the Bluetooth Stack that is associated with this PBAP Client. The PBAPID parameter specifies the PBAP ID for the local PBAP Client (returned from a successful call to the PBAP_Connect_Remote_Server_Port() function). The ObjectName parameter contains the name of the Phonebook entry being requested by this Pull vCard Entry operation. The FilterLow parameter contains the lower 32 bits of the 64-bit filter attribute. The FilterHigh parameter contains the higher 32 bits of the 64-bit filter attribute. The Format parameter is an enumeration which specifies the vCard format requested in this Pull vCard Entry request. If pfDefault is specified then the format will not be included in the request (note that in this case the Server will default to pfvCard21 in this case). This function returns zero if successful or a negative return error code if there was an error.

Note: A successful return code does not mean that the remote PBAP Profile Server successfully processed the command. The caller needs to check the confirmation result to determine if the remote PBAP Profile Server successfully executed the Request. There can only be one outstanding PBAP Profile Request active at any one time. Because of this, another PBAP Profile Request cannot be issued until either the current request is Aborted (by calling the PBAP_Abort_Request()function) or the current Request is completed (this is signified by receiving a Confirmation Event in the PBAP Profile Event Callback that was registered when the PBAP Profile Port was opened).

Abort

Description

The following function is responsible for issuing an Abort with a remote PBAP Server by issuing an OBEX Abort Command. This function returns zero if successful and a negative value if an error occurred.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the Server closing.

Possible Return Values

(0) PBAP_Abort_Request: Function Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-1000) BTPBAP_ERROR_INVALID_PARAMETER

(-1001) BTPBAP_ERROR_NOT_INITIALIZED

(-1002) BTPBAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTPBAP_ERROR_LIBRARY_INITIALIZATION_ERROR

(-1004) BTPBAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTPBAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTPBAP_ERROR_ACTION_NOT_ALLOWED

API Call

PBAP_Abort_Request(BluetoothStackID, PBAPID);

API Prototype

int BTPSAPI PBAP_Abort_Request(unsigned int BluetoothStackID, unsigned int PBAPID)

Description of API

The following function is responsible for Aborting ANY currently outstanding PBAP Profile Client Request. The first parameter is the Bluetooth Stack ID of the Bluetooth Stack for which the PBAP Profile Client is valid. The second parameter to this function specifies the PBAP ID (returned from a successful call to the PBAP_Open_Remote_Server_Port() function). This function returns zero if successful, or a negative return error code if there was an error.

Note: There can only be one outstanding PBAP Profile Request active at any one time. Because of this, another PBAP Profile Request cannot be issued until either the current request is Aborted (by calling the PBAP_Abort_Request() function) or the current Request is completed (this is signified by receiving a Confirmation Event in the PBAP Profile Event Callback that was registered when the PBAP Profile Port was opened). Because of transmission latencies, it may be possible that a PBAP Profile Client Request that is to be aborted may have completed before the Server was able to Abort the request. In either case, the caller will be notified via PBAP Profile Callback of the status of the previous Request.