Gattc error "max notifications reached. registration failed"

Hi,

I’m facing the an error “max notifications reached. registration failed” on esp32 while subscribing for BLE GATT notifications. This happens after 7th attempt. In between device is disconnected and reconnected and in every connection notifications are subscribed only once. I saw an API to unsubscibe to notifications in esp source, but I cannot access because mongoose-os doesn’t expose them.

We are using mongoose-os for our gateway and it is acting as a gatt client to our BLE devices. We are trying to commission hundreds of devices which requires connecting, enabling notifications. After commissioning 7 devices, it stops at subscribing notifications with error “max notifications reached. registration failed”.

Any ideas how to solve this issue?