I'm using the device as a server connecting to it via a PC. I am able to write to the device characteristic values that are longer than 20 bytes. The characteristic value arrives in pieces with 'param->last' being true with the last piece. That is working fine.
When the device wants to write a value into its database (with notification) I can write more than 20 bytes but the PC side only appears to receive 20 and I'm not really sure where the problem lies. Here is the device code that responds to the 'update_req_handler:
if(param->conhdl == gapc_get_conhdl(controller_env.con_info.conidx))
{
// Update value in database
attmdb_att_set_value(controller_env.akpatch_controller_shdl + CONTROLLER_RESPONSE_IDX_VAL, param->reply_length, (uint8_t *)param->reply);
arch_printf("replying with %d bytes\n", param->reply_length);
if((controller_env.notify_property_status & PRF_CLI_START_NTF))
// Send notification through GATT
prf_server_send_event((prf_env_struct *)&controller_env, false, controller_env.controller_shdl + CONTROLLER_RESPONSE_IDX_VAL);
}
Am I missing something? Do I need to break the database update into pieces?
thanks,
marco
The notification size is limited to 20 bytes.
Thanks... I figured that was probably true but I felt I should take a shot.
marco