Skip to content

Commit

Permalink
Merge branch 'bugfix/btdm_err_data_report' into 'master'
Browse files Browse the repository at this point in the history
component/bt: bugfix for erroneous data reporting always enabled

See merge request idf/esp-idf!2709
  • Loading branch information
jack0c committed Jul 11, 2018
2 parents 7937d08 + 1ade9a3 commit 1b1477d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
3 changes: 3 additions & 0 deletions components/bt/bluedroid/device/controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ static void start_up(void)
#if (BTM_SCO_HCI_INCLUDED == TRUE)
response = AWAIT_COMMAND(packet_factory->make_write_sync_flow_control_enable(1));
packet_parser->parse_generic_command_complete(response);

response = AWAIT_COMMAND(packet_factory->make_write_default_erroneous_data_report(1));
packet_parser->parse_generic_command_complete(response);
#endif
readable = true;
// return future_new_immediate(FUTURE_SUCCESS);
Expand Down
13 changes: 12 additions & 1 deletion components/bt/bluedroid/hci/hci_packet_factory.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,16 @@ static BT_HDR *make_write_sync_flow_control_enable(uint8_t enable)
UINT8_TO_STREAM(stream, enable);
return packet;
}

static BT_HDR *make_write_default_erroneous_data_report(uint8_t enable)
{
uint8_t *stream;
const uint8_t parameter_size = 1;
BT_HDR *packet = make_command(HCI_WRITE_ERRONEOUS_DATA_RPT, parameter_size, &stream);

UINT8_TO_STREAM(stream, enable);
return packet;
}
// Internal functions

static BT_HDR *make_command_no_params(uint16_t opcode)
Expand Down Expand Up @@ -248,7 +258,8 @@ static const hci_packet_factory_t interface = {
make_ble_read_suggested_default_data_length,
make_ble_write_suggested_default_data_length,
make_ble_set_event_mask,
make_write_sync_flow_control_enable
make_write_sync_flow_control_enable,
make_write_default_erroneous_data_report,
};

const hci_packet_factory_t *hci_packet_factory_get_interface()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ typedef struct {
BT_HDR *(*make_ble_write_suggested_default_data_length)(uint16_t SuggestedMaxTxOctets, uint16_t SuggestedMaxTxTime);
BT_HDR *(*make_ble_set_event_mask)(const bt_event_mask_t *event_mask);
BT_HDR *(*make_write_sync_flow_control_enable)(uint8_t enable);
BT_HDR *(*make_write_default_erroneous_data_report)(uint8_t enable);
} hci_packet_factory_t;

const hci_packet_factory_t *hci_packet_factory_get_interface();
Expand Down
2 changes: 1 addition & 1 deletion components/bt/lib
Submodule lib updated 1 files
+ libbtdm_app.a

0 comments on commit 1b1477d

Please sign in to comment.