Hello @APort
What I understand, you are looking to send more data. So, I suggest you refer to this description:
1. Modify CFG_BLE_MAX_ATT_MTU to 512 in app_conf.h
2. Call aci_gatt_exchange_config() after connecting in app_ble.c:
tBleStatus status = aci_gatt_exchange_config(BleApplicationContext.BleApplicationContext_legacy.connectionHandle);
3. Change Notify characteristic size in p2p_stm.c:
aci_gatt_add_char(aPeerToPeerContext.PeerToPeerSvcHdle, UUID_TYPE_128, &uuid16,
CFG_BLE_MAX_ATT_MTU - 3, // [STM]
CHAR_PROP_NOTIFY, ATTR_PERMISSION_NONE,
GATT_NOTIFY_ATTRIBUTE_WRITE, /* gattEvtMask */
10, /* encryKeySize */
1, /* isVariable: 1 */
&(aPeerToPeerContext.P2PNotifyServerToClientCharHdle));
4. Change P2PS_STM_App_Update_Char function in p2p_stm.c:
tBleStatus P2PS_STM_App_Update_Char(uint16_t UUID, uint8_t *pPayload)
{
tBleStatus result = BLE_STATUS_INVALID_PARAMS;
switch(UUID)
{
case P2P_NOTIFY_CHAR_UUID:
aci_gatt_update_char_value_ext(0x0000,
aPeerToPeerContext.PeerToPeerSvcHdle,
aPeerToPeerContext.P2PNotifyServerToClientCharHdle,
0x00,
509,
0,
243,
(uint8_t *) pPayload);
aci_gatt_update_char_value_ext(0x0000,
aPeerToPeerContext.PeerToPeerSvcHdle,
aPeerToPeerContext.P2PNotifyServerToClientCharHdle,
0x00,
509,
243,
243,
(uint8_t *) pPayload + 243);
aci_gatt_update_char_value_ext(0x0000,
aPeerToPeerContext.PeerToPeerSvcHdle,
aPeerToPeerContext.P2PNotifyServerToClientCharHdle,
0x01,
509,
486,
23,
(uint8_t *) pPayload + 486);
break;
default:
break;
}
return result;
}
5. Modify P2PS_STM_Data_t structure in p2p_stm.h:
typedef struct
{
uint8_t * pPayload;
uint16_t Length;
}P2PS_STM_Data_t;
Best Regards.
STTwo-32