extmod/btstack/modbluetooth_btstack: Add default services.
Even if the user doesn't call ble.gatts_register_services, always provide the default services. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
parent
a42a8022d8
commit
67fb0beddb
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user