This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

gattc read in multi connect

I am using S120 Softdevice, with bunch of different type ble tags(peripherals). written a code to connect multiple tags at a time and doing a gattc read to fetch the battery level.

Each type of tag has different read handles for battery read.

I am getting invalid battery levels.

Verified with gatt tool & nrfconnect on each tag type and came to conclusion that read request are not going to specific tag. i.e after connecting to multiple tags doing a gattc read request to multiple tags are getting misplaced. I verified that i am sending appropriate read handle for sd_ble_gattc_read after connect event.

Is there issue with multi connect.

Parents
  • I am not getting garbage values, I am getting 2%,8% battery values. verified with nrf connect on each tag it was showing 91%.

    • Are you using the BLE battery service for this?
    • So none of the tags really have 2 %, 8% battery level?
    • How are you measuring the battery level? Are you using the ADC for this?
    • When does this bug happen? Only when you are reading different tags at once?
  • How do you know that read request are going to other(wrong) tags ?

    Are you sure it's not an issue with the ADC readings?

    nRF51x22 Evaluation Kit(PCA10001) uses an nRF51 IC revision 1 or 2. This is an outdated chip revision, and not recommended for new products and design(nRF51 IC is now on revision 3). Also this old SDK could have some bugs. So it's not unthinkable that these factors could somehow be causing the issue. As mentioned in your other post, I would therefore recommend upgrading to a Development Kit. For new products I would recommend a nRF52832-DK, where you have support for the latest SDK versions and Bluetooth 5.

Reply
  • How do you know that read request are going to other(wrong) tags ?

    Are you sure it's not an issue with the ADC readings?

    nRF51x22 Evaluation Kit(PCA10001) uses an nRF51 IC revision 1 or 2. This is an outdated chip revision, and not recommended for new products and design(nRF51 IC is now on revision 3). Also this old SDK could have some bugs. So it's not unthinkable that these factors could somehow be causing the issue. As mentioned in your other post, I would therefore recommend upgrading to a Development Kit. For new products I would recommend a nRF52832-DK, where you have support for the latest SDK versions and Bluetooth 5.

Children
No Data
Related