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

RegisterIAS

Description

This function is responsible for registering a IAS Service. This function will return zero on successful execution and a negative value on errors.

Parameters

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

Possible Return Values

0) Successfully registered PASP Service

(-4) FUNCTION_ERROR

(-1000)IAS_ERROR_INVALID_PARAMETER

(-1002)IAS_ERROR_INSUFFICIENT_RESOURCES

(-1003)IAS_ERROR_SERVICE_ALREADY_REGISTERED

API Call

IAS_Initialize_Service(BluetoothStackID,IAS_EventCallback,0,&IASInstanceID)

API Prototype

int BTPSAPI IAS_Initialize_Service(unsigned int BluetoothStackID, IAS_Event_Callback_t EventCallback, unsigned long CallbackParameter, unsigned int *ServiceID)

Description of API

The following function is responsible for opening a IAS Server. The first parameter is the Bluetooth Stack ID on which to open the Server. The second parameter is the Callback function to call when an event occurs on this Server Port. The third parameter is a user-defined callback parameter that will be passed to the callback function with each event. The final parameter is a pointer to store the GATT Service ID of the registered IAS service. This can be used to include the service registered by this call. This function returns the positive, non-zero, Instance ID or a negative error code.

Note: Only 1 IAS may be open at a time, per Bluetooth Stack ID. All Client Requests will be dispatch to the EventCallback function that is specified by the second parameter to this function.

UnRegisterIAS

Description

This function is responsible for unregistering a IAS Service. This function will return zero on successful execution and a negative value on errors.

Parameters

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

Possible Return Values

(0) Successfully registered PASP Service

(-4) FUNCTION_ERROR

(-1000)IAS_ERROR_INVALID_PARAMETER

(-1004)IAS_ERROR_INVALID_INSTANCE_ID

API Call

IAS_Cleanup_Service(BluetoothStackID, IASInstanceID)

API Prototype

int BTPSAPI IAS_Cleanup_Service(unsigned int BluetoothStackID, unsigned int InstanceID)

Description of API

The following function is responsible for closing a previously IAS Server. The first parameter is the Bluetooth Stack ID on which to close the Server. The second parameter is the InstanceID that was returned from a successful call to IAS_Initialize_Service(). This function returns a zero if successful or a negative return error code if an error occurs.


DiscoverIAS

Description

This function is responsible for performing a IAS Service Discovery Operation. This function will return zero on successful execution and a negative value on errors.

Parameters

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

Possible Return Values

(0) GDIS_Service_Discovery_Start success

(-4) Function_Error

(-1000)GDIS_ERROR_INVALID_PARAMETER

(-1001)GDIS_ERROR_NOT_INITIALIZED

(-1002)GDIS_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003)GDIS_ERROR_INSUFFICIENT_RESOURCES

(-1009)GDIS_ERROR_SERVICE_DISCOVERY_OUTSTANDING

API Call

GATT_Start_Service_Discovery(BluetoothStackID, ConnectionID, (sizeof(UUID)/sizeof(GATT_UUID_t)), UUID, GATT_Service_Discovery_Event_Callback, sdIAS)

API Prototype

int BTPSAPI GDIS_Service_Discovery_Start(unsigned int BluetoothStackID, unsigned int ConnectionID, unsigned int NumberOfUUID, GATT_UUID_t *UUIDList, GDIS_Event_Callback_t ServiceDiscoveryCallback, unsigned long ServiceDiscoveryCallbackParameter)

Description of API

The following function is used to initiate the Service Discovery process or queue additional requests. The function takes as its first parameter the BluetoothStackID that is associated with the Bluetooth Device. The second parameter is the connection ID of the remote device that is to be searched. The third and fourth parameters specify an optional list of UUIDs to search for. The final two parameters define the Callback function and parameter to use when the service discovery is complete. The function returns zero on success and a negative return value if there was an error.


ConfigureAlertLevel

Description

The following function is responsible for writing the Alert Level Control Point to connected remote device. It can be executed only by a Client. This function will return zero on successful execution and a negative value on errors.

Parameters

SetRingerSetting has only one parameter which is an integer value that represents the Alert Level. This value is 0 = cpNoAlert, 1 = cpMildAlert, 2 = cpHighAlert.

Possible Return Values

(0) Ringer Setting successfully set

(-4) FUNCTION_ERROR

(-1000)IAS_ERROR_INVALID_PARAMETER

(-1003)IAS_ERROR_SERVICE_ALREADY_REGISTERED

(-1004)IAS_ERROR_INVALID_INSTANCE_ID

(-1005)IAS_ERROR_MALFORMATTED_DATA

API Call

GATT_Write_Without_Response_Request(BluetoothStackID, ConnectionID, DeviceInfo->IAS_ClientInfo.Control_Point, IAS_ALERT_LEVEL_CONTROL_POINT_VALUE_LENGTH, ((void *)Buffer))

API Prototype

int BTPSAPI GATT_Write_Without_Response_Request(unsigned int BluetoothStackID, unsigned int ConnectionID, Word_t AttributeHandle, Word_t AttributeLength, void *AttributeValue)

Description of API

The following function is provided to allow a means of performing a write without response request to remote device for a specified attribute. The first parameter to this function is the Bluetooth stack ID of the local Bluetooth stack, followed by the connection ID of the connected remote device, followed by the handle of the attribute to write, followed by the length of the value data to write (in bytes), followed by the actual value to write. This function will return the number of bytes written on success or a negative error code.