Can I send HCI commands using puart.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AkJa_4647796
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked

Hi, I am using cybt-343026-01 module only and communicating with my microcontroller. Can I send HCI command using puart. (P24 as Rx and GPIO_5 as TX).  Or to send HCI command I need to interface with HCI uart? And I want to change the name of bluetooth device. How to change it. I have used this command 0x01 0x13 0x0C 0x00 xxxxx. But I am not getting any reply.

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hello AkJa_4647796 ,

You have to send HCI commands via HCI interface only. You need to connect HCI UART RTS and CTS pins as well.

Please send HCI reset command first and see if you are getting success response . Only then proceed with next commands.

Reference :

Run CYW20706 in HCI Mode

CyBluetool (Windows Installer)  You can try using CyBluetool for evaluating the HCI interface

Thanks,
Anjana

View solution in original post

6 Replies
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hello AkJa_4647796 ,

You have to send HCI commands via HCI interface only. You need to connect HCI UART RTS and CTS pins as well.

Please send HCI reset command first and see if you are getting success response . Only then proceed with next commands.

Reference :

Run CYW20706 in HCI Mode

CyBluetool (Windows Installer)  You can try using CyBluetool for evaluating the HCI interface

Thanks,
Anjana

Thank you for your help. But RTS and CTS pins are optional right?

0 Likes

Hello Mam, I have connected RTS and CTS pin as well now I am getting response from CYBT-343026 module. But I have some doubt.

1. I am getting response but after sending the same reset command 4-5 times and sometimes I get 04 0E 04 01 03 0C 0C. Instead of getting 00 as my last byte I am getting 0C Which is command disallowed.

2. After sending/receiving  HCI commands now my module should act in a application mode. But I cannot discover bluetooth module in my phone. Should I have to get out of HCI command mode? And how to do it?

3. What is the command for changing bluetooth name? 

I am sending 01 13 0C 06 ABCDEF. ABCDEF is the name I have to set. I am getting a valid response. But the bluetooth visibility is set off and after sending command if I hardware reset the bluetooth module then I get the default name of module.

Thank you.

0 Likes

Hi AkJa_4647796

1. Not sure why you are getting command disallowed. You might have tried sending the command before response of any previous command.

2. For finding the device on phone , you have to enter discover mode depending up on the application requirement. If its for BLE peripheral role, then start advertising. If its BT classic,, then you have to use the appropriate command. Please go through BT core spec for details.

3. You have mentioned you are not able to see the device on phone , then how you confirmed the name changed ?

As you are using HCI mode, you need to set the device name every time you reboot.

Thanks,

Anjana

0 Likes

Hi AnjanaM_61

Now i have used these two command, so i can see change name in Phone. but when i try to pair with BLE module, pairing fails and sometimes it asked for PIN.

// SCAN ENABLE COMMAND

01 1A  0C 01 03

//WIRTE PAIRING MODE TO ENABLE THE PAIRING MODE

01 56 0C 01 01

0 Likes

Lets continue the discussion here: PAIRING OF CYBT-343026-01 FAIL

Regards,
Anjana

0 Likes