2019-10-01 09:03 AM
I tried the Cube BLE exemple to tried to set the device name for the advertising message but I can only see the advertising address. How could I do to set the name?
/* Update device name */
ret = aci_gatt_update_char_value(service_handle, dev_name_char_handle, 0, sizeof(device_name), device_name);
if(ret != BLE_STATUS_SUCCESS) {
PRINTF("aci_gatt_update_char_value() failed: 0x%02x\r\n", ret);
return ret;
}
Solved! Go to Solution.
2019-10-04 11:34 AM
It works for me. I set the name in aci_gap_set_discoverable(...) and change it later on by aci_gatt_update_char_value(...)
A BLE scanner app shows the first name. But, when connected, the Generic access service shows the second name as Device Name.
(CubeMX 5.3.0 + X-CUBE-BLE1 4.4.0 generated code skeleton)
2019-10-01 09:15 AM
Hi Mich,
use strlen(device_name) for the length of the name string.
2019-10-01 11:46 PM
Thanks a lot for the correction of this cube issue.
The problem is still here: no name in the advertising.
2019-10-04 11:34 AM
It works for me. I set the name in aci_gap_set_discoverable(...) and change it later on by aci_gatt_update_char_value(...)
A BLE scanner app shows the first name. But, when connected, the Generic access service shows the second name as Device Name.
(CubeMX 5.3.0 + X-CUBE-BLE1 4.4.0 generated code skeleton)
2023-11-05 04:12 AM
What does 0x42 return value mean?
I got this when I wanted to change the name:
aci_gatt_update_char_value_ext() failed: 0x42
RC_DeviceInit() failed: 0x42