這對你可能不同,但在Bluetopia棧,我GAP_LE_Event_Callback
功能,當我收到Connection_Complete(GAP連接即是)我這樣做
case etLE_Connection_Complete:
...
Word_t Connection_Handle;
if (GAP_LE_Query_Connection_Handle(BluetoothStackID, x->Peer_Address,
&Connection_Handle) == 0) {
Word_t Connection_HandleResult;
SByte_t RSSIResult;
Byte_t StatusResult;
if (HCI_Read_RSSI(BluetoothStackID,Connection_Handle, &StatusResult,
&Connection_HandleResult, &RSSIResult) == 0) {
Display(("RSSI: %x %x %d\r\n",StatusResult,
Connection_HandleResult,RSSIResult));
如果還是不行,那麼您需要手動創建一個ConnectionHandle,並通過調用HCI_LE_Create_Connection