Hi
I am using the ble_app_profile as a base, and I am trying to write a value to a characteristic based on UART. I am able to do a ke_msg_send from the UART callback to set the value, but the value is only changed when there is a central connected to the 580. If there is no central connected to the 580, the updates are all discarded.
How can I ensure that the values received over UART are reflected in the characteristic, irrespective of whether a central is connected to the 580 or not ?
Thanks,
Keywords:
Device:
Hi,
Profiles will be disabled if there's no valid connections. If you'd like to update values to characteristics in a given profile, the profile needs to be enabled. You could search for CUSTS1_ENABLE_REQ as an example of how-to-enable-profile since your project is based on ble_app_profile.
Thanks for the quick reply, I'll try that.
1. If I want to store the value in a global variable and load the value when the profile is enabled instead, is that possible ? What method can let me do that ? Where should I be calling such a method ?
2. Does keeping the profile enabled have any power consumption implications ?
Also, calling
"
app_custs1_enable( (uint16_t) app_env->conhdl);
"
in user_app_init did not make any difference. What is the right place to put this ?
Thanks
Hi,
I tried to reproduce your case. The value of the characteristic is still updatable even without connections. Here's what I did:
In the project ble_app_profile, update the value of CUST1_IDX_BUTTON_STATE_VAL in the end of the function custs1_disable() which is called when the profile cust1 receives a GAPC_DISCONNECT_IND message.
Could you also check the correctness of input arguments and maybe the error code from attmdb_att_set_value()? I supposed you using the same function.
Oh, I was trying to enable the profile as suggested by you earlier, but that did not work.
attmdb_att_set_value worked, thanks !