2021-02-17 06:08 AM
As the title says. I can see no support for this but a perpiheral advertising with ADV_IND should support this by default.
Does anyone know?
Regards,
AC
Solved! Go to Solution.
2021-02-17 02:00 PM
Found it - it's an hci call, not an aci call. Hmmm...
2021-02-17 02:00 PM
Found it - it's an hci call, not an aci call. Hmmm...
2021-06-02 07:34 AM
Does it mean one can customize scan response data? If so what's the proper way to do that? I'd want to just add the device name.
I'm new in STM32WB and infos are sometimes difficult to find.
2021-06-02 07:40 AM
I can find no way to configure it - do let me know if you do.
I guess ST decided not to support scan response that's why everything crammed into the advertisement packet and, as a result, there's only room for 7 characters of device name. The problem with this is that you can't use 128-bit UUIDs as there's no room.
ac
2021-06-02 08:02 AM
Thank you for your quick answer.
My device name is 9 char long and even CubeMX refuses to put it with the 128-bit UUID I need in advertisement packet. My goal is to port an application running with a Bluegiga module which actually puts devname in scan response and UUID in advert. Of course name length must be 9...would have been too easy...
I'll report if I find a solution.
Vincent
2021-06-02 08:38 AM
I just wish that there were some experts on this forum who can answer these types of question. Most questions just go unanswered...
2021-09-20 10:33 PM
To set scan response you have to use functions aci_gap_update_adv_data and hci_le_set_scan_response_data.
Here is an example on how to use them:
static uint8_t manuf_data[] = {
14, AD_TYPE_COMPLETE_LOCAL_NAME, 'C' ,'O' ,'M' ,'P' ,'L' ,'E' ,'T' ,'E' ,' ' ,'N' ,'A' ,'M' ,'E'
};
aci_gap_update_adv_data(sizeof(manuf_data), (uint8_t *)manuf_data);
static uint8_t scan_resp_data[] = {
17,
AD_TYPE_MANUFACTURER_SPECIFIC_DATA,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f
};
hci_le_set_scan_response_data(sizeof(scan_resp_data), (uint8_t*)scan_resp_data);
2021-09-21 03:04 AM
Thank you DGann. This works for me. I'll just add some complement. Care must be taken when using these functions to have low level layers initialized, else you face a HardFault (at least I've faced...). If using a CubeMX generated project this can be done at the end of APP_BLE_Init() in app_ble.c