mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-18 05:42:49 +00:00
hfp_hf: send HF Indicator update only if enabled by AG
This commit is contained in:
parent
745e7a2fc2
commit
4431fb7a03
@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
- HIOS Client: emit disconnected event on HCI disconnect and free connection struct
|
- HIOS Client: emit disconnected event on HCI disconnect and free connection struct
|
||||||
- Scan Parameter Service Client: emit disconnected event on HCI disconnect and free connection struct
|
- Scan Parameter Service Client: emit disconnected event on HCI disconnect and free connection struct
|
||||||
- PBAP Client: fix PBAP_SUBEVENT_OPERATION_COMPLETED with OBEX_DISCONNECTED for pbap_disconnect
|
- PBAP Client: fix PBAP_SUBEVENT_OPERATION_COMPLETED with OBEX_DISCONNECTED for pbap_disconnect
|
||||||
|
- HFP HF: send HF Indicator update only if enabled by AG
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- GAP: return command disallowed if disconnect already requested
|
- GAP: return command disallowed if disconnect already requested
|
||||||
|
@ -1116,6 +1116,15 @@ void hfp_handle_rfcomm_event(uint8_t packet_type, uint16_t channel, uint8_t *pac
|
|||||||
bd_addr_copy(hfp_connection->remote_addr, event_addr);
|
bd_addr_copy(hfp_connection->remote_addr, event_addr);
|
||||||
hfp_connection->state = HFP_EXCHANGE_SUPPORTED_FEATURES;
|
hfp_connection->state = HFP_EXCHANGE_SUPPORTED_FEATURES;
|
||||||
|
|
||||||
|
if (local_role == HFP_ROLE_HF) {
|
||||||
|
// setup HF Indicators
|
||||||
|
uint8_t i;
|
||||||
|
for (i=0; i < hfp_hf_indicators_nr; i++){
|
||||||
|
hfp_connection->generic_status_indicators[i].uuid = hfp_hf_indicators[i];
|
||||||
|
hfp_connection->generic_status_indicators[i].state = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rfcomm_request_can_send_now_event(hfp_connection->rfcomm_cid);
|
rfcomm_request_can_send_now_event(hfp_connection->rfcomm_cid);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1893,15 +1902,6 @@ uint8_t hfp_establish_service_level_connection(bd_addr_t bd_addr, uint16_t servi
|
|||||||
bd_addr_copy(connection->remote_addr, bd_addr);
|
bd_addr_copy(connection->remote_addr, bd_addr);
|
||||||
connection->service_uuid = service_uuid;
|
connection->service_uuid = service_uuid;
|
||||||
|
|
||||||
if (local_role == HFP_ROLE_HF) {
|
|
||||||
// setup HF Indicators
|
|
||||||
uint8_t i;
|
|
||||||
for (i=0; i < hfp_hf_indicators_nr; i++){
|
|
||||||
connection->generic_status_indicators[i].uuid = hfp_hf_indicators[i];
|
|
||||||
connection->generic_status_indicators[i].state = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hfp_sdp_query_request.callback = &hfp_handle_start_sdp_client_query;
|
hfp_sdp_query_request.callback = &hfp_handle_start_sdp_client_query;
|
||||||
// ignore ERROR_CODE_COMMAND_DISALLOWED because in that case, we already have requested an SDP callback
|
// ignore ERROR_CODE_COMMAND_DISALLOWED because in that case, we already have requested an SDP callback
|
||||||
(void) sdp_client_register_query_callback(&hfp_sdp_query_request);
|
(void) sdp_client_register_query_callback(&hfp_sdp_query_request);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user