Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Correct spelling
  • Loading branch information
sandeepmistry committed Oct 7, 2019
commit 41038f32d69606f6dddcc53fbd0685c916640aec
2 changes: 1 addition & 1 deletion examples/Central/PeripheralExplorer/PeripheralExplorer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void exploreService(BLEService service) {
}

void exploreCharacteristic(BLECharacteristic characteristic) {
// print the UUID and properies of the characteristic
// print the UUID and properties of the characteristic
Serial.print("\tCharacteristic ");
Serial.print(characteristic.uuid());
Serial.print(", properties 0x");
Expand Down
20 changes: 10 additions & 10 deletions src/utility/ATT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,20 +519,20 @@ bool ATTClass::handleNotify(uint16_t handle, const uint8_t* value, int length)
continue;
}

uint8_t notication[_peers[i].mtu];
uint16_t noticationLength = 0;
uint8_t notification[_peers[i].mtu];
uint16_t notificationLength = 0;

notication[0] = ATT_OP_HANDLE_NOTIFY;
noticationLength++;
notification[0] = ATT_OP_HANDLE_NOTIFY;
notificationLength++;

memcpy(&notication[1], &handle, sizeof(handle));
noticationLength += sizeof(handle);
memcpy(&notification[1], &handle, sizeof(handle));
notificationLength += sizeof(handle);

length = min((uint16_t)(_peers[i].mtu - noticationLength), (uint16_t)length);
memcpy(&notication[noticationLength], value, length);
noticationLength += length;
length = min((uint16_t)(_peers[i].mtu - notificationLength), (uint16_t)length);
memcpy(&notification[notificationLength], value, length);
notificationLength += length;

HCI.sendAclPkt(_peers[i].connectionHandle, ATT_CID, noticationLength, notication);
HCI.sendAclPkt(_peers[i].connectionHandle, ATT_CID, notificationLength, notification);

numNotifications++;
}
Expand Down