CYBT-353027-02 serial communication using J1 UART pins

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

cross mob
AdarshMaurya
Level 2
Level 2
25 sign-ins 5 questions asked 10 sign-ins

Hello,

I'm trying to connect with the CYBT-353027-02 Bluetooth module using HCI UART provided in J1 connector pins using an external "UART to Serial convertor" and opened that port using "AIROC Bluetooth Debug Tool". The purpose of using these pins is to Understand HCI Uart communication which I'll be using with our MCU later. So I connected VDD,GND, TXD and RXD but still I couldn't able to transmit or receive. Is CTS and RTS pins are necessary for communication.?

If not how to attain connection.?

Thanks in advance

Adarsh Maurya

0 Likes
1 Solution
advait_kulkarni
Moderator
Moderator
Moderator
25 likes received 250 sign-ins 100 solutions authored

Hi @AdarshMaurya ,

As suggested in this thread: https://community.infineon.com/t5/AIROC-Bluetooth/CYBT353027-02/td-p/434602 hope if you have gone ahead with using EZ-serial fw. Locking this thread so as to avoid duplicates.

 

Thanks and regards,

Advait Kulkarni

View solution in original post

0 Likes
9 Replies
advait_kulkarni
Moderator
Moderator
Moderator
25 likes received 250 sign-ins 100 solutions authored

Hi @AdarshMaurya ,

Can you please clarify that you will be using the device in HCI only mode? In that case, please refer to the following article for CTS and RTS pins: https://community.infineon.com/t5/Resource-Library/Run-CYW20706-in-HCI-Mode/ta-p/246397

Thanks and regards,

Advait Kulkarni

0 Likes

Hello @advait_kulkarni 

we are just trying to communicate with CYBT-353027-02 Bluetooth module using our MCU to write commands. Can you suggest which UART is best suitable for this communication HCI or PUART?. Also how  to connect that UART pins with our MCU? 

Thanks in advance

Adarsh Maurya

0 Likes
advait_kulkarni
Moderator
Moderator
Moderator
25 likes received 250 sign-ins 100 solutions authored

Hi @AdarshMaurya ,

We would recommend that use the HCI UART for communication between your MCU host and the BT module. Please refer to the datasheet for HCI UART interface and the pin assignment: https://www.infineon.com/dgdl/Infineon-CYBT-353027-02_EZ-BT_WICED_MODULE-DataSheet-v06_00-EN.pdf?fil... You can use jumper cables/wires for connecting your MCU to the TX/RX pins of the HCI UART on the module.

Thanks and regards,

Advait Kulkarni

0 Likes
lock attach
Attachments are accessible only for community members.

Hello @advait_kulkarni 

I'm attaching Photos of my connection from host MCU to CYBT-353027-02 Eval-kit for your reference. I'm giving power to eval-board externally. But still can't able to communicate with the module?. I tried swapping Tx and Rx pin also. 

0 Likes
advait_kulkarni
Moderator
Moderator
Moderator
25 likes received 250 sign-ins 100 solutions authored

Hi @AdarshMaurya ,

Apologies for late reply. Can you download an empty BTSDK application from Modustoolbox in the module and then try? You need to send the reset HCI command first and see if you are getting a response. I tried the same at my end and tested using Cybluetool, and it is working

Thanks and regards,

Advait Kulkarni

0 Likes
AdarshMaurya
Level 2
Level 2
25 sign-ins 5 questions asked 10 sign-ins

Hello @advait_kulkarni 

Thank you for replying. I'm able to communicate by sending HCI command.

Now I'm trying to achieve classic bluetooth connection by making the module advertising.

I'm using AIROC Bluetooth Test and Debug Tool to write commands

The commands I followed are 

1)Reset

2) Set_Event_filter->Connection setup->allow connection from all devices.

3)Write_simple_pairing_mode->enabled

4) write_scan_enable->Inquiry and page scan enabled.

After executing these commands I'm able to make the module discoverable but when I try to connect with my phone it's getting disconnected saying incorrect pairing code.

How to resolve this problem?

Thanks in advance 

Adarsh Maurya

