Other Parts Discussed in Thread: ENERGYTRACE
Hello,
I have a custom board based on CC2642R and I would like to change PHY to coded to improve connection range. My first test is to change the PHY with the following function :
HCI_LE_SetPhyCmd(Conn.connHandle, 0, HCI_PHY_CODED, HCI_PHY_CODED, LL_PHY_OPT_S8)
The return status of the function is SUCCESS and HCI_BLE_PHY_UPDATE_COMPLETE_EVENT is trigged, meaning the PHY should be changed but when I run the get PHY function I readout PHY=3. I think it means that the current PHY is (PHY_1Mbps | PHY_2Mbps) instead of PHY_CODED. But I am not 100% sure of that, can someone confirm ?
So I tried a simplier example with project zero. I connected to my custom board using BTool and send the setPHY command to coded. Once again every command suceeded, but the PHY is not changed afterwards :
--------------------------------------------------------------------
[30] : <Info> - 09:47:42.142
Device Connected
Handle = 0x0000
Addr Type = 0x00 (ADDRTYPE_PUBLIC)
BDAddr = 80:6F:B0:EE:EA:6A
--------------------------------------------------------------------
[31] : <Rx> - 09:47:42.357
-Type : 0x04 (Event)
-EventCode : 0x003E (HCI_LE_GenericReportEvent)
-Data Length : 0x0C (12) bytes(s)
LE Event Code : 0x04 (4) (HCI_LE_ReadRemoteUsedFeaturesCompleteEvent)
LE Event Code : 0x04 (4) (HCI_LE_ReadRemoteUsedFeaturesCompleteEvent)
Status : 0x00 (0) (SUCCESS)
ConnectionId : 0x0000 (0)
Features : 0x00000000000059FF (23039) (
Encryption
Connection_Parameters_Request
Reject_Extended_Indication
Slave_Features_Exchange
Ping
Data_Packet_Length_Extension
Privacy
Extended_Scanner_Filter_Policies
PHY_2M
Coded_PHY
Extended_Advertising
Channel_Selection_Algorithm_2)
Dump(Rx):
0000:04 3E 0C 04 00 00 00 FF 59 00 00 00 00 00 00 .>......Y......
--------------------------------------------------------------------
[32] : <Rx> - 09:47:48.260
-Type : 0x04 (Event)
-EventCode : 0x000E (HCI_CommandCompleteEvent)
-Data Length : 0x06 (6) bytes(s)
Packets : 0x01 (1)
OpCode : 0x2020 (HCI_LE_RemoteConnectionParameterRequestReply)
Status : 0x00 (0) (SUCCESS)
Handle : 0x0000 (0)
Dump(Rx):
0000:04 0E 06 01 20 20 00 00 00 .... ...
--------------------------------------------------------------------
[33] : <Rx> - 09:47:49.463
-Type : 0x04 (Event)
-EventCode : 0x00FF (HCI_LE_ExtEvent)
-Data Length : 0x0B (11) bytes(s)
Event : 0x0607 (1543) (GAP_LinkParamUpdate)
Status : 0x00 (0) (SUCCESS)
ConnHandle : 0x0000 (0)
ConnInterval : 0x0024 (36)
ConnLatency : 0x0000 (0)
ConnTimeout : 0x00C8 (200)
Dump(Rx):
0000:04 FF 0B 07 06 00 00 00 24 00 00 00 C8 00 ........$.....
--------------------------------------------------------------------
[34] : <Tx> - 09:48:17.719
-Type : 0x01 (Command)
-OpCode : 0x2032 (HCI_LE_SetPhy)
-Data Length : 0x07 (7) byte(s)
Handle : 0x0000 (0)
AllPhys : 0x00 (0) (Use Tx and Rx Phy Parameters)
TxPhy : 0x04 (4) (
Coded_Phy)
RxPhy : 0x04 (4) (
Coded_Phy)
PhyOptions : 0x0000 (0) (No Preferred Coding on Tx)
Dump(Tx):
0000:01 32 20 07 00 00 00 04 04 00 00 .2 ........
--------------------------------------------------------------------
[35] : <Rx> - 09:48:17.750
-Type : 0x04 (Event)
-EventCode : 0x000F (HCI_CommandStatusEvent)
-Data Length : 0x04 (4) bytes(s)
Status : 0x00 (0) (SUCCESS)
Num HCI Cmds : 0x01 (1)
OpCode : 0x2032 (HCI_LE_SetPhy)
Dump(Rx):
0000:04 0F 04 00 01 32 20 .....2
--------------------------------------------------------------------
[36] : <Rx> - 09:48:18.136
-Type : 0x04 (Event)
-EventCode : 0x003E (HCI_LE_GenericReportEvent)
-Data Length : 0x06 (6) bytes(s)
LE Event Code : 0x0C (12) (HCI_LE_PhyUpdateCompleteEvent)
LE Event Code : 0x0C (12) (HCI_LE_PhyUpdateCompleteEvent)
Status : 0x00 (0) (SUCCESS)
Handle : 0x0000 (0)
TxPhy : 0x03 (3) (
Phy_1_Mbps
Phy_2_Mbps)
RxPhy : 0x03 (3) (
Phy_1_Mbps
Phy_2_Mbps)
Dump(Rx):
0000:04 3E 06 0C 00 00 00 03 03 .>.......
--------------------------------------------------------------------
Thanks for your help,
Benoit