- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I define a characteristic and it has notification property:
PRIMARY_SERVICE_UUID128(HANDLE_SPI_SEND_SERVICE_UUID, UUID_SPI_SEND_SERVICE),
CHARACTERISTIC_UUID128_WRITABLE(HANDLE_SPI_CHARACTERISTIC_SEND_DATA, HANDLE_SPI_CHARACTERISTIC_SEND_DATA_VALUE,
UUID_SPI_CHARACTERISTIC_SEND_DATA,
LEGATTDB_CHAR_PROP_READ | LEGATTDB_CHAR_PROP_NOTIFY,
LEGATTDB_PERM_READABLE, 14),
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0E, 0x0D,
CHAR_DESCRIPTOR_UUID16_WRITABLE (HANDLE_SPI_CHARACTERISTIC_SEND_DATA_CLIENT_CONFIGURATION_DESCRIPTOR,
UUID_DESCRIPTOR_CLIENT_CHARACTERISTIC_CONFIGURATION,
LEGATTDB_PERM_READABLE | LEGATTDB_PERM_WRITE_REQ, 2),
0x00,0x00,
And then, I try to send notification after write a new value to thí characteristic.
bleprofile_ReadHandle(HANDLE_SPI_CHARACTERISTIC_SEND_DATA_VALUE, &db_pdu);
db_pdu.len = length;
memcpy(db_pdu.pdu, &buffer[1],length);
bleprofile_WriteHandle(HANDLE_SPI_CHARACTERISTIC_SEND_DATA_VALUE, &db_pdu);
bleprofile_sendNotification(HANDLE_SPI_CHARACTERISTIC_SEND_DATA_VALUE, (UINT8 *)db_pdu.pdu, db_pdu.len);
But, on LightBlue app on Ipad, I don't receive any notification, although I pressed Start Notify button.
Please let me know what is my problem?
More over, on LightBlue app, I can press Start Notify button, then this button change to "Stop Notify".
But when I press this button again, it can't not change to Start Notify.??
Solved! Go to Solution.
- Labels:
-
ReadWrite Characteristics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You do not have WRITE properties on your characteristic, so it should not be CHARACTERISTIC_UUID128_WRITABLE but CHARACTERISTIC_UUID128. Hope it will fix the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You do not have WRITE properties on your characteristic, so it should not be CHARACTERISTIC_UUID128_WRITABLE but CHARACTERISTIC_UUID128. Hope it will fix the problem.