# No Read Request for Battery Service at BC 127

**URL:** <https://forum.sierrawireless.com/t/no-read-request-for-battery-service-at-bc-127/25523>\
**Category:** WiFi and Bluetooth Modules\
**Tags:** debug\
**Created:** [November 15, 2021, 6:49am UTC](https://forum.sierrawireless.com/t/no-read-request-for-battery-service-at-bc-127/25523 "2021-11-15T06:49:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![harald\_fiederlein](https://avatars.discourse-cdn.com/v4/letter/h/a698b9/32.png) [@harald\_fiederlein](https://forum.sierrawireless.com/u/harald_fiederlein)\
**Post date:** [November 15, 2021, 6:49am UTC](https://forum.sierrawireless.com/t/no-read-request-for-battery-service-at-bc-127/25523/1 "2021-11-15T06:49:30Z")

</div>

Hi,  
I have integrate to the GATT Database the

# Battery Service

db\_gen\_lib.add\_primary\_service(“180F”);   
batterylevel = create\_string\_buffer(‘\x32\x00’, 2)  
db\_gen\_lib.add\_characteristic(“2a19”, read|notify, sizeof(batterylevel)-1,batterylevel, TRUE)

I can read the Value 0x32 with a BLE Scanner, but I get no ReadRequest over the serial Protocol. If I notify a value from the BC127 GATT Server, than I get the right value at the BLE Scanner. This behavior I see also at follow Bluetooth Sig Service. (Device Name, TxPower, LinkLoss, Device Information)

Is that normal, that I can change this value, only if I write the complete DataBase ? or is that a bug ?

---

<div class="post-metadata">

**Author:** ![todd](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@todd](https://forum.sierrawireless.com/u/todd)\
**Post date:** [February 11, 2022, 10:17am UTC](https://forum.sierrawireless.com/t/no-read-request-for-battery-service-at-bc-127/25523/2 "2022-02-11T10:17:08Z")

</div>

It is because you are specifying a value. In the documentation it states that if you specify a value then that will always be returned for a read request and no notification will happen. If instead you make the call like this it will then create read request notifications.

db\_gen\_lib.add\_characteristic(“2a19”, read|notify, 0, NULL, TRUE)

---

<div class="post-metadata">

**Author:** ![harald\_fiederlein](https://avatars.discourse-cdn.com/v4/letter/h/a698b9/32.png) [@harald\_fiederlein](https://forum.sierrawireless.com/u/harald_fiederlein)\
**Post date:** [February 11, 2022, 10:36am UTC](https://forum.sierrawireless.com/t/no-read-request-for-battery-service-at-bc-127/25523/3 "2022-02-11T10:36:35Z")

</div>

> [@todd](#):
>
> It is because you are specifying a value. In the documentation it states that if you specify a value then that will always be returned for a read request and no notification will happen. If instead you make the call like this it will then create read request notifications.

Thanks for this information, can you provide me this documentation ?

---

<div class="post-metadata">

**Author:** ![todd](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@todd](https://forum.sierrawireless.com/u/todd)\
**Post date:** [February 15, 2022, 5:00am UTC](https://forum.sierrawireless.com/t/no-read-request-for-battery-service-at-bc-127/25523/4 "2022-02-15T05:00:38Z")

</div>

[https://source.sierrawireless.com/resources/airprime/tools/bc127-melody-ble-db-gen/#sthash.OSnDVJOj.dpbs](https://source.sierrawireless.com/resources/airprime/tools/bc127-melody-ble-db-gen/#sthash.OSnDVJOj.dpbs)

The db gen tool is located here in a zip. The zip also contains a pdf document titled Application Note: Melody BLE db gen - Rev C. In this document it states on page 3 under section “2. Characteristic declaration:”

“If the value of the characteristic is set, BLE\_READ notifications won’t be received and Melody will automatically reply to a read request with the value.”

The example given has a line like this where a fixed value is specified and no read request notifications will be generated. The device will automatically reply on your behalf, no response required from you, and no notice given.

device\_name = create\_string\_buffer(“Melody 6”);

add\_characteristic(“2A00”, read, sizeof(device\_name)-1, device\_name, FALSE);
