summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/btstack/modbluetooth_btstack.c
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/btstack/modbluetooth_btstack.c')
-rw-r--r--extmod/btstack/modbluetooth_btstack.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/extmod/btstack/modbluetooth_btstack.c b/extmod/btstack/modbluetooth_btstack.c
index b44e2aacbb..0e29c38efd 100644
--- a/extmod/btstack/modbluetooth_btstack.c
+++ b/extmod/btstack/modbluetooth_btstack.c
@@ -693,6 +693,13 @@ int mp_bluetooth_init(void) {
gatt_client_listen_for_characteristic_value_updates(&MP_STATE_PORT(bluetooth_btstack_root_pointers)->notification, &btstack_packet_handler_generic, GATT_CLIENT_ANY_CONNECTION, NULL);
#endif // MICROPY_PY_BLUETOOTH_ENABLE_GATT_CLIENT
+ // Always include at least the standard GAP and GATT default services. A
+ // peripheral (likely a server) will almost always override this with its
+ // own services, but a central should get the default services, e.g. so
+ // the remote end can find out its GAP name.
+ mp_bluetooth_gatts_register_service_begin(false);
+ mp_bluetooth_gatts_register_service_end();
+
return 0;
}