Increasing BTA_GATTC_NOTIF_REG_MAX

BB1964
Posts: 8
Joined: Tue Oct 06, 2020 6:54 pm

Increasing BTA_GATTC_NOTIF_REG_MAX

Postby BB1964 » Fri Jan 08, 2021 7:48 pm

I'm currently working on a BLE Gatt client to work with my BLE Gatt server using IDF v4.1.

For my client application I am getting the following message 4 times :
E (6741) BT_APPL: Max Notification Reached, registration failed.

I found the following lines in bta_gattc_int.h.
#ifndef BTA_GATTC_NOTIF_REG_MAX
#define BTA_GATTC_NOTIF_REG_MAX 7//15
#endif
I'm assuming since I'm registering 11 notify events, this explains the message appearing 4 times.

I didn't want to change this value directly because
1. I didn't know if this value should not exceed 7 for some reason I don't understand
2. If it can be increased, I didn't want to have to remember to change it when I updated the IDF.

Can this value be increased? If so, is there a better way then modifying this file directly that I am missing?

chegewara
Posts: 2230
Joined: Wed Jun 14, 2017 9:00 pm

Re: Increasing BTA_GATTC_NOTIF_REG_MAX

Postby chegewara » Sat Jan 09, 2021 7:33 am

You can open feature request on github to add this as parameter in menuconfig.

Who is online

Users browsing this forum: joglz8 and 161 guests