# BLE Testing # ----------- # 1. Initialize CC2564 device # Load Core BT Service Pack (BT SP)to the CC2564 device # ==> Automatically done during initialization of the device # 2. Enable BLE mode # ==> BLE is enabled during initialization of the device Send_HCI_VS_LE_Enable 0xFD5B, 1, 1 Wait_HCI_Command_Complete_VS_LE_Enable_Event 5000, any, HCI_VS_LE_Enable, 0x00 # 3. Set the BLE Test Parameters # Note: Power Level 1 is used for BLE. For more information on this command, refer to the CC256x_VS_HCI_Commands wiki # Command Parameter Size (bytes) Value Description # ----------------- ------------ ----- ----------- # Packets to transmit 2 0x0000 Unlimited - Continuous TX # N N number of packets to transmit # Access code 4 0xXXXXXXXX An access code to sync and transmit # Default = 0x71764129 (TestMode AC) Send_HCI_VS_Set_LE_Test_Mode_Parameters 0xFD77, 0x01, 0x0, 0, 0x71764129, 0, 0, 0, 0, 0, 0 Wait_HCI_Command_Complete_VS_Set_LE_Test_Mode_Parameters_Event 5000, any, HCI_VS_Set_LE_Test_Mode_Parameters, 0x00 # 4. Start TX test # Command Parameter Size (bytes) Value Description # ----------------- ------------ ----- ----------- # TX_Channel 1 0 - 39 TX Frequency: 2402 + 2*k, # where k is the channel (max val is 39) # Data_Length 1 0 - 37 (0x025) Packet payload length up to 37 (0x25) bytes # Payload_Type 1 0 - 7 0 - PRBS9 # 1 - FOFO # 2 - ZOZO # 3 - PRBS15 # 4 - All Ones # 5 - All Zeros # 6 - OFOF # 7 - OZOZ Send_HCI_BLE_Transmitter_Test 0x00, 0x00, 0 Wait_HCI_Command_Complete_BLE_Transmitter_Test_Event 5000, any, HCI_BLE_Transmitter_Test, 0x00 # 5. Take measurements # Look at the Bluetooth tester results. # 6. End BLE TX Test Send_HCI_BLE_Test_End 0x201F Wait_HCI_Command_Complete_BLE_Test_End_Event 5000, any, HCI_BLE_Test_End, 0x00, 0 # Note: Note: To re-start transmission, go back to steps 3 (optional) and 4