2020-06-25 04:29 PM
Hi guys,
I need to add the Device Information (0x180A) service in the advertising phase.
I tried to do that in aci_gap_set_discoverable function, but ever fails with error 0x42 (invalid parameter). Whitout service uuid list, works ok.
So, I tried with aci_gap_update_adv_data after aci_gap_set_discoverable (without uuidservicelist) but fails too.
The 0x180A service with manuf name string and serial number string characteristics has been defined right. I did check that with my smartphone running "BLE Scanner" app, and the service and their characteristics are ok.
Below, the 1st try code:
uint8_t advert_serv_list[]={AD_TYPE_16_BIT_SERV_UUID, 0x0A, 0x18};
ret = aci_gap_set_discoverable(ADV_IND, ADV_INT_MIN, ADV_INT_MAX, PUBLIC_ADDR, NO_WHITE_LIST_USE, sizeof(LOCAL_NAME), (uint8_t*)&LOCAL_NAME, sizeof(advert_serv_list), advert_serv_list, 8, 28);
2nd try code:
ret = aci_gap_set_discoverable(ADV_IND, ADV_INT_MIN, ADV_INT_MAX, PUBLIC_ADDR, NO_WHITE_LIST_USE, sizeof(LOCAL_NAME), (uint8_t*)&LOCAL_NAME, 0, 0, 8, 28);
ret = aci_gap_update_adv_data(sizeof(advert_serv_list), advert_serv_list);
Please, can somebody help me ?
Thank you in advance.
Roger