我的cc2541+cc2591在空曠時60米以上的收發(可連線)都沒問題,
當遇到屏蔽時, 廣播仍然可以傳送到60米外, 手機掃得到但無法連線,
用ble112開發版在我的藍芽裝置旁監聽封包,
卻可以收到手機發出嘗試對cc2541連線的封包,
不過cc2541卻一直沒有回應,
請問這個是什麼問題?
是我PA/LNA設定錯誤嗎?
相關的代碼如下
Init I/O
{
// Default State of I/O are output and low
P0SEL = 0; // Configure Port 0 as GPIO
P1SEL = 0; // Configure Port 1 as GPIO
P2SEL = 0; // Configure Port 2 as GPIO
P0DIR = 0xFE; // Port 0 pins P0.0 as input (buttons), others as output
P1DIR = 0xF3; // All port 1 pins (P1.0-P1.7) as output
P2DIR = 0x1F; // All port 1 pins (P2.0-P2.4) as output
P0 = 0; // All pins on port 0 to low
P1 = 0; // All pins on port 1 to low
P2 = 0; // All pins on port 2 to low
}
// Enable PA/LNA
{
HCI_EXT_SetTxPowerCmd(HCI_EXT_TX_POWER_0_DBM);
HCI_EXT_SetRxGainCmd(HCI_EXT_RX_GAIN_HIGH);
HCI_EXT_ExtendRfRangeCmd();
}