aci_gap_init always return 0x46
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-09 12:05 AM
It seems to enroll well to APP but when I try to send a message the aci_gap_init return the status value 0x46, BLE_STATUS_NOT_ALLOWED
/* USER CODE BEGIN FD_WRAP_FUNCTIONS */
tBleStatus P2PS_STM_App_Update_Buffer(uint16_t UUID, uint8_t *pPayload, uint8_t length)
{
uint8_t role = GAP_PERIPHERAL_ROLE;
uint16_t gap_service_handle, gap_dev_name_char_handle, gap_appearance_char_handle;
tBleStatus result = BLE_STATUS_INVALID_PARAMS;
result = aci_gap_init(role, 0,
APPBLE_GAP_DEVICE_NAME_LENGTH,
&gap_service_handle, &gap_dev_name_char_handle, &gap_appearance_char_handle);
switch(UUID)
{
case P2P_NOTIFY_CHAR_UUID:
result = aci_gatt_update_char_value(gap_service_handle, gap_dev_name_char_handle, 0, length, pPayload);
break;
default:
break;
}
return result;
}
Thanks,
- Labels:
-
STM32WB series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-12 4:57 AM
It looks like you are calling the aci_gap_init function at the wrong place.
It should be called once during the initialization of the device.
Have a look at static void Ble_Hci_Gap_Gatt_Init(void) function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-27 11:59 AM
Thanks for your help
