cancel
Showing results for 
Search instead for 
Did you mean: 

Using SHCI_C2_BLE_INIT_OPTIONS_REDUC_GATTDB_NVM to increase bonding list size

DS.4
Senior II

Wondering what is the cost of using 

SHCI_C2_BLE_INIT_OPTIONS_REDUC_GATTDB_NVM

over

SHCI_C2_BLE_INIT_OPTIONS_FULL_GATTDB_NVM

?

 

The first one can gets me 33% increase in bonding list size but I could not find what does it prevent me from using?

1 ACCEPTED SOLUTION

Accepted Solutions
STTwo-32
ST Employee

Hello @DS.4 

The REDUC_GATTDB_NVM can be used in all the cases.

When using the FULL_GATTDB_NVM and SVC_CHANGE_DESC, the GATT database record in NVM is composed as describe in the wiki page by:

  • Per service:
    • 2 bytes for handle
    • 3 bytes if 16-bit UUID or 17 bytes if 128-bit UUID
  • Per characteristic attribute:
    • 2 bytes for handle
    • 3 bytes if 16-bit UUID or 17 bytes if 128-bit UUID
    • 2 bytes for CCCD value (only if the attribute is a CCCD)

When using the REDUC_GATTDB_NVM and SVC_CHANGE_DESC, the GATT database record in NVM is composed by:

  • Per characteristic attribute:
    • 3 bytes for CCCD value (only if the attribute is a CCCD)
      + 16 bytes (The Data Base hash stores a 128 bits value calculated from the Data Base structure. Any change in the Data Base structure results in a different hash value.)

When a connection is established with a previously bonded device, the GATT database is compared with the GATT database saved in NVM. If there is a difference between the databases, a service change indication will be sent to the peer device. The contents of the indication will depend of FULL_GATTDB_NVM and REDUC_GATTDB_NVM flags:

- When using FULL_GATTDB_NVM, you know where the change is located, the service change indication will contain the specific handle of the service/characteristic where there is the modification.
- When using REDUC_GATTDB_NVM, since the data stored in NVM is a hash, it is not possible to know where is located the change, the service change indication will indicate a change of all the database.

 

More details are available on this WiKi.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
STTwo-32
ST Employee

Hello @DS.4 

The REDUC_GATTDB_NVM can be used in all the cases.

When using the FULL_GATTDB_NVM and SVC_CHANGE_DESC, the GATT database record in NVM is composed as describe in the wiki page by:

  • Per service:
    • 2 bytes for handle
    • 3 bytes if 16-bit UUID or 17 bytes if 128-bit UUID
  • Per characteristic attribute:
    • 2 bytes for handle
    • 3 bytes if 16-bit UUID or 17 bytes if 128-bit UUID
    • 2 bytes for CCCD value (only if the attribute is a CCCD)

When using the REDUC_GATTDB_NVM and SVC_CHANGE_DESC, the GATT database record in NVM is composed by:

  • Per characteristic attribute:
    • 3 bytes for CCCD value (only if the attribute is a CCCD)
      + 16 bytes (The Data Base hash stores a 128 bits value calculated from the Data Base structure. Any change in the Data Base structure results in a different hash value.)

When a connection is established with a previously bonded device, the GATT database is compared with the GATT database saved in NVM. If there is a difference between the databases, a service change indication will be sent to the peer device. The contents of the indication will depend of FULL_GATTDB_NVM and REDUC_GATTDB_NVM flags:

- When using FULL_GATTDB_NVM, you know where the change is located, the service change indication will contain the specific handle of the service/characteristic where there is the modification.
- When using REDUC_GATTDB_NVM, since the data stored in NVM is a hash, it is not possible to know where is located the change, the service change indication will indicate a change of all the database.

 

More details are available on this WiKi.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

"When using FULL_GATTDB_NVM, you know where the change is located, the service change indication will contain the specific handle of the service/characteristic where there is the modification.
- When using REDUC_GATTDB_NVM, since the data stored in NVM is a hash, it is not possible to know where is located the change, the service change indication will indicate a change of all the database."

Perfect thanks!