summaryrefslogtreecommitdiff
path: root/extmod/btstack/modbluetooth_btstack.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2020-04-05 15:31:53 +1000
committerDamien George <damien.p.george@gmail.com>2020-04-07 13:46:56 +1000
commit899e89d4c672c94cea794d5e3128e9cefce15382 (patch)
tree9735b5ff783d493eb841924c66d3bc239b3a75c1 /extmod/btstack/modbluetooth_btstack.c
parentfa285be9d7616a9035424fd568790420e159d130 (diff)
extmod/btstack: Pass through SCAN_RSP events.
The latest version of BTstack has a bug fixed so that it correctly configures scan parameters if they are set right after activating the stack. This means that BLE.gap_scan() will correctly set the scanning to passive and so SCAN_RSP events are not passed through, so we don't need to explicitly filter them in our bindings.
Diffstat (limited to 'extmod/btstack/modbluetooth_btstack.c')
-rw-r--r--extmod/btstack/modbluetooth_btstack.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/extmod/btstack/modbluetooth_btstack.c b/extmod/btstack/modbluetooth_btstack.c
index 84e1a85f3..c9cc0a886 100644
--- a/extmod/btstack/modbluetooth_btstack.c
+++ b/extmod/btstack/modbluetooth_btstack.c
@@ -115,10 +115,7 @@ STATIC void btstack_packet_handler(uint8_t packet_type, uint16_t channel, uint8_
int8_t rssi = gap_event_advertising_report_get_rssi(packet);
uint8_t length = gap_event_advertising_report_get_data_length(packet);
const uint8_t *data = gap_event_advertising_report_get_data(packet);
- // Emit an event for all advertising types except SCAN_RSP.
- if (adv_event_type < 4) {
- mp_bluetooth_gap_on_scan_result(address_type, address, adv_event_type, rssi, data, length);
- }
+ mp_bluetooth_gap_on_scan_result(address_type, address, adv_event_type, rssi, data, length);
} else if (event_type == HCI_EVENT_DISCONNECTION_COMPLETE) {
DEBUG_EVENT_printf(" --> hci disconnect complete\n");
uint16_t conn_handle = hci_event_disconnection_complete_get_connection_handle(packet);