Re: [Zephyr-users] how to increase RX buffer of characteristic for BLE device


Luiz Augusto von Dentz
 

Hi,

On Sat, Mar 17, 2018 at 1:08 PM, Vikrant More <vikrant8051@gmail.com> wrote:
Hello,

static ssize_t ABCD_write(struct bt_conn *conn, const struct bt_gatt_attr
*attr, const void *buf, u16_t len, u16_t offset, u8_t flags)
{
u8_t *value = attr->user_data;

if (offset + len > 64)
{
return BT_GATT_ERR(BT_ATT_ERR_INVALID_OFFSET);
}

memcpy(value + offset, buf, offset + len);

printk("\n\roffset = %d, len = %d\n\r", offset, len);

return len;
}

For testing I'm sending random 64 bytes of data to one characteristic
using #nrfConnect App but on device side it accepting only 20 Bytes.

printk("\n\roffset = %d, len = %d\n\r", offset, len); <--- Here len = 20
even when actual data size is 64.

So how to increase this limit upto 64 bytes ?
You should probably need to increase the MTU size, though both client
and server have to agree on the MTU, also it is possible to that the
app is using long write procedure so more bytes would follow...

Thank You !!

_______________________________________________
Zephyr-users mailing list
Zephyr-users@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users


--
Luiz Augusto von Dentz

Join devel@lists.zephyrproject.org to automatically receive all group messages.