SWRA769 august 2023 CC2564C
The following function is responsible for opening an Audio Gateway client port. This function returns zero on successful execution and a negative value on all errors.
The command requires two parameter. first parameter is the Inquiry Index and the second is the remote device Port Number.
HFRE_Open_Remote_Hands-free_Port(BluetoothStackID, InquiryResultList[(TempParam->Params[0].intParam-1)], TempParam->Params[1].intParam, Hands-free Profile Commands, ServiceDiscovery, OpenAudioGatewayClient, DEFAULT_AG_SUPPORTED_FEATURES, DEFAULT_CALL_HOLDING_SUPPORT, 0, NULL, HFRE_Event_Callback, (unsigned long)0)
BTPSAPI_DECLARATION int BTPSAPI HFRE_Open_Remote_Hands-free_Port(unsigned int BluetoothStackID, BD_ADDR_t BD_ADDR, unsigned int RemoteServerPort, unsignedlong SupportedFeaturesMask, unsigned long CallHoldSupportMask, unsigned int NumberAdditionalIndicators, HFRE_Control_Indicator_Entry_t AdditionalSupportedIndicators[],HFRE_Event_Callback_t EventCallback, unsigned long CallbackParameter)
The following function is responsible for Opening a Remote Hands-Free Port on the specified Remote Device. This function accepts the Bluetooth Stack ID of the Bluetooth Stack whichis to open the HFRE Connection as the first parameter. The second parameter specifies the Board Address (NON NULL) of the Remote Bluetooth Device to connect with. The thirdparameter specifies the features the local Audio Gateway supports. The next parameter is a bit mask which specifies the Call Hold and Multiparty Handling Features that are supported.The fifth parameter to this function is the number of indicator names which appear in the list represented by the previous parameter. The next parameter is a list of additional indicatorsin which this Audio Gateway supports. If the Additional Indicators parameter is NULL and Number Additional Indicators is zero no additional parameters is supported. The finaltwo parameters specify the HFRE Event Callback function, and callback parameter, respectively, of the HFRE Event Callback that is to process any further interaction with the specifiedRemote Port (Opening Status, Close Status,etc). This function returns a non-zero, positive, value if successful, or a negative return error code if this function is unsuccessful. If thisfunction is successful, the return value represents the HFRE Port ID that can be passed to all other functions that require it. Once a Remote Hands-Free unit is opened, it can only beclosed via a call to the HFRE_Close_Port() function (passing the return value from this function).