Skip to content

characteristic larger than 253 bytes freezes the onRead callback #912

Closed
@jingoro2112

Description

@jingoro2112

from standard characteristic read example:

void onRead( NimBLECharacteristic* characteristic, NimBLEConnInfo& connInfo ) override
{
	const uint8_t buf[256] = {0};
	characteristic->setValue( buf, 253 ); // for values of 253 or less, it works as expected, getting a callback for each read request
	characteristic->setValue( buf, 254 ); // onRead() is never called again, despite the client making and receiving a read request
}

Just stumbled across this, It is possible I'm doing something wrong? but there seems to be something magical happening at the 253-4 byte boundary, I suspect an int8 being used with some kind of two-byte header? I have not looked at the source yet, spent too many hours already zeroing in on this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions