How to update the PSOC 4 BLE list of services after power on off

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
SaBh_1180281
Level 1
Level 1

Hi, can someone help on below

I have three services created in Gatt server (e.g. service 1, service 2 and service 3 )

1) when i start the program all three services are visible on phone

2)when i write some info ( data) in service 2, i am storing it in emEEPROM and disabling that service by calling CyBle_GattsDisableAttribute(service 2);

after that i am doing CyBle_SoftReset();

3)once this is done i can see only two services in phone (service 1 & service 3) which is what i want

4)but the problem is when i do power off & power on again i can see all three services on phone,

what needs to be done so that even after power off on there should be only two services visible no all ( i want the selective services , and my service 2 is one time writable so after writing i do not what that to appear anymore)

0 Likes
1 Solution
SaBh_1180281
Level 1
Level 1

i got the solution

after gattsdbregister, we checked  eeprom & disabled the service

#if(CYBLE_GATT_ROLE_SERVER)

                apiResult = CyBle_GattsDbRegister(cyBle_gattDB, CYBLE_GATT_DB_INDEX_COUNT, CYBLE_GATT_DB_MAX_VALUE_LEN);

               if(eepromarray == 0xXX)

               {

                         CyBle_GattsDisableAttribute(service 2);

                 }

View solution in original post

0 Likes
1 Reply
SaBh_1180281
Level 1
Level 1

i got the solution

after gattsdbregister, we checked  eeprom & disabled the service

#if(CYBLE_GATT_ROLE_SERVER)

                apiResult = CyBle_GattsDbRegister(cyBle_gattDB, CYBLE_GATT_DB_INDEX_COUNT, CYBLE_GATT_DB_MAX_VALUE_LEN);

               if(eepromarray == 0xXX)

               {

                         CyBle_GattsDisableAttribute(service 2);

                 }

0 Likes