diff --git a/src/ble/gatt-service/battery_service_server.c b/src/ble/gatt-service/battery_service_server.c index d8bc6cc23..7149428c9 100644 --- a/src/ble/gatt-service/battery_service_server.c +++ b/src/ble/gatt-service/battery_service_server.c @@ -93,8 +93,8 @@ void battery_service_server_init(uint8_t value){ battery_value = value; // get service handle range - uint16_t start_handle; - uint16_t end_handle; + uint16_t start_handle = 0; + uint16_t end_handle = 0xfff; int service_found = gatt_server_get_get_handle_range_for_service_with_uuid16(ORG_BLUETOOTH_SERVICE_BATTERY_SERVICE, &start_handle, &end_handle); if (!service_found) return;