5 Replies Latest reply on Jul 24, 2020 6:24 AM by StDa_4617271

    HCI Commands to enable bluetooth

    StDa_4617271

      Good morning, I tried to enable CYBT343026 bluetooth module by HCI Uart commands, but I can't see it trought bluetooth of my smartphones.

      To send commands to BT module I use CyBlueTool.

      I've enabled radio, set tx power, assigned name to device and bd_addr, but without success.

      What did I forget?

      Thanks in advance for your help.

       

      Regards

        • 1. Re: HCI Commands to enable bluetooth
          DheerajP_41

          Hi,

           

          Could you please share the cybluetool log with us? (copy paste the log into text file and attach in your response here).

          We will check and let you know where the fail happened, and how to overcome it.

           

          Thanks,

          -Dheeraj

          1 of 1 people found this helpful
          • 2. Re: HCI Commands to enable bluetooth
            SheetalJ_96

            Hi StDa_4617271,

             

            Can you please check if reset command is giving a success in CyBluetool logs? Make sure you have opened HCI COM port in CyBluetool. If reset shows success, then try sending 'read BD_address' command and check if you can see device BD address in your logs.

            If yes, then you can send start advertising command and try scanning device in your smartphone.

            • 3. Re: HCI Commands to enable bluetooth
              StDa_4617271

              Hi, here the log:

               

              07/24/20 08:51:43.573 com10 -- Transport opened

              com10@115200

              07/24/20 08:51:43.573 com10 -- Protocol set to HCI

              com10@115200

               

              07/24/20 08:51:43.590 com10@115200 c> LE_Read_Buffer_Size_v2

              HCI Command

              com10@115200

              [60 20 00 ]

              opcode = 0x2060 (8288, "LE_Read_Buffer_Size_v2")

               

               

              07/24/20 08:51:43.623 com10 <c LE_Read_Buffer_Size_v2

              HCI Command Complete Event

              com10@115200

              [0E 04 ]: 01 60 20 01

              event = 0x0E (14,"Command Complete")

              Num_HCI_Command_Packets = 0x1 (1)

              Command_Opcode = 0x2060 (8288, "LE_Read_Buffer_Size_v2")

              Status = 0x1 (1, "Unknown HCI Command", "Unknown HCI Command")

               

               

              07/24/20 08:51:57.538 com10@115200 c> Reset

              HCI Command

              com10@115200

              [03 0C 00 ]

              opcode = 0x0C03 (3075, "Reset")

               

               

              07/24/20 08:51:57.585 com10 <c Reset

              HCI Command Complete Event

              com10@115200

              [0E 04 ]: 01 03 0C 00

              event = 0x0E (14,"Command Complete")

              Num_HCI_Command_Packets = 0x1 (1)

              Command_Opcode = 0xC03 (3075, "Reset")

              Status = 0x0 (0, "Success", "Success")

               

               

              07/24/20 08:52:07.013 com10@115200 c> Read_BD_ADDR

              HCI Command

              com10@115200

              [09 10 00 ]

              opcode = 0x1009 (4105, "Read_BD_ADDR")

               

               

              07/24/20 08:52:07.059 com10 <c Read_BD_ADDR

              HCI Command Complete Event

              com10@115200

              [0E 0A ]: 01 09 10 00 FF FF FF FF FF FF

              event = 0x0E (14,"Command Complete")

              Num_HCI_Command_Packets = 0x1 (1)

              Command_Opcode = 0x1009 (4105, "Read_BD_ADDR")

              Status = 0x0 (0, "Success", "Success")

              BD_ADDR = "FFFFFFFFFFFF"

               

               

              07/24/20 08:52:36.775 com10@115200 c> LE_Set_Advertise_Enable

              HCI Command

              com10@115200

              [0A 20 01 ]: 01

              opcode = 0x200A (8202, "LE_Set_Advertise_Enable")

              Advertising_Enable = 0x1 (1, "Advertising is enabled")

               

               

              07/24/20 08:52:36.787 com10 <c LE_Set_Advertise_Enable

              HCI Command Complete Event

              com10@115200

              [0E 04 ]: 01 0A 20 00

              event = 0x0E (14,"Command Complete")

              Num_HCI_Command_Packets = 0x1 (1)

              Command_Opcode = 0x200A (8202, "LE_Set_Advertise_Enable")

              Status = 0x0 (0, "Success", "Success")

               

               

              07/24/20 08:54:14.313 com10@115200 c> Write_BD_ADDR

              HCI Command

              com10@115200

              [01 FC 06 ]: FF EE DD CC BB AA

              opcode = 0xFC01 (64513, "Write_BD_ADDR")

              BD_ADDR = "AABBCCDDEEFF"

               

               

              07/24/20 08:54:14.321 com10 <c Write_BD_ADDR

              HCI Command Complete Event

              com10@115200

              [0E 04 ]: 01 01 FC 00

              event = 0x0E (14,"Command Complete")

              Num_HCI_Command_Packets = 0x1 (1)

              Command_Opcode = 0xFC01 (64513, "Write_BD_ADDR")

              Status = 0x0 (0, "Success", "Success")

               

               

              07/24/20 08:54:20.925 com10@115200 c> Read_BD_ADDR

              HCI Command

              com10@115200

              [09 10 00 ]

              opcode = 0x1009 (4105, "Read_BD_ADDR")

               

               

              07/24/20 08:54:20.957 com10 <c Read_BD_ADDR

              HCI Command Complete Event

              com10@115200

              [0E 0A ]: 01 09 10 00 FF EE DD CC BB AA

              event = 0x0E (14,"Command Complete")

              Num_HCI_Command_Packets = 0x1 (1)

              Command_Opcode = 0x1009 (4105, "Read_BD_ADDR")

              Status = 0x0 (0, "Success", "Success")

              BD_ADDR = "AABBCCDDEEFF"

               

               

              07/24/20 08:54:54.781 com10@115200 c> Write_Local_Name

              HCI Command

              com10@115200

              [13 0C F8 ]: 54 45 53 54 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 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 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

              opcode = 0x0C13 (3091, "Write_Local_Name")

              Name = "TEST"

               

               

              07/24/20 08:54:54.811 com10 <c Write_Local_Name

              HCI Command Complete Event

              com10@115200

              [0E 04 ]: 01 13 0C 00

              event = 0x0E (14,"Command Complete")

              Num_HCI_Command_Packets = 0x1 (1)

              Command_Opcode = 0xC13 (3091, "Write_Local_Name")

              Status = 0x0 (0, "Success", "Success")

               

               

              07/24/20 08:55:15.762 com10@115200 c> Read_Local_Name

              HCI Command

              com10@115200

              [14 0C 00 ]

              opcode = 0x0C14 (3092, "Read_Local_Name")

               

               

              07/24/20 08:55:15.824 com10 <c Read_Local_Name

              HCI Command Complete Event

              com10@115200

              [0E FC ]: 01 14 0C 00 54 45 53 54 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 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 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

              event = 0x0E (14,"Command Complete")

              Num_HCI_Command_Packets = 0x1 (1)

              Command_Opcode = 0xC14 (3092, "Read_Local_Name")

              Status = 0x0 (0, "Success", "Success")

              Name = "TEST"

               

               

              Thanks for help.

              • 4. Re: HCI Commands to enable bluetooth
                SheetalJ_96

                From the logs, I can see that your commands are being successfully executed, showing that your problem is resolved.

                • 5. Re: HCI Commands to enable bluetooth
                  StDa_4617271

                  Hi, now with this commands I see correctly the module BT:

                   

                  7.3 RESET

                  7.3 Write_Local_Name

                  0   Write_BD_ADDR

                  0   Enable_Radio

                  7.8 LE_Set_Advertise_Enable

                   

                  Thanks.

                  Best regards.