0 Likes
advait_kulkarni
Moderator
Moderator
Moderator
25 likes received 250 sign-ins 100 solutions authored

Hi @AdarshMaurya ,

Before, write_scan, you can send the write_connection_accept_timeout and increase the timeput to around 20 sec (0x4E20), then on scan_enable, pair from mobile phone> 0000 or 1234 as the code. Then you will get a prompt on bluetool to accept the connection request and then we have to send the PIN_CODE_REQUEST_REPLY command with bluetooth address and the pincode, 

Thanks and regards,

Advait Kulkarni

0 Likes
AdarshMaurya
Level 2
Level 2
25 sign-ins 5 questions asked 10 sign-ins

Hello @advait_kulkarni 

I followed your guidance but after  entering pin it's saying authentication failure.

04/20/23 18:21:17.589 com11@115200 c> Reset
HCI Command
com11@115200
[03 0C 00 ]
opcode = 0x0C03 (3075, "Reset")

04/20/23 18:21:17.838 com11 <c Reset
HCI Command Complete Event
com11@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")

04/20/23 18:21:37.066 com11@115200 c> Set_Event_Filter
HCI Command
com11@115200
[05 0C 03 ]: 02 00 02
opcode = 0x0C05 (3077, "Set_Event_Filter")
Filter_Type = 0x2 (2, "Connection Setup")
Connection_Setup_Filter_Condition_Type = 0x0 (0, "Allow Connections from all devices")
Auto_Accept_Flag = 0x2 (2, "Do Auto accept the connection with role switch disabled")

04/20/23 18:21:37.066 com11 <c Set_Event_Filter
HCI Command Complete Event
com11@115200
[0E 04 ]: 01 05 0C 00
event = 0x0E (14,"Command Complete")
Num_HCI_Command_Packets = 0x1 (1)
Command_Opcode = 0xC05 (3077, "Set_Event_Filter")
Status = 0x0 (0, "Success")

04/20/23 18:22:06.497 com11@115200 c> Write_Connection_Accept_Timeout
HCI Command
com11@115200
[16 0C 02 ]: 20 4E
opcode = 0x0C16 (3094, "Write_Connection_Accept_Timeout")
Conn_Accept_Timeout = 0x4E20 (20000, Connection_Accept_Timeout measured in slots, 1 slot = 0.625ms)

04/20/23 18:22:06.509 com11 <c Write_Connection_Accept_Timeout
HCI Command Complete Event
com11@115200
[0E 04 ]: 01 16 0C 00
event = 0x0E (14,"Command Complete")
Num_HCI_Command_Packets = 0x1 (1)
Command_Opcode = 0xC16 (3094, "Write_Connection_Accept_Timeout")
Status = 0x0 (0, "Success")

04/20/23 18:22:13.195 com11@115200 c> Write_Scan_Enable
HCI Command
com11@115200
[1A 0C 01 ]: 03
opcode = 0x0C1A (3098, "Write_Scan_Enable")
Scan_Enable = 0x3 (3, "Inquiry and Page Scan enabled")

04/20/23 18:22:13.210 com11 <c Write_Scan_Enable
HCI Command Complete Event
com11@115200
[0E 04 ]: 01 1A 0C 00
event = 0x0E (14,"Command Complete")
Num_HCI_Command_Packets = 0x1 (1)
Command_Opcode = 0xC1A (3098, "Write_Scan_Enable")
Status = 0x0 (0, "Success")

04/20/23 18:23:11.561 com11 <e Connection Complete
HCI Event
com11@115200
[03 0B ]: 00 0B 00 17 18 7F D1 9D 48 01 00
event = 0x03 (3,"Connection Complete")
Status = 0x0 (0, "Success")
Connection_Handle = 0x0B (11)
BD_ADDR = "489DD17F1817"
Link_Type = 0x1 (1, "ACL connection")
Encryption_Status = 0x0 (0, "Link level encryption disabled")

04/20/23 18:23:11.590 com11 <e Max Slots Change
HCI Event
com11@115200
[1B 03 ]: 0B 00 05
event = 0x1B (27,"Max Slots Change")
Connection_Handle = 0x0B (11)
LMP_Max_Slots = 0x5 (5)

