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

Forum Post: Question about Wiki data throughput example

$
0
0

Hi,

The Wiki contains an example of SimpleBLEPeripheral which is modified to send packets of 20 bytes.

I am not sure how it does this. The code which sends data is:

/*
* Send Data
*/
static void sendData(void )
{

static uint16 counter=0;
uint8 burstData[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

burstData[0] = (counter & 0xFF00)>>8;
burstData[1] = (counter & 0xFF);


attHandleValueNoti_t nData;
nData.len = 20;
nData.handle = 20;

osal_memcpy( &nData.value, &burstData, 20 );

// Send the Notification
if (GATT_Notification( 0, &nData, FALSE )==SUCCESS)

It sets up a structure for a notification then sends the notification. My question is where does "nData.handle = 20" come from? Why this value?

I would have thought that the 20 bytes would be sent in SIMPLEPROFILE_CHAR5 which would have a handle of 0x32

Also presumably to make this work SIMPLEPROFILE_CHAR5_LEN would need to be changed to 20.


Viewing all articles
Browse latest Browse all 116964

Trending Articles



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