请问CH579做蓝牙主机时,怎么读取从机发送的notify呢?
主机无法开启从机notify,会提示"Write Error: 1",请问应该如何解决呢?
attWriteReq_t req; req.cmd = 0; req.sig = 0; req.handle = GATT_CLIENT_CHAR_CFG_UUID; req.len = 2; req.pValue = GATT_bm_alloc(centralConnHandle,ATT_WRITE_REQ,req.len,NULL,0); if ( req.pValue != NULL ) { req.pValue[0] = 1; req.pValue[1] = 0; if( GATT_WriteCharValue(centralConnHandle,&req,centralTaskId) == SUCCESS ) { printf("\r\nenable notify\r\n"); } else { GATT_bm_free((gattMsg_t *)&req, ATT_WRITE_REQ); }
热门产品 :
CH339: 7端口多功能USB HUB控制器芯片