04/20/23 18:23:11.636 com11 <a ACL Data (rx)
com11@115200
[0B 20 0A 00 ]:
Broadcast_Flag = 0x00 (0, "Point-to-point")
Packet_Boundary_Flag = 0x02 (2, "First automatically flushable packet")
Connection_Handle = 0x0B (11)
Data_Total_Length = 0x0A (10)
data = "06 00 01 +7 byte(s)"

04/20/23 18:23:17.851 com11 <e PIN Code Request
HCI Event
com11@115200
[16 06 ]: 17 18 7F D1 9D 48
event = 0x16 (22,"PIN Code Request")
BD_ADDR = "489DD17F1817"

04/20/23 18:23:43.775 com11@115200 c> PIN_Code_Request_Reply
HCI Command
com11@115200
[0D 04 17 ]: 17 18 7F D1 9D 48 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
opcode = 0x040D (1037, "PIN_Code_Request_Reply")
BD_ADDR = "489DD17F1817"
PIN_Code_Length = 0x4 (4)
PIN_Code = "00 00 00 +1 byte(s)"

04/20/23 18:23:43.791 com11 <c PIN_Code_Request_Reply
HCI Command Complete Event
com11@115200
[0E 0A ]: 01 0D 04 00 17 18 7F D1 9D 48
event = 0x0E (14,"Command Complete")
Num_HCI_Command_Packets = 0x1 (1)
Command_Opcode = 0x40D (1037, "PIN_Code_Request_Reply")
Status = 0x0 (0, "Success")
BD_ADDR = "489DD17F1817"

04/20/23 18:23:43.838 com11 <e Authentication Complete
HCI Event
com11@115200
[06 03 ]: 05 0B 00
event = 0x06 (6,"Authentication Complete")
Status = 0x5 (5, "Authentication Failure")

04/20/23 18:23:43.902 com11 <e Disconnection Complete
HCI Event
com11@115200
[05 04 ]: 00 0B 00 13
event = 0x05 (5,"Disconnection Complete")
Status = 0x0 (0, "Success")
Connection_Handle = 0x0B (11)
Reason = 0x13 (19, "Remote User Terminated Connection")

04/20/23 18:24:47.460 com11 <e PIN Code Request
HCI Event
com11@115200
[16 06 ]: 17 18 7F D1 9D 48
event = 0x16 (22,"PIN Code Request")
BD_ADDR = "489DD17F1817"

04/20/23 18:24:54.155 com11@115200 c> PIN_Code_Request_Reply
HCI Command
com11@115200
[0D 04 17 ]: 17 18 7F D1 9D 48 04 01 02 03 04 00 00 00 00 00 00 00 00 00 00 00 00
opcode = 0x040D (1037, "PIN_Code_Request_Reply")
BD_ADDR = "489DD17F1817"
PIN_Code_Length = 0x4 (4)
PIN_Code = "01 02 03 +1 byte(s)"

04/20/23 18:24:54.162 com11 <c PIN_Code_Request_Reply
HCI Command Complete Event
com11@115200
[0E 0A ]: 01 0D 04 00 17 18 7F D1 9D 48
event = 0x0E (14,"Command Complete")
Num_HCI_Command_Packets = 0x1 (1)
Command_Opcode = 0x40D (1037, "PIN_Code_Request_Reply")
Status = 0x0 (0, "Success")
BD_ADDR = "489DD17F1817"

04/20/23 18:24:54.286 com11 <e Connection Complete
HCI Event
com11@115200
[03 0B ]: 05 0B 00 17 18 7F D1 9D 48 01 00
event = 0x03 (3,"Connection Complete")
Status = 0x5 (5, "Authentication Failure")

 

What should I do now?

0 Likes
advait_kulkarni
Moderator
Moderator
Moderator
25 likes received 250 sign-ins 100 solutions authored

Hi @AdarshMaurya ,

As suggested in this thread: https://community.infineon.com/t5/AIROC-Bluetooth/CYBT353027-02/td-p/434602 hope if you have gone ahead with using EZ-serial fw. Locking this thread so as to avoid duplicates.

 

Thanks and regards,

Advait Kulkarni

0 Likes