你(们)好
我们将 tirtos_simplelink_2_13_00_06 堆栈与 simpleBLEBroadcaster .c 示例结合使用、并开发了一个工作正常的低功耗传感器应用。 现在、我们要使用来自 CC2650的硬件 AES-Modul 对我们的广播包进行加密。
我们尝试使用 HCI_LE_EncryptCmd(myKey, myPlainText) in the SimpleBLEBroadcaster_taskFxn() and added an event listener to the GAPRole (broadcaster.c). From there, our callback function myEncryptCb() should be called. Sadly this does not happen. Any suggestions how to proceed?
静态空 gapRole_processStackMsg (iCall_HDR *pMsg) { switch (pMsg->event) { 案例 GAP_MSG_EVENT: gapRole_processGAPMsg ((gapEventHdr_t *) pMsg); 中断; 案例 HCI_SMP_EVENT_EVENT:// TODO:CAM:添加了 AES 加密选项 if (pMsg->status == HCI_COMMAND_COMPLETE_EVENT_CODE) { hciEvt_CmdComplete_t * pPktt =(hciEvt_CmdComplete_t *) pMsg; if (pkt->cmdlPCode =HCI_LE_encrypt) { extern void myEncryptCb (uint8_t、uint8_t *); myEncryptCb (pPkt->pReturnParam[0]、&pPkt->pReturnParam[1]); } } 中断; 默认值: 中断; }
此致
Martin