I'm working in sdk 5.0.4
I want to change the exist service uuid and attribute uuid at runtime, because the attribute uuid is configured by the customer at run time through the serial port
I'm developing an AT instruction bluetooth module
I'm doing the following
uint8_t new_uuid_arr[16]={1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; //a new uuid struct att_char128_desc *p1 = (struct att_char128_desc *)cust_prf_funcs->att_db[CUST1_IDX_SERVER_TX_CHAR].value; memcpy(p1->attr_type, new_uuid_arr, 16);
My expectation is that uuid change after the above code execution
But it doesn't work
Please tell me how do I change exist service uuid and attribute uuid by which function after running
Is there any other way to change attribute uuid ?
Device:
嗨chenpenglai,
Did you try the following steps in the app_custs1_create_db() function? ? If yes, in which example of the SDK? How you would like to change the UUI?
For changing the characteristics value you will have to apply the change in two places:
Now apply the change to the characteristic itself :
Thanks, PM_Dialog
I'm tried to execute above code in the app_custs1_create_db() function, as follows
But the app_custs1_create_db() function can only change service uuid when the device startup
I want to change it at runtime, do not reboot
I tried change array_test_svc[] value and called app_custs1_create_db() function after device started, but I couldn't change the service uuid
Hello PM_Dialog
I need your help
嗨chenpenglai,
My apologies for the delay. I’m working on that and I’ll try o get back to you as soon as possible. Which SDK example are you using?
Thanks, PM_Dialog
I'm working in ble_app_peripheral
嗨chenpenglai,
I used the following code snippet and I am not able to replicate you issue. I used the ble_app_peripheral example of SDK5.0.4. The only change is CUST1_IDX_LONG_VALUE_CHAR instead of CUST1_IDX_SERVER_TX_CHAR. I assume that you have created a “Server Tx” characteristic.
Since, I am not able to replicate the issue, please try to debug your code. Additionally, what do you mean that is not working? Is the device advertising? Are you able to connect? Did you run it in debug mode?
Thanks, PM_Dialog