diff --git a/examples/bluetooth/nimble/ble_chan_sound_initiator/main/gatt_svr.c b/examples/bluetooth/nimble/ble_chan_sound_initiator/main/gatt_svr.c index 168d0035c79..2f06346da8c 100644 --- a/examples/bluetooth/nimble/ble_chan_sound_initiator/main/gatt_svr.c +++ b/examples/bluetooth/nimble/ble_chan_sound_initiator/main/gatt_svr.c @@ -31,7 +31,8 @@ gatt_svr_init(void) #if MYNEWT_VAL(BLE_GATTS) ble_svc_gatt_init(); #endif +#if MYNEWT_VAL(BLE_GATTS) && CONFIG_BT_NIMBLE_RAS_SERVICE ble_svc_ras_init(); - +#endif return 0; } diff --git a/examples/bluetooth/nimble/ble_chan_sound_reflector/main/gatt_svr.c b/examples/bluetooth/nimble/ble_chan_sound_reflector/main/gatt_svr.c index fdadd4c2aa7..f559b1d6f34 100644 --- a/examples/bluetooth/nimble/ble_chan_sound_reflector/main/gatt_svr.c +++ b/examples/bluetooth/nimble/ble_chan_sound_reflector/main/gatt_svr.c @@ -31,7 +31,8 @@ custom_gatt_svr_init(void) #if MYNEWT_VAL(BLE_GATTS) ble_svc_gatt_init(); #endif +#if MYNEWT_VAL(BLE_GATTS) && CONFIG_BT_NIMBLE_RAS_SERVICE ble_svc_ras_init(); - +#endif return 0; } diff --git a/examples/bluetooth/nimble/ble_htp/htp_prph/main/gatt_svr.c b/examples/bluetooth/nimble/ble_htp/htp_prph/main/gatt_svr.c index 82b6b1f1bcf..aae6bd14d51 100644 --- a/examples/bluetooth/nimble/ble_htp/htp_prph/main/gatt_svr.c +++ b/examples/bluetooth/nimble/ble_htp/htp_prph/main/gatt_svr.c @@ -123,7 +123,7 @@ gatt_svr_init(void) #if MYNEWT_VAL(BLE_GATTS) ble_svc_gatt_init(); #endif -#if CONFIG_BT_NIMBLE_ANS_SERVICE +#if CONFIG_BT_NIMBLE_HTP_SERVICE ble_svc_htp_init(); #endif