Part Number:CC2640R2F
Hi,
I am developing a custom profile to transfer a big block of data.
I studied the demo of ble5 throughput. "noti.handle = 0x1E" is used for notification, the snippet below,
static void SimpleBLEPeripheral_blastData() { // Subtract the total packet overhead of ATT and L2CAP layer from notification payload uint16_t len = MAX_PDU_SIZE-TOTAL_PACKET_OVERHEAD; attHandleValueNoti_t noti; bStatus_t status; noti.handle = 0x1E; noti.len = len; // Store hte connection handle for future reference uint16_t connectionHandle; GAPRole_GetParameter(GAPROLE_CONNHANDLE, &connectionHandle); while(throughputOn) { // If RTOS queue is not empty, process app message. // We need to process the app message here in the case of a keypress while (!Queue_empty(appMsgQueue)) { sbpEvt_t *pMsg = (sbpEvt_t *)Util_dequeueMsg(appMsgQueue); if (pMsg) { // Process message. SimpleBLEPeripheral_processAppMsg(pMsg); // Free the space from the message. ICall_free(pMsg); } } noti.pValue = (uint8 *)GATT_bm_alloc( connectionHandle, ATT_HANDLE_VALUE_NOTI, GATT_MAX_MTU, &len ); if ( noti.pValue != NULL ) //if allocated { // Place index noti.pValue[0] = (msg_counter >> 24) & 0xFF; noti.pValue[1] = (msg_counter >> 16) & 0xFF; noti.pValue[2] = (msg_counter >> 8) & 0xFF; noti.pValue[3] = msg_counter & 0xFF; // Attempt to send the notification w/ no authentication status = GATT_Notification( connectionHandle, ¬i, 0);
1. Can you explain the meaning of 'noti.handle = 0x1E;' ? which service the handle '0x1E' is belong to?
2. It seems that '0x1E' is belong to a system service. Can I use the handle '0x1E' in my custom profile to transfer data?
Thanks!