Hello, hope you are doing well,
For any modification or implementation using the BLE examples from the SDK; I would recommend the Bluetooth Low Energy Application Developer’s Guide and Bluetooth Low Energy Demo Applications User’s Guide
There you can find more information about how the services works on our BLE examples.
I would recommend checking the Chapter 7.1.2 Declaring a service and 7.1.2.1 Service declaration macros in the Bluetooth Low Energy Application Developer’s Guide
I would recommend you setting the Primary Service information for Battery service in gatt_db.h
PRIMARY_SERVICE(service_battery, gBleSig_BatteryService_d)
CHARACTERISTIC(char_battery_level, gBleSig_BatteryLevel_d, (gGattCharPropNotify_c | gGattCharPropRead_c))
VALUE(value_battery_level, gBleSig_BatteryLevel_d, (gPermissionFlagReadable_c), 1, 0x5A)
DESCRIPTOR(desc_bat_level, gBleSig_CharPresFormatDescriptor_d, (gPermissionFlagReadable_c), 7, 0x04, 0x00, 0xAD, 0x27, 0x01, 0x01, 0x00)
CCCD(cccd_battery_level)
Also, you can consult as reference how other examples for BLE in the SDK implements the battery service, for example hid_device or temperature_sensor.
Hope this helps.
Best Regards
Luis