Quantcast
Channel: Wireless Connectivity
Viewing all articles
Browse latest Browse all 116964

Forum Post: RE: Attribute length more than 19 bytes doesn't work

$
0
0

Finally I got it working for attribute lengths greater than 19 -

// If procedure complete
if ( ( pMsg->method == ATT_FIND_BY_TYPE_VALUE_RSP &&
pMsg->hdr.status == bleProcedureComplete ) ||
( pMsg->method == ATT_ERROR_RSP ) )
{
if ( simpleBLESvcStartHdl != 0 )
{
// Discover characteristic
simpleBLEDiscState = BLE_DISC_STATE_AUTH;

req.startHandle = simpleBLESvcStartHdl;
req.endHandle = simpleBLESvcEndHdl;
req.type.len = ATT_BT_UUID_SIZE;
req.type.uuid[0] = LO_UINT16(SIMPLEPROFILE_CHAR6_UUID);
req.type.uuid[1] = HI_UINT16(SIMPLEPROFILE_CHAR6_UUID);

//GATT_ReadUsingCharUUID( simpleBLEConnHandle, &req, simpleBLETaskId );
GATT_DiscCharsByUUID( simpleBLEConnHandle, &req, simpleBLETaskId );
}
}

I've replaced "GATT_ReadUsingCharUUID" with "GATT_DiscCharsByUUID" and I had my attribute size defined as 25 bytes and now I was bale to successfully discover the handle and also sent 20 bytes in one packet.

I think "GATT_ReadUsingCharUUID" should not be used for discovering handles and rather use "GATT_DiscCharsByUUID".

Arjun


Viewing all articles
Browse latest Browse all 116964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>