Can now print out the UUID

This commit is contained in:
Kristian Sloth Lauszus 2013-04-03 17:52:12 +02:00
parent a890d4aca8
commit 4122764d81

View file

@ -209,6 +209,14 @@ void SPP::ACLData(uint8_t* l2capinbuf) {
} }
} else { } else {
#ifdef EXTRADEBUG #ifdef EXTRADEBUG
Notify(PSTR("\r\nUUID: "), 0x80);
uint16_t uuid;
if((l2capinbuf[16] << 8 | l2capinbuf[17]) == 0x0000) // Check if it's sending the UUID as a 128-bit UUID
uuid = (l2capinbuf[18] << 8 | l2capinbuf[19]);
else // Short UUID
uuid = (l2capinbuf[16] << 8 | l2capinbuf[17]);
PrintHex<uint16_t> (uuid, 0x80);
Notify(PSTR("\r\nLength: "), 0x80); Notify(PSTR("\r\nLength: "), 0x80);
uint16_t length = l2capinbuf[11] << 8 | l2capinbuf[12]; uint16_t length = l2capinbuf[11] << 8 | l2capinbuf[12];
PrintHex<uint16_t> (length, 0x80); PrintHex<uint16_t> (length, 0x80);