This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BTool CC2564 => GAP Device Initialization Timeout

Other Parts Discussed in Thread: CC2564, CC2541, CC2540

Hello,

When I start BTool the program sends packet GAP_DeviceInit. The response HCI_CommandCompleteEvent is received, so I gues this is fine.

But after a few seconds, the timeout error pops up..

I work with a LSR Tiwi-uB2 evaluation board with CC2564. Is BTool also compatible for that chip?

For the flow control pins, I connected RTX and CTS from the chip together. UART communication works cause I can get the MAC address with HCI command 0x01 0x09 0x10 0x00.

Any suggestions?

[1] : <Info> - 10:20:13.512
Port opened at 10/07/2016 10:20:13
------------------------------------------------------------------------------------------------------------------------
[2] : <Tx> - 10:20:13.731
-Type                      : 0x01 (Command)
-Opcode                 : 0xFE00 (GAP_DeviceInit)
-Data Length          : 0x26 (38) byte(s)
 ProfileRole            : 0x08 ( Central )
 MaxScanRsps      : 0x05 (5)
 IRK                        : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
 CSRK                    : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
 SignCounter          : 0x00000001 (1)
Dump(Tx):
01 00 FE 26 08 05 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 01 00 00 00
------------------------------------------------------------------------------------------------------------------------
[3] : <Rx> - 10:20:13.813
-Type                      : 0x04 (Event)
-EventCode            : 0x0E (HCI_CommandCompleteEvent)
-Data Length          : 0x04 (4) bytes(s)
 Packets                 : 0x01 (1)
 Opcode                 : 0xFE00 (GAP_DeviceInit)
 Raw                       : 01 00 FE 02
Dump(Rx):
04 0E 04 01 00 FE 02
------------------------------------------------------------------------------------------------------------------------
[4] : <Warning> - 10:20:23.738
GAP Device Initialization Timeout.
Device May Not Function Properly.
------------------------------------------------------------------------------------------------------------------------
  • When I compare the received data with a Youtube video of btool, it also looks a bit different:

  • Hi David,

    The BTool is compatible with TI Bluetooth Low Energy chips like CC2540, CC2541 etc. It is not compatible with the CC2564 Bluetooth Dual-Mode IC.

    For what you are trying to achieve, please take a look at the HCITester tool and sample applications in the TI Dual-Mode Bluetooth Stack.

    Best regards,

    Vihang

  • Hi Vihang,

    First of all thanks for the program!

    But the same issue appears:

    18:28:18.711 --
    18:28:18.711 Packet "GAP_DeviceInit", Opcode 0xfe00
    18:28:18.711 Parameters:
    18:28:18.711 | profileRole      : 8 (GAP_PROFILE_CENTRAL)
    18:28:18.711 | maxScanResponses : 3
    18:28:18.711 | IRK              : "0"
    18:28:18.711 | CSRK             : "0"
    18:28:18.711 | signCounter      : 1
    18:28:18.711 --
    18:28:18.711 Outgoing Dump:
    18:28:18.711     0000: 01 00 fe 26 08 03 00 00 00 00 00 00 00 00 00 00 ...&............
    18:28:18.711     0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    18:28:18.711     0020: 00 00 00 00 00 00 01 00 00 00                   ..........
    18:28:18.727 Incoming Dump:
    18:28:18.727     0000: 04 0e 04 01 00 fe 02                            .......
    18:28:18.727 --
    18:28:18.727 Packet "HCI_Command_Complete_Event", Opcode 0x000e
    18:28:18.727 Parameters:
    18:28:18.727 | Number HCI commands : 0x01
    18:28:18.727 | Command Opcode      : 0xfe00
    18:28:18.727 | Status              : 0x02 (Unknown Connection Identifier)
    18:28:18.727 --
    18:28:18.727 ERROR - File: "C:\Users\David\Downloads\Central_commands_sbp\central_commands_sbp.txt", Line: 8
    18:28:18.727 ERROR - Event Mismatch. Expected: HCI_Vendor_Specific_Event, Got: HCI_Command_Complete_Event
    18:28:18.727 ERRORed Line: Wait_HCI_Vendor_Specific_Event 5000, 0x67f, , ,
    18:28:18.727 --
    18:28:18.727 *** Script End ***
    18:28:18.727 --
    

    Maybe I need to do something before use the vendor specific commands? Do I need to upload something to the chip maybe?

  • Hi David,

    Did you load the CC256xB FW service pack to the device before passing the HCI commands?

    The GAP_DeviceInit is a Vendor Specific HCI command for BLE Wireless MCUs. No such Vendor Specific command exist for the CC256x. After loading the FW service pack to the CC256x device, you can use the HCI_Inquiry (Opcode 0x0401) command to discover nearby devices.

    You can find the standard HCI commands in the Bluetooth Specifications document and the Vendor Specific HCI commands for CC256x on this wiki page.

    Best regards,

    Vihang

  • Hi Vihang,

    Yes I loaded "initscripts-TIInit_6.7.16_bt_spec_4.1.bts" from the link you provided with sleep disabled.
    I guess that's the correct version for the CC2564?

    For the inquiry HCI command:

    OGF = 0x01
    0CF = 0x0001
    ==> opcode = 0x0401

    But some questions about that:
    -Command parameters are LAP, Inquiry_Length, Num_Responses
    -No return parameters

    LAP must be a value between 0x9E8B00-0X9E8B3F, but the LAP which is the last 24 bit of the 48-bits Bluetooth Device Address doesn't fit between between both values. My LAP is D3-DD-2F.
    For example when I use this command:
    0x01: packet type
    0x01 0x04: opcode
    0x2F 0xDD 0xD3: LAP
    0x10: Maximum amount of time specified before the Inquiry is halted. Time = N * 1.28 sec
    0x00: Default. Unlimited number of responses.

    When I do this with other Bluetooth devices in the neighborhood, I got no response.

    When I replace the LAP with 00-00-00:
    0x01: packet type
    0x01 0x04: opcode
    0x00 0x00 0x00: LAP
    0x10: Maximum amount of time specified before the Inquiry is halted. Time = N * 1.28 sec
    0x00: Default. Unlimited number of responses.

    I got the response 04-0F-04-12-01-01-04-04-10-01-06.

    I also used the HCI command read_LAP, whick respond me a LAP of 9E-8B-33:
    0x01: packet type
    0x01 0x04: opcode
    0x33 0x8B 0x9E: LAP
    0x10: Maximum amount of time specified before the Inquiry is halted. Time = N * 1.28 sec
    0x00: Default. Unlimited number of responses.

    But also no response.

    Maybe I use the wrong LAP number?
  • Any examples or experience to use this command?

    Thanks in advance!

  • Hi David,

    The HCI_Inquiry with LAP "9E8B33" works. Please see the attached example script that I used. Please copy the content of this txt file in the script section of HCI tester and then run it. It has the Bluetooth initscript in the beginning and then HCI_Inquiry command. The result trace log of HCI tester is also attached.

    #--------------------------------------------------------------------------------
    # Description : Orca L PG 2.0 ROM Initialization Script
    #
    # Compatibility: Orca, 7.0.16 ROM
    #
    # Last Updated: 16-Feb-2016  11:49:45.18
    #
    # Version     : TI_P7_16.33
    #
    #
    #
    #
    # Notes       : Use this script on Orca L PG 2.0, 7.0.16 ROM device only (FW v7.0.16)
    #--------------------------------------------------------------------------------
    
    #################################################################
    ## START of CC256x Add-On
    #################################################################
    
    ## Change UART baudrate
    Send_HCI_VS_Update_Uart_HCI_Baudrate 0xFF36, 0x0001c200
    Wait_HCI_Command_Complete_VS_Update_Uart_HCI_Baudrate_Event 5000, 0x01, 0xff36, 0x00
    
    Com_SetParams 115200, 1
    #################################################################
    ## END of CC256x Add-On
    #################################################################
    
    Send_HCI_VS_Start_VS_Lock 0xFE37, 0x07, 0x10
    Wait_HCI_Command_Complete_VS_Start_VS_Lock_Event 5000, any, 0xfe37, 0x00
    
    
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x00086140, 0xfa, "07:10:47:21:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:FF:B5:00:90:47:68:FF:20:26:30:C0:5D:00:28:26:D0:01:38:1D:D0:01:38:2A:D1:FF:24:95:34:E5:19:29:88:08:20:01:26:B6:46:37:4A:FE:44:10:47:00:29:01:D1:02:20:07:E0:E5:19:29:88:08:20:B6:46:31:4A:FE:44:10:47:48:1C:E9:88:0C:1C:44:43:60:2C:0F:D9:0F:E0:FF:20:99:30:C0:5B:5E:28:09:DB:C4:1C:08:E0:FF:20:ED:30:C4:5B:10:2C:02:DD:06:20:44:43:00:E0:60:24:41:20:00:21:01:22:96:46:1C:4A:FE:44:10:47:01:90:61:08:40:18:01:30:80:01:80:09:02:90:18:4D:00:26:A8:7B:00:28:1F:D0:28:7C:39:78:81:42:1B:D1:15:48:00:2E:00:D0:14:30:00:68:80:06:80:0E:01:99:08:18:80:01:80:09:02:99:01:22:96:46:0F:4A:FE:44:10:47:29:7B:03:91:01:22:96:46:0C:4A:FE:44:10:47:02:28:01:DA"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x0008623a, 0xfa, "03:98:04:19:28:35:01:36:02:2E:D8:D3:00:98:44:60:07:48:33:30:00:90:FF:BD:C0:46:93:E4:04:00:38:1D:08:00:0C:05:1A:00:39:7A:04:00:AD:45:05:00:7B:BF:02:00:AD:45:05:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:78:B5:01:24:A6:46:D6:48:FE:44:00:47:06:1C:D5:4D:28:68:D5:49:09:88:08:18:80:01:80:09:31:1C:A6:46:E3:4A:FE:44:10:47:00:28:0C:D4:E2:48:00:78:04:28:08:D1:E1:48:00:78:03:28:04:D1:2E:60:A6:46:DF:48:FE:44:00:47:DE:4D:28:68:19:21:49:01:08:18:80:01:80:09:31:1C:A6:46:D6:4A:FE:44:10:47:00:28:4C:D4:2E:60:E2:48:01:78:E2:48:00:88:08:43:1A:D0:00:29"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x00086334, 0xfa, "18:D0:22:21:E5:48:20:22:12:5C:01:2A:12:D1:09:5C:00:29:0F:D0:41:7F:08:29:0C:D1:09:21:41:77:E0:48:03:21:A6:46:DF:4A:FE:44:10:47:04:20:A6:46:DE:49:FE:44:08:47:00:25:68:1C:00:04:00:0C:A6:46:DB:49:FE:44:08:47:00:28:1D:D0:81:7C:0A:02:C1:7C:11:43:0A:02:01:7D:11:43:0A:02:41:7D:11:43:00:91:69:1C:00:78:A8:22:42:43:E2:48:80:5C:40:00:DF:4A:12:5A:E1:48:40:5D:DF:4B:1B:56:7B:20:80:00:A6:46:DF:4E:FE:44:30:47:01:35:07:2D:D5:DB:78:BD:30:B5:05:1C:AD:4C:7E:34:A0:78:03:28:0F:D1:20:88:00:28:0C:D1:E8:69:02:28:09:D1:01:20:86:46:D5:48:FE:44:00:47:02:20:A0:70:D3:48:CA:30:28:62:30:BD:F8:B5:06:1C:B7:69:B0:8A:00:90:D0:49:40:1A:0A:D0:97:38:51:D0:8C:38:45:D0:01:38:3C:D0:22:38:2B:D0:01:38:25:D0:F8:BD:21:20:C5:5D:38:1C:00:21:01:24:A6:46:E0:4A:FE:44:10:47:7D:21:C9:00:41:43"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x0008642e, 0xfa, "DC:48:01:60:00:2D:41:D0:FF:2D:3F:D0:38:1C:29:1C:A6:46:D9:4A:FE:44:10:47:D9:48:02:21:A6:46:D8:4A:FE:44:10:47:00:28:0E:D1:D2:48:D6:49:09:68:01:60:09:E0:01:20:D5:49:08:80:05:E0:38:1C:01:21:8E:46:D3:49:FE:44:08:47:38:1C:00:99:00:22:01:23:9E:46:D0:4B:FE:44:18:47:0C:E0:38:1C:01:21:8E:46:CD:49:FE:44:08:47:05:E0:38:1C:01:21:8E:46:CB:49:FE:44:08:47:CA:48:9E:30:30:62:F8:BD:01:24:A6:46:C8:48:FE:44:00:47:A6:46:C7:48:FE:44:00:47:F8:BD:70:B5:85:69:00:7D:44:21:40:1A:01:28:26:D9:0F:38:0C:D0:28:38:2B:D1:28:78:03:28:28:D1:3B:20:C0:43:05:21:49:57:81:42:22:DD:68:71:70:BD:28:78:00:28:1D:D1:DD:4E:30:1C:01:24:A6:46:DC:49:FE:44:08:47:A8:70:E8:1C:31:1C:0A:22:A6:46:D9:4B:FE:44:18:47:28:1C:A6:46:D7:49:FE:44:08:47:70:BD:57:48:00:78:04:28:04:D1:01:20:86:46:AB:48:FE:44"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x00086528, 0xfa, "00:47:70:BD:70:B5:04:1C:66:69:20:7F:17:22:80:1A:4F:4D:24:D0:68:38:34:D1:FF:20:7D:30:80:5D:0D:28:2F:D1:20:69:01:78:30:1C:01:24:A6:46:C7:4A:FE:44:10:47:01:1C:25:D0:08:68:B0:42:22:D1:77:3D:28:78:01:28:1E:D0:08:79:00:28:1B:D0:C1:4D:2C:70:4D:20:A6:46:C0:4A:FE:44:10:47:00:20:28:70:70:BD:82:3D:28:78:05:28:0D:DB:FF:20:79:30:81:5D:30:1C:24:23:01:25:AE:46:B8:4D:FE:44:28:47:B9:48:B7:49:08:18:20:62:70:BD:70:B5:05:1C:2C:69:A2:8E:23:8F:93:42:32:DD:B4:48:01:78:60:8D:01:30:41:43:08:04:00:0C:82:42:29:DA:C6:26:31:5D:C9:09:25:D1:10:1A:AE:49:08:18:83:42:20:DD:C5:20:00:5D:01:28:01:D0:03:28:1A:D1:30:5D:01:28:05:D1:CE:21:09:5D:10:29:04:D0:11:29:02:D0:02:28:0A:D0:70:BD:B5:20:00:5D:00:21:01:22:96:46:E2:4A:FE:44:10:47:02:20:30:55:E1:49:97:20:C0:00:40:18:28:62:70:BD"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x00086622, 0xfa, "C0:46:47:76:04:00:5C:61:08:00:4A:61:08:00:70:B5:02:69:D4:8E:15:8F:A5:42:1A:DD:C8:21:8B:5C:40:21:19:40:DE:11:F6:01:31:43:12:D1:2C:1B:59:49:86:31:09:78:09:02:8C:42:0B:DD:02:2B:09:D1:C7:21:89:5C:01:29:01:D0:03:29:03:D1:EA:49:E8:4A:51:18:01:62:70:BD:39:7A:04:00:45:10:08:00:2C:24:08:00:B1:6A:08:00:58:61:08:00:30:B5:E3:49:E3:4A:13:32:1F:20:00:23:01:24:A6:46:E1:4D:FE:44:28:47:E2:48:00:88:40:0A:00:D2:00:24:DE:48:04:70:30:BD:C0:46:84:18:08:00:46:61:08:00:10:B5:DC:49:DC:4A:5D:32:1F:20:00:23:01:24:A6:46:D5:4C:FE:44:20:47:10:BD:50:17:08:00:00:04:1A:00:B5:F5:04:00:F9:15:05:00:D9:8F:01:00:10:B5:69:4B:1B:78:40:8D:01:30:43:43:1C:04:24:0C:66:4B:91:42:07:DB:88:1A:19:1B:88:42:0C:DD:01:21:09:04:40:1A:10:BD:A1:42:02:DA:18:1B:82:42:01:DC:88:1A:10:BD:88:1A:18:18"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x0008671c, 0xfa, "10:BD:C0:46:20:0C:1A:00:CD:18:08:00:78:20:08:00:59:15:08:00:85:87:04:00:3F:83:02:00:11:24:03:00:06:FD:00:00:F8:B5:0E:1C:04:1C:00:90:01:25:AE:46:D4:49:FE:44:08:47:20:1C:03:21:AE:46:D2:4A:FE:44:10:47:07:1C:12:48:04:1C:04:3C:26:80:00:98:07:21:AE:46:0D:4A:FE:44:10:47:00:28:01:D1:70:08:60:80:0B:48:02:21:AE:46:0B:4A:FE:44:10:47:00:28:07:D1:38:1C:70:43:08:49:08:60:AE:46:C4:49:FE:44:08:47:F8:BD:C0:46:B8:62:08:00:51:2A:00:00:41:67:08:00:04:50:1A:00:6B:F7:04:00:6C:4F:08:00:62:61:08:00:8D:6A:08:00:A9:25:05:00:45:6F:08:00:D9:6F:08:00:7D:5E:00:00:8D:6D:08:00:C5:6E:08:00:F8:B5:00:90:45:69:68:7C:10:28:11:D1:28:7C:B1:49:06:28:0B:D0:0A:88:01:2A:0A:D1:01:28:01:D0:00:20:05:E0:00:20:08:80:03:20:28:74:01:E0:01:20:08:80:68:7C:0D:28:1B:D1:28:7C:00:28:18:D1:E5:4F"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x00086816, 0xfa, "02:26:38:1C:01:24:A6:46:E4:49:FE:44:08:47:03:E0:A6:46:E2:49:FE:44:08:47:00:28:06:D0:01:7A:0D:29:F6:D1:DF:49:6A:31:00:98:01:62:0C:37:01:3E:E8:D1:68:7C:06:28:0A:D1:28:7C:DB:49:06:28:04:D0:08:88:01:28:03:D1:00:20:00:E0:01:20:08:80:F8:BD:60:12:08:00:ED:2F:01:00:09:59:05:00:51:BC:04:00:69:7D:02:00:64:61:08:00:93:E4:04:00:85:F8:00:00:18:0F:00:00:1D:E4:00:00:2E:2E:08:00:FF:FF:00:00:F8:B5:00:90:82:69:51:78:C7:69:0B:1F:70:D0:21:3B:C6:48:33:D0:01:3B:73:D1:04:23:BB:80:0C:23:DE:19:49:00:12:78:0A:43:32:70:01:36:00:78:00:28:02:D1:06:25:28:1C:01:E0:07:20:06:25:30:70:01:36:30:1C:0D:21:01:24:A6:46:BA:4A:FE:44:10:47:06:1C:A6:46:B9:48:FE:44:00:47:C0:06:C0:0E:81:02:B5:48:00:78:40:06:40:0E:08:43:07:21:C9:01:01:43:09:04:09:0C:30:1C:A6:46:AE:4A:FE:44:10:47:30:E0"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x00086910, 0xfa, "04:23:BB:80:0C:23:DE:19:49:00:12:78:0A:43:32:70:01:36:00:78:00:28:02:D1:06:25:28:1C:01:E0:07:20:06:25:30:70:01:36:30:1C:0D:21:01:24:A6:46:A1:4A:FE:44:10:47:06:1C:A6:46:A0:48:FE:44:00:47:C0:06:C0:0E:81:02:9C:48:00:78:40:06:40:0E:08:43:07:21:C9:01:01:43:09:04:09:0C:30:1C:A6:46:95:4A:FE:44:10:47:7D:80:03:20:38:80:C7:48:C6:49:09:18:00:98:01:62:F8:BD:10:79:27:28:04:D1:50:79:1E:28:01:D1:23:20:50:71:F8:BD:C0:46:CB:A3:00:00:ED:92:00:00:30:B5:05:1C:EC:69:21:88:08:04:00:0E:02:02:25:20:00:02:10:1A:10:D0:2F:22:12:02:80:1A:27:D1:08:06:00:0E:04:28:23:D1:60:7A:01:21:8E:46:B3:49:FE:44:08:47:00:28:10:D0:30:BD:21:78:A8:20:48:43:B0:4A:10:5C:00:28:13:D0:76:48:C0:38:00:78:00:28:0E:D1:E3:48:40:5C:07:28:0A:DB:20:1C:01:21:8E:46:E1:49:FE:44:08:47:E0:49:A3:48:78:30"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x00086a0a, 0xfa, "40:18:28:62:30:BD:82:04:00:00:45:9F:00:00:17:71:08:00:A9:86:00:00:E9:70:08:00:55:31:19:00:3E:A6:1B:00:D7:71:08:00:AD:99:00:00:30:B5:01:69:DC:4A:C8:68:90:42:24:D1:DB:48:00:78:80:08:20:D2:DD:48:42:7F:05:2A:1C:D1:02:22:42:77:D7:48:00:78:C8:70:59:48:C1:38:00:78:FF:28:06:D1:D7:48:03:21:01:22:96:46:D6:4A:FE:44:10:47:01:24:D0:4D:2C:80:A6:46:D0:48:FE:44:00:47:2C:80:A6:46:CD:48:FE:44:00:47:30:BD:00:B5:00:21:01:22:96:46:CE:4A:FE:44:10:47:CC:49:08:80:00:BD:B1:2F:00:00:65:2A:00:00:CD:16:03:00:44:61:08:00:F8:B5:C8:48:00:88:C0:08:C7:4C:22:88:CB:49:8A:42:39:D0:CB:49:09:78:03:29:35:D1:61:88:8D:1A:C3:4A:83:1A:88:42:02:D5:00:22:D7:43:00:E0:01:27:00:2D:02:D5:00:22:D6:43:00:E0:01:26:BD:4A:12:78:96:46:BC:4A:12:78:94:46:01:22:00:92:BB:4A:B7:42:11:D1:76:46:36:06"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x00086b04, 0xfa, "36:16:5E:43:67:46:3E:41:00:2D:04:DC:00:2B:0B:DD:12:78:96:19:08:E0:00:2B:06:DC:12:78:B6:1A:03:E0:16:78:00:2B:00:DC:76:42:E0:4A:12:78:DE:4B:1A:70:02:E0:61:88:00:26:00:96:E0:4A:12:68:13:1C:73:43:1B:15:21:80:60:80:DA:48:00:78:31:1C:00:DA:49:42:81:42:04:DD:00:2E:00:D5:40:42:50:43:03:15:17:4D:41:3D:E8:6F:1E:18:D3:48:00:78:50:43:00:0D:B1:1A:00:DA:49:42:81:42:15:D8:00:98:00:28:12:D0:CE:48:00:78:00:28:0E:D0:E7:48:02:21:01:24:A6:46:E6:4A:FE:44:10:47:00:28:05:D1:EE:67:30:1C:A6:46:E3:49:FE:44:08:47:F8:BD:C0:46:5C:18:08:00:4F:0C:04:00:5B:0C:04:00:89:3F:04:00:46:61:08:00:31:4F:08:00:E7:2A:00:00:FB:4F:08:00:89:91:04:00:F0:B5:05:1C:AE:69:EF:69:38:88:D6:49:40:1A:3E:D0:D5:49:40:1A:01:28:2F:D9:25:38:51:D1:D4:48:00:88:00:28:4D:D0:30:1C:01:24:A6:46:D0:49:FE:44"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x00086bfe, 0xfa, "08:47:FF:20:1C:30:81:5D:00:29:01:D1:02:21:81:55:FF:21:1E:31:89:5D:00:29:04:D1:82:5D:01:2A:01:D0:00:2A:06:D1:01:29:0A:D1:80:5D:03:28:07:D0:02:28:05:D0:30:1C:A6:46:E3:49:FE:44:08:47:24:E0:30:1C:A6:46:E1:49:FE:44:08:47:1E:E0:3A:20:80:5D:00:28:1F:D0:38:1C:01:21:8E:46:4B:49:FE:44:08:47:13:E0:D8:48:00:78:05:28:14:DB:FF:20:26:30:82:5D:30:1C:07:21:00:23:01:24:A6:46:D6:4E:FE:44:30:47:38:1C:A6:46:40:49:FE:44:08:47:D1:49:5F:20:00:01:40:18:28:62:F0:BD:C0:46:CA:04:00:00:61:DE:00:00:0B:34:04:00:C8:18:08:00:F0:B5:85:B0:07:1C:B8:69:04:90:B9:8A:EA:48:08:1A:26:D0:EA:49:40:1A:5E:D1:E9:4D:C5:48:00:78:02:28:59:D1:01:24:A6:46:E7:48:FE:44:00:47:00:28:52:D1:A6:46:E5:48:FE:44:00:47:00:28:4C:D1:A6:46:E3:48:FE:44:00:47:00:28:46:D1:28:78:00:28:43:D1:A8:78:00:28:40:D1"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x00086cf8, 0xfa, "A6:20:A6:46:DD:49:FE:44:08:47:3A:E0:04:98:00:21:6A:46:01:24:A6:46:DA:4B:FE:44:18:47:02:A8:00:21:06:22:A6:46:D7:4B:FE:44:18:47:00:25:02:E0:68:1C:05:04:2D:0C:D4:48:00:78:85:42:22:DA:11:20:40:01:68:43:D2:49:0E:18:10:20:80:19:69:46:A6:46:D0:4A:FE:44:10:47:00:28:EA:D1:68:46:02:A9:A6:46:CC:4A:FE:44:10:47:00:28:E2:D0:B0:78:01:28:DF:D0:04:98:BC:49:3A:22:A6:46:C7:4B:FE:44:18:47:C6:48:E2:30:38:62:05:B0:F0:BD:C0:46:50:15:08:00:8D:08:04:00:D9:A3:02:00:10:B5:17:4C:10:48:04:80:01:20:86:46:BE:48:FE:44:00:47:BE:49:08:60:0D:48:04:80:44:80:10:BD:C0:46:7B:86:03:00:11:22:08:00:4A:56:08:00:82:07:1A:00:F9:8E:03:00:50:17:08:00:00:04:1A:00:B5:F5:04:00:60:61:08:00:51:2A:00:00:50:1D:18:00:54:61:08:00:68:10:00:00:4E:61:08:00:4F:61:08:00:52:61:08:00:FF:FF:00:00:2C:24"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x00086df2, 0xfa, "08:00:F0:B5:06:1C:35:69:D5:27:7F:00:B1:69:00:29:52:D0:8A:88:50:18:52:18:13:7A:5A:08:F8:2B:01:D3:43:7A:00:E0:00:23:00:7A:C0:07:C0:0F:84:46:39:20:40:5D:A0:4C:25:28:01:D1:13:2A:32:D0:0A:28:03:D1:0F:2A:25:D0:13:2A:23:D0:3A:20:40:5D:20:28:01:D1:19:2B:13:D0:18:2A:2F:D1:24:28:2D:D1:78:5D:02:28:05:D1:28:1C:01:21:8E:46:90:49:FE:44:08:47:28:1C:01:21:8E:46:8E:49:FE:44:08:47:F0:BD:FF:20:6D:30:40:19:01:22:96:46:8A:4A:FE:44:10:47:F6:34:12:E0:28:1C:61:46:24:23:01:25:AE:46:87:4D:FE:44:28:47:08:E0:28:1C:61:46:13:22:24:23:01:25:AE:46:82:4D:FE:44:28:47:EC:34:34:62:F0:BD:4D:61:08:00:4C:61:08:00:51:61:08:00:53:61:08:00:50:61:08:00:B8:62:08:00:78:B5:00:26:00:96:01:24:A6:46:78:48:FE:44:00:47:77:4D:A8:6D:69:46:A6:46:76:4A:FE:44:10:47:17:21:00:98:01:70:A8:6D:00:99"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x00086eec, 0xfa, "32:1C:A6:46:72:4B:FE:44:18:47:72:4D:0C:20:A8:81:28:69:40:88:0C:28:0C:D0:01:26:B6:02:00:2E:08:D0:A6:46:6D:48:FE:44:00:47:01:3E:28:69:40:88:0C:28:F4:D1:A6:46:69:48:FE:44:00:47:78:BD:04:50:1A:00:6B:F7:04:00:CD:16:03:00:03:08:00:00:F0:F4:00:00:05:68:03:00:62:61:08:00:F0:B5:87:B0:06:90:60:48:07:68:01:24:A6:46:57:48:FE:44:00:47:5D:4E:30:1C:01:30:C0:5D:6D:46:28:71:F0:5D:68:71:A8:1D:0B:21:C9:01:C9:59:A6:46:58:4A:FE:44:10:47:AF:21:C9:00:C9:59:A6:46:54:4A:FE:44:10:47:57:21:09:01:C9:59:A6:46:51:4A:FE:44:10:47:22:3E:F1:59:A6:46:4E:4A:FE:44:10:47:A6:46:49:48:FE:44:00:47:12:20:28:70:06:98:4A:49:00:22:01:AB:A6:46:49:4C:FE:44:20:47:07:B0:F0:BD:C3:0F:08:00:17:08:05:00:35:F7:01:00:D9:E5:01:00:1D:42:02:00:45:10:08:00:F8:B5:00:90:3B:48:07:68:01:25:AE:46:32:48"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x00086fe6, 0xfa, "FE:44:00:47:00:24:38:4E:30:1C:32:38:C4:51:30:1C:2A:38:C4:51:30:1C:22:38:C4:51:B1:20:C0:00:C4:51:30:1C:1A:38:C4:51:59:20:00:01:C4:51:30:1C:12:38:C4:51:08:20:C0:19:04:21:AE:46:2F:4A:FE:44:10:47:B3:20:C0:00:C4:51:57:20:00:01:C4:51:AF:20:C0:00:C4:51:0B:20:C0:01:C4:51:01:3E:F4:55:AE:46:20:48:FE:44:00:47:00:98:22:49:01:39:22:1C:AE:46:23:4B:FE:44:18:47:F8:BD:05:04:00:00:19:1C:00:00:C1:0F:08:00:99:51:03:00:9B:33:03:00:CD:33:04:00:89:E4:04:00:81:2A:00:00:15:5F:05:00:33:4F:08:00:00:00:08:00:81:94:03:00:D9:3E:02:00:25:00:00:00:47:76:04:00:5C:61:08:00:91:74:04:00:91:F7:01:00:8B:09:04:00:8B:F7:00:00:85:F8:00:00:47:15:05:00:14:54:08:00:BD:59:05:00:E7:59:05:00:14:24:08:00:21:8F:03:00:85:26:04:00:DC:50:08:00:A6:05:00:00:D5:2A:00:00:2A:FE:00:00:1D:26:05:00"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x000870e0, 0xfa, "99:94:03:00:A9:25:05:00:40:1E:80:00:D8:4B:19:50:D6:49:0A:50:F7:46:00:B5:D6:4A:01:8B:91:42:07:D0:40:69:40:30:2C:21:01:22:96:46:EC:4A:FE:44:10:47:EB:48:2B:30:00:BD:FC:B5:01:90:45:69:00:24:B8:20:40:5D:01:28:37:D1:C7:26:70:5D:01:28:0D:D0:03:28:0B:D0:28:1C:01:21:8E:46:EA:49:FE:44:08:47:BF:20:40:5D:01:28:27:D1:6C:8D:25:E0:C0:20:44:55:77:5D:74:55:28:1C:01:21:8E:46:E2:49:FE:44:08:47:77:55:BF:26:70:5D:01:28:16:D1:E9:8E:2A:8F:28:1C:01:23:9E:46:DD:4B:FE:44:18:47:00:04:00:0C:04:28:06:DD:6C:8D:C0:1E:84:42:06:DB:04:04:24:0C:03:E0:03:21:C0:20:41:55:74:55:28:8D:61:1C:41:43:08:04:00:0C:01:99:88:61:D1:49:FC:39:09:78:C9:09:10:D3:2E:8D:31:1C:01:24:A6:46:EC:4A:FE:44:10:47:00:96:EB:48:02:78:BB:20:43:5D:3A:20:A6:46:EE:4C:FE:44:20:47:ED:48:B5:30:FC:BD:01:1C:0A:7B"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x000871da, 0xfa, "EC:48:00:2A:02:D0:C9:69:02:29:01:D1:63:30:F7:46:E9:49:43:39:08:18:F7:46:02:8A:01:79:0A:29:00:DB:0A:21:E5:48:8A:42:01:DD:65:30:F7:46:5B:30:F7:46:01:6A:C8:7B:00:02:89:7B:01:43:B5:48:52:30:02:88:DF:48:91:42:01:D1:2D:30:F7:46:29:30:F7:46:F0:B5:DC:49:00:7F:C0:00:40:18:02:1F:13:88:87:48:DA:38:18:40:10:80:2F:27:3F:02:EF:4D:2F:82:0C:04:24:0C:2C:80:14:26:08:E0:64:20:01:21:8E:46:EB:49:FE:44:08:47:70:1E:06:06:36:0E:A8:89:80:0B:01:D2:00:2E:F1:D1:A8:89:40:05:40:0F:17:D0:07:20:00:02:68:81:2F:82:EB:48:28:81:2C:80:14:24:08:E0:64:20:01:21:8E:46:DD:49:FE:44:08:47:60:1E:04:06:24:0E:A8:89:80:0B:01:D2:00:2C:F1:D1:A8:89:68:88:BC:48:FF:30:34:30:F0:BD:10:B5:01:6A:DF:4A:12:68:92:88:12:13:92:07:93:0F:DD:4A:02:2B:01:D0:13:88:00:E0:03:8B:44:68:0C:19:44:60:83:61:48:88"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x000872d4, 0xfa, "18:1A:10:80:AF:48:E7:30:10:BD:70:B5:05:1C:68:68:00:28:1A:D1:D3:4E:35:20:00:01:84:19:20:68:01:21:8E:46:D1:49:FE:44:08:47:20:7F:00:28:0D:D0:CF:48:00:78:02:28:09:D0:E0:7F:50:21:41:43:71:18:48:8E:01:30:48:86:60:8A:01:38:60:82:00:20:C3:49:08:60:01:20:86:46:C6:48:FE:44:00:47:68:60:C5:48:65:30:70:BD:C5:48:D5:30:F7:46:00:B5:40:69:01:21:8E:46:C2:49:FE:44:08:47:C2:48:35:30:00:BD:41:69:09:7C:06:29:02:D1:01:21:BF:4A:11:80:0F:21:81:60:BE:48:53:30:F7:46:C1:68:43:68:0A:78:0C:2A:07:D1:BB:4A:12:78:00:2A:01:D1:06:22:00:E0:07:22:4A:70:43:61:B7:48:09:30:F7:46:10:B5:80:69:B4:49:09:78:00:29:09:D1:06:24:04:70:01:30:00:21:01:22:96:46:B1:4A:FE:44:10:47:08:E0:07:24:04:70:01:30:00:21:01:22:96:46:AC:4A:FE:44:10:47:04:70:01:30:0D:21:01:24:A6:46:A8:4A:FE:44:10:47:E9:49"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x000873ce, 0xfa, "A6:46:A5:4A:FE:44:10:47:E8:48:5D:30:10:BD:01:1C:E8:48:02:78:E6:48:00:2A:01:D0:5D:30:F7:46:28:22:8A:60:C0:1C:F7:46:E3:49:09:78:05:29:02:D1:01:21:E2:4A:11:70:23:21:81:60:E1:48:27:30:F7:46:10:B5:01:7E:00:7D:08:43:DE:4C:0A:D0:00:20:ED:49:08:70:01:20:86:46:EC:48:FE:44:00:47:20:1C:79:30:10:BD:20:1C:71:30:10:BD:81:69:4A:78:C2:60:49:78:18:29:01:DB:17:21:C1:60:E4:48:39:30:F7:46:C0:46:04:F3:1A:00:80:7B:08:00:D9:FC:00:00:F0:B5:45:68:87:68:01:24:A4:02:05:E0:01:20:86:46:E7:48:FE:44:00:47:01:3C:A8:78:69:78:09:1A:E5:4E:03:29:10:D0:C9:1C:0E:D0:00:2C:0E:D0:03:28:02:DB:C0:1E:00:06:00:0E:34:21:41:43:48:19:03:30:38:60:30:1C:21:30:F0:BD:00:2C:E0:D1:04:21:EB:48:0A:1C:23:1C:01:24:A6:46:EA:4C:FE:44:20:47:30:1C:25:30:F0:BD:C0:46:99:94:03:00:F9:8C:00:00:10:B5:E5:4C"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x000874c8, 0xfa, "A0:88:01:21:8E:46:E4:49:FE:44:08:47:00:28:01:D1:E3:48:A0:80:E1:48:FF:30:6E:30:10:BD:15:86:00:00:E5:66:08:00:62:4F:08:00:F8:B5:04:1C:A0:69:0E:21:0E:18:21:7F:00:29:2C:D1:30:1C:01:25:AE:46:D9:49:FE:44:08:47:00:28:01:D1:00:27:08:E0:AE:46:D6:49:FE:44:08:47:00:78:A8:21:41:43:D4:48:47:5C:38:1C:AE:46:D7:49:FE:44:08:47:80:00:00:90:38:1C:AE:46:CF:49:FE:44:08:47:AE:46:CE:49:FE:44:08:47:02:1C:02:36:30:1C:00:99:51:18:AE:46:CB:4A:FE:44:10:47:A0:69:60:60:C9:48:81:30:F8:BD:CA:48:1B:30:F7:46:AD:45:05:00:A5:21:08:00:C7:49:0A:1C:3A:32:12:78:09:78:89:18:41:60:C5:48:83:30:F7:46:FB:8B:04:00:A9:86:00:00:AD:99:00:00:C6:05:00:00:0F:AA:00:00:55:DE:02:00:00:A0:1B:00:F8:B5:00:25:00:95:B0:49:C0:48:00:88:88:42:01:D0:01:26:06:E0:28:1C:01:21:8E:46:B7:4A:FE:44:10:47:2E:1C"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x000875c2, 0xfa, "A6:4F:01:24:3C:76:A6:46:B4:48:FE:44:00:47:3D:72:B3:4F:B8:6D:69:46:A6:46:8C:4A:FE:44:10:47:15:21:00:98:01:70:00:98:46:70:B8:6D:00:99:2A:1C:A6:46:AC:4B:FE:44:18:47:AB:48:3B:30:F8:BD:C0:46:18:80:1B:00:C3:8E:03:00:10:B5:04:1C:96:49:A7:48:00:88:88:42:05:D1:00:20:01:21:8E:46:9E:4A:FE:44:10:47:01:20:A0:60:A2:48:57:30:10:BD:03:13:00:00:D4:48:08:00:48:61:08:00:84:45:08:00:A3:56:05:00:CE:0F:08:00:29:19:02:00:0F:1A:02:00:81:26:01:00:DB:EF:04:00:B9:28:05:00:44:61:08:00:DB:22:03:00:31:4F:08:00:5D:86:02:00:E7:2A:00:00:FE:B5:00:90:86:69:00:6A:01:90:30:89:00:28:01:D1:00:24:73:E0:31:68:2D:24:75:4A:2C:20:80:18:02:90:3E:23:01:9D:5B:5D:00:78:83:42:06:D0:A0:5C:83:42:01:D1:01:27:02:E0:02:27:00:E0:00:27:48:68:00:0F:1D:D2:30:1C:01:25:AE:46:80:49:FE:44:08:47:04:1C"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x000876bc, 0xfa, "30:68:00:28:05:D0:00:1F:31:1C:AE:46:7C:4A:FE:44:10:47:30:89:00:28:49:D1:4A:21:01:98:08:5C:00:28:44:D1:02:2F:42:D0:FF:21:02:98:39:54:3E:E0:08:25:4C:1B:74:48:00:2F:11:D1:21:88:00:29:03:D1:00:20:30:60:70:60:07:E0:21:88:40:18:31:1C:01:22:96:46:6B:4A:FE:44:10:47:00:20:20:80:11:E0:01:2F:0F:D1:A1:88:00:29:03:D1:00:20:30:60:70:60:06:E0:40:18:31:1C:01:22:96:46:62:4A:FE:44:10:47:00:20:A0:80:30:89:01:38:30:81:E0:78:40:07:40:0F:05:43:E5:70:30:89:00:28:09:D1:4A:21:01:98:08:5C:00:28:04:D1:02:2F:02:D0:FF:21:02:98:39:54:08:34:00:98:44:60:51:48:51:30:FE:BD:C0:46:A1:1B:00:00:5D:15:00:00:A5:E0:01:00:64:61:08:00:6D:17:08:00:29:22:08:00:2F:85:03:00:C1:CB:03:00:F0:B5:05:1C:AE:69:00:24:6C:60:10:E0:11:20:40:01:60:43:47:49:0F:18:10:20:C0:19:31:1C:01:22:96:46:44:4A"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x000877b6, 0xfa, "FE:44:10:47:00:28:00:D1:6F:60:01:34:42:48:00:78:84:42:EA:DB:41:48:47:30:F0:BD:1E:17:08:00:F1:CA:03:00:91:90:03:00:30:B5:45:69:68:7A:FF:28:0D:D0:01:24:A6:46:3A:49:FE:44:08:47:C2:21:08:5C:02:28:04:D0:68:7A:A6:46:36:49:FE:44:08:47:36:48:CF:30:30:BD:17:8F:03:00:BD:59:05:00:70:B5:81:68:81:61:45:68:B8:20:40:5D:32:4E:02:28:11:D1:01:24:A6:46:2E:48:FE:44:00:47:00:28:0A:D0:A6:46:2C:48:FE:44:00:47:01:28:04:D1:BC:20:44:55:30:1C:8F:30:70:BD:30:1C:C0:1C:70:BD:27:48:65:30:F7:46:C0:46:1F:03:00:00:DF:87:04:00:14:24:08:00:19:90:01:00:89:8D:01:00:FF:FF:00:00:F5:2A:00:00:D9:8F:01:00:CB:18:08:00:E9:76:04:00:C5:76:04:00:D5:2A:00:00:39:14:02:00:C5:79:04:00:9D:B1:03:00:87:0F:08:00:79:95:01:00:29:D9:00:00:11:DE:02:00:14:54:08:00:E7:59:05:00:59:DD:02:00:60:61:08:00"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x000878b0, 0xf4, "D5:44:00:00:ED:20:05:00:4D:0B:04:00:13:22:05:00:00:00:18:00:00:00:08:00:81:94:03:00:33:4F:08:00:8D:D0:03:00:0B:34:04:00:1F:33:04:00:5D:27:05:00:19:DE:01:00:CD:33:04:00:BD:A6:00:00:B1:82:00:00:FF:B5:68:46:FE:F7:5A:FE:FF:BD:FF:B5:68:46:FE:F7:97:FE:FF:BD:FF:B5:68:46:FF:F7:CC:F9:FF:BD:FF:B5:68:46:FD:F0:ED:FA:FF:BD:FF:B5:68:46:FE:F7:50:FD:FF:BD:FF:B5:68:46:FD:F0:BB:FA:FF:BD:FF:B5:68:46:FE:F7:AA:FE:FF:BD:FF:B5:68:46:FE:F7:BD:FE:FF:BD:FF:B5:68:46:FE:F7:BA:FD:FF:BD:FF:B5:68:46:FE:F7:43:FF:FF:BD:FF:B5:68:46:FE:F7:E8:FD:FF:BD:FF:B5:68:46:FE:F7:AF:FC:FF:BD:FF:B5:68:46:FE:F7:40:FD:FF:BD:FF:B5:68:46:FF:F7:3D:FA:FF:BD:FF:B5:68:46:FF:F7:26:F9:FF:BD:FF:B5:68:46:FF:F7:53:F8:FF:BD:FF:B5:68:46:FE:F7:7E:FF:FF:BD:FF:B5:68:46:FE:F7:FF:FF:FF:BD"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x00087b78, 0x88, "00:B5:F8:F0:41:FA:00:BD:F7:70:08:00:51:73:08:00:AF:72:08:00:DF:72:08:00:69:73:08:00:3D:73:08:00:8B:73:08:00:DD:73:08:00:F5:73:08:00:37:73:08:00:69:61:08:00:00:00:00:00:0D:74:08:00:35:74:08:00:C5:74:08:00:DD:77:08:00:59:74:08:00:0B:72:08:00:29:72:08:00:A1:75:08:00:09:76:08:00:11:78:08:00:4D:78:08:00:F1:74:08:00:63:75:08:00:71:75:08:00:6D:76:08:00:95:77:08:00:00:00:00:00:00:00:00:00:17:71:08:00:F3:71:08:00"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x001af304, 0x80, "1E:8D:00:00:2C:23:03:00:3A:DF:02:00:3A:1A:02:00:64:86:02:00:E8:28:05:00:7E:15:00:00:A6:E0:01:00:54:85:03:00:52:27:01:00:7C:BF:02:00:FF:FF:FF:FF:2E:CC:03:00:C8:90:03:00:F0:8E:01:00:22:28:05:00:BE:59:05:00:72:DE:02:00:6E:DF:02:00:64:DD:02:00:22:45:00:00:BE:A6:00:00:08:83:00:00:B8:14:02:00:AE:B1:03:00:F8:95:01:00:F4:20:05:00:CE:D0:03:00:FF:FF:FF:FF:FF:FF:FF:FF:BC:86:00:00:66:AA:00:00"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x00180000, 0xfa, "F0:B5:60:4E:07:22:32:70:10:23:73:70:47:20:B0:70:21:20:F0:70:03:25:28:1C:5C:49:01:39:01:24:A6:46:59:4F:FE:44:38:47:B2:78:F3:78:28:1C:57:49:A6:46:55:4E:FE:44:30:47:28:1C:54:49:01:31:A6:46:54:4A:FE:44:10:47:28:1C:B9:21:C9:00:A6:46:50:4A:FE:44:10:47:A6:46:4F:48:FE:44:00:47:4F:4B:00:21:08:1C:1A:68:00:2A:04:D0:02:07:15:0F:22:1C:AA:40:11:43:02:07:12:0F:0F:2A:05:D1:C5:08:06:22:2A:40:47:4D:A9:52:00:21:04:33:01:30:20:28:E9:D3:3F:20:44:49:08:70:A6:46:44:48:FE:44:00:47:42:49:08:60:C8:20:42:49:08:80:3C:23:42:48:03:70:02:20:41:49:08:70:FF:22:41:48:02:70:41:48:04:70:41:48:04:70:41:48:04:70:41:48:03:70:28:23:43:70:14:23:83:70:08:20:3E:4B:18:70:3E:48:0C:25:05:73:0B:23:83:73:0D:23:43:73:81:20:00:03:3B:4B:18:60:3E:48:03:1C:5A:33:1C:60:00:27:38:4B:1F:70:39:4B"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x001800fa, 0xfa, "38:4E:33:80:02:70:39:4A:13:80:4F:30:04:70:09:20:21:21:C9:00:0F:22:36:4B:A6:46:36:4E:FE:44:30:47:38:4E:30:1C:36:38:04:21:A6:46:33:4A:FE:44:10:47:20:1C:86:46:32:49:FE:44:08:47:30:1C:29:1C:A6:46:2E:4A:FE:44:10:47:30:1C:29:1C:A6:46:2E:4A:FE:44:10:47:2D:4E:A8:19:A6:46:2D:49:FE:44:08:47:30:1C:A6:46:2A:49:FE:44:08:47:A6:46:29:48:FE:44:00:47:38:1C:A6:46:29:49:FE:44:08:47:26:49:08:60:27:48:07:60:27:48:07:80:F0:BD:C0:46:F8:4F:08:00:7B:88:04:00:C6:05:00:00:65:88:04:00:53:02:18:00:80:7B:08:00:84:F3:1A:00:BF:11:08:00:58:61:08:00:47:76:04:00:4A:61:08:00:51:61:08:00:52:61:08:00:53:61:08:00:4E:61:08:00:4F:61:08:00:50:61:08:00:10:31:19:00:15:13:08:00:D8:11:08:00:F4:20:08:00:64:61:08:00:60:61:08:00:FF:FF:00:00:62:4F:08:00:18:24:08:00:B0:3E:18:00:31:06:04:00"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x001801f4, 0xfa, "9D:F5:04:00:C3:8E:03:00:36:02:1A:00:B5:F5:04:00:A0:17:08:00:CB:07:04:00:07:58:02:00:BC:62:08:00:C5:79:04:00:C0:62:08:00:62:61:08:00:70:B5:43:4D:AE:7F:01:24:A6:46:3F:48:FE:44:00:47:B0:42:F8:D1:03:20:17:21:89:01:A6:46:3B:4A:FE:44:10:47:AD:7F:A6:46:38:48:FE:44:00:47:A8:42:F9:D1:FE:E7:70:B5:38:49:08:1F:38:4A:10:60:04:24:35:48:04:70:44:48:02:1C:70:3A:21:23:9B:18:01:25:1D:70:33:4D:0D:60:02:25:55:71:32:4D:4D:60:03:25:15:70:31:4D:8D:60:14:71:31:4C:CC:60:16:24:A4:18:05:25:25:70:2F:4D:0D:61:06:25:D5:74:2E:4D:4D:61:07:25:95:71:95:1D:2C:4E:8E:61:08:26:A6:77:2B:4C:CC:61:09:24:94:70:2A:4C:0C:62:0A:24:AC:77:29:4C:4C:62:0B:24:5C:77:28:4C:8C:62:0C:24:D4:71:27:4A:CA:62:0D:22:5A:75:26:4A:0A:63:0E:22:02:70:26:4A:4A:63:0F:22:42:70:25:4A:8A:63:10:22:C2:73:24:4A"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x001802ee, 0xba, "CA:63:01:38:11:22:02:70:23:4A:0A:64:12:22:02:71:22:48:48:64:00:20:23:49:08:80:23:49:08:80:19:21:49:01:1E:4A:11:80:4B:21:09:01:20:4A:D1:83:20:49:21:4A:11:80:1B:49:08:70:70:BD:C5:83:04:00:65:88:04:00:3C:4E:08:00:F2:4F:08:00:70:62:08:00:70:52:08:00:55:79:08:00:41:79:08:00:5F:79:08:00:69:79:08:00:4B:79:08:00:91:79:08:00:9B:79:08:00:87:79:08:00:7D:79:08:00:73:79:08:00:05:79:08:00:0F:79:08:00:23:79:08:00:E4:52:08:00:F1:78:08:00:FB:78:08:00:2D:79:08:00:37:79:08:00:19:79:08:00:98:23:08:00:54:1D:18:00:44:61:08:00:46:61:08:00:14:24:08:00:FF:FF:00:00:50:1D:18:00"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Write_Memory_Block 0xFF05, 0x00184ea0, 0xec, "70:B5:06:1C:2C:4C:A0:8A:0F:28:1D:DA:20:89:00:28:1A:D0:2A:48:04:21:01:25:AE:46:2C:4A:FE:44:10:47:00:28:11:D1:20:1C:AE:46:25:49:FE:44:08:47:01:1C:08:30:24:4A:10:80:0C:20:00:19:AE:46:24:4A:FE:44:10:47:A0:8A:0F:28:E1:DB:1F:48:40:30:30:62:70:BD:F8:B5:FF:21:0B:31:80:8A:88:42:2C:D1:00:20:01:25:AE:46:1C:49:FE:44:08:47:01:1C:00:90:1A:4C:20:68:01:30:20:60:2B:27:FF:00:18:4E:19:48:00:8C:32:68:10:18:80:01:80:09:AE:46:17:4A:FE:44:10:47:00:28:11:DD:00:98:30:60:20:68:03:28:0A:D9:00:20:AE:46:10:49:FE:44:08:47:0E:48:38:5C:AE:46:0D:49:FE:44:08:47:00:20:20:60:F8:BD:A0:17:08:00:4A:0C:1A:00:4D:0B:04:00:32:02:1A:00:A5:57:02:00:6B:F7:04:00:8B:09:04:00:C5:79:04:00:C0:62:08:00:BC:62:08:00:48:10:08:00:49:11:02:00:39:7A:04:00"
    Wait_HCI_Command_Complete_VS_Write_Memory_Block_Event 5000, any, 0xff05, 0x00
    Send_HCI_VS_Goto_Address 0xFF83, 0x00087b79, 0x00000000, 0x00000000, 0x00000000, 0x00000000
    Wait_HCI_Command_Complete_VS_Goto_Address_Event 5000, any, 0xff83, 0x00
    
    
    
    
    Send_HCI_VS_Sleep_Mode_Configurations 0xFD0C, 0x01, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0064
    Wait_HCI_Command_Complete_VS_Sleep_Mode_Configurations_Event 5000, any, 0xfd0c, 0x00
    Send_HCI_VS_Read_Modify_Write_Hardware_Register 0xFD09, 0x001a6058, 0x1000, 0x1000
    Wait_HCI_Command_Complete_VS_Read_Modify_Write_Hardware_Register_Event 5000, any, 0xfd09, 0x00
    Send_HCI_VS_Read_Modify_Write_Hardware_Register 0xFD09, 0x001a6010, 0x0010, 0x0010
    Wait_HCI_Command_Complete_VS_Read_Modify_Write_Hardware_Register_Event 5000, any, 0xfd09, 0x00
    Send_HCI_VS_DRPb_Set_RF_Calibration_Info 0xFD76, 0x01, 0x00005421, 0x00005761, 0x14, 0x05, 0x0a, 0x05, 0x00, 0x07, 0x06, 0x0a, 0x04, 0x05, 0x08, 0x09, 0x0b, 0x0c, 0x0d, 0x0e, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00000000
    Wait_HCI_Command_Complete_VS_DRPb_Set_RF_Calibration_Info_Event 5000, any, 0xfd76, 0x00
    Send_HCI_VS_DRPb_Enable_RF_Calibration 0xFD80, 0x00, 0x00000001, 0x01
    Wait_HCI_Command_Complete_VS_DRPb_Enable_RF_Calibration_Event 5000, any, 0xfd80, 0x00
    Send_HCI_VS_DRPb_Enable_RF_Calibration 0xFD80, 0x3c, 0x00005ff0, 0x00
    Wait_HCI_Command_Complete_VS_DRPb_Enable_RF_Calibration_Event 5000, any, 0xfd80, 0x00
    Send_HCI_VS_Fast_Clock_Configuration_btip 0xFD1C, 0xff, 0x00001388, 0x000007d0, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0xfa, 0x00, 0x00, 0x0000
    Wait_HCI_Command_Complete_VS_Fast_Clock_Configuration_btip_Event 5000, any, 0xfd1c, 0x00
    
    
    
    Send_HCI_VS_Stop_VS_Lock 0xFE38
    Wait_HCI_Command_Complete_VS_Stop_VS_Lock_Event 5000, any, 0xfe38, 0x00
    
    #################################################################
    ## START of CC2564 Adds-On
    #################################################################
    
    ## Enable fast clock XTAL support
    Send_HCI_VS_Fast_Clock_Configuration_btip 0xFD1C, 0x01, 0x00001388, 0x000007d0, 0xff, 0xff, 0x04, 0xff, 0xff, 0xff, 0xfa, 0x00, 0x00, 0x0000
    Wait_HCI_Command_Complete_VS_Fast_Clock_Configuration_btip_Event 5000, any, 0xfd1c, 0x00
    
    ## Enable eHCILL
    #Send_HCI_VS_hcill_parameters 0xFD2B, 0x0010, 0x0050, 0x96
    #Wait_HCI_Command_Complete_VS_hcill_parameters_Event 5000, any, 0xfd2b, 0x00
    
    #Send_HCI_VS_Sleep_Mode_Configurations 0xFD0C, 0x01, 0x01, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0064
    #Wait_HCI_Command_Complete_VS_Sleep_Mode_Configurations_Event 5000, any, 0xfd0c, 0x00
    
    #################################################################
    ## END of CC2564 Adds-On
    #################################################################
    
    #################################################################
    ## Inquiry
    #################################################################
    Send_HCI_Read_Current_IAC_LAP
    Wait_HCI_Command_Complete_Read_Current_IAC_LAP_Event 5000, any, HCI_Read_Current_IAC_LAP, 0x00, 0x01, Any
    
    Send_HCI_Inquiry "9E8B33", 0x04, 0x00
    
    #################################################################
    ## End of Inquiry 
    #################################################################
    
    # Inquiry results and Inquiry complete events will occur after this

    HCITester_Inquiry Trace Log.htm

    Best luck,

    Vihang

  • Hi Vihang,

    First I tested the script you provided (thank you for that) with flow control pins RTS and CTS connected to each other. In this mode I can do some basic commands and get a response, but when I use the script the CC2564 falls in timeout after a few commands.

    But after I connected the RTS and CTS pins also and selected hardware flow control, the script runs nicely. All commands return a success response. So far so good. The only problem that left over is that the CC2654 not succeeded to get any BD_ADDR responses like you have in your log:

    I tried to set the inquiry length longer on 0x30 = 61.44 seconds, but also no responses. The device I activated in the neighborhood are an Iphone, bluetooth from a PC and a beacon which is advertising every second.

    Do I need to activate something else? With what device did you tested?

    19:01:35.277 Incoming Dump:
    19:01:35.277 0000: 04 02 0f 01 1b c7 11 00 fa cc 01 02 00 0c 02 5a ...............Z
    19:01:35.277 0010: e8 6f .o
    19:01:35.277 --
    19:01:35.277 Packet "HCI_Inquiry_Result_Event", Opcode 0x0002
    19:01:35.277 Parameters:
    19:01:35.277 | Number of Responses : 0x01
    19:01:35.277 | BD_ADDR responded : "CC:FA:00:11:C7:1B"
    19:01:35.277 | Page Scan Repetition Mode : 0x01 (R1)
    19:01:35.277 | Page Scan Period Mode : 0x02 (P2)
    19:01:35.277 | Page Scan Mode : 0x00 (Mandatory)
    19:01:35.277 | Class of Device : 0x5a020c
    19:01:35.277 | Clock Offset : 0x6fe8
    19:01:35.277 --

  • Hi David,

    I just realized that the TiWi uB2 module has the CC2564 and not the CC2564B. Because of this the Initscript is different. Please try the attached HCITester script with CC2564 initscript beginning followed by inquiry.

    HCITester_Inquiry_Script_CC2564.txt

    This could be the reason that you were not able to get inquiry results. FYI to answer your question, I just had a phone in BT settings (discoverable by other devices) to get the inquiry result.

    Best regards,

    Vihang 

  • Hi Vihang,

    I tried the new cc2564 script, but unfortunately the same result. I tried to set the time-out also on 0x30 but even then no responses. See in the log file 01.

    Also after the complete script was ended and  tried to start the script again, the cc2654 falls in time-out. With the script for the cc2564B this was not the case. See in the log file 02.

    HCITester Trace Log_cc2654_01.htm

    HCITester Trace Log_cc2564_02.htm

    Update 20160721:

    I just tried to add an external antenna to the CC2564, but with the same result. No inquiry return devices.

    Update 20160729:

    It seems that soms devices can discovered and some cannot (for example my HP and Fujitsu laptop will be discovered, but my Iphone 4s will not). I also tested with Iphone 6 and Apple watch but also not discovered.

    HP laptop: HCI 6.1280, LMP 6.1280 so Bluetooth version 4.0

    Fujitsu laptop: HCI 6.7869, LMP 6.64512 so Bluetooth version 4.0

    Iphone 4s: I can't find the HCI or LMP version, but supports also Bluetooth version 4.0

    I there any difference between both versions?

    How can I detect them as well? 

    Thanks!

    David