cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Bluetooth

New Contributor II

I just puchased a new CYBT-423028-EVAL board:

https://www.cypress.com/documentation/development-kitsboards/cybt-423028-eval-ez-bt-module-arduino-e...

I'm currently trying to use a Raspberry PI as HOST and bluetooth board as a controller. I connect them like this:

RPi <===> cp2102 USB2TTY bridge board <===> tx/rx/GND 3 wire <===> BT board External HCI (J1)
Then at the RPi console I run:
"hciattach ttyUSB0 any 115200 noflow"

This command success, the device  is attachec as "hci1".

But when I tried to bring up hci1: "hciconfig hci1 up", it always return "connection timeout".

BT board SW4 in switched to external HCI. Jumper J2 is connected. Jumper J8 is at 3.3v.

Is this solution supposed to work?

0 Likes
Reply
1 Solution
New Contributor II

Hi AnjanaM_61

Things turned out that I should not use hciattach, it's replaced by btattach  now. So everything works well now. Thanks a lot for your help !!!

I still have some question about this issue:

  1. Even I put switch s4 to external HCI, I still can find "Hello" bluetooth device in the air. Does that mean the application is controlling HCI?
  2. You mentioned "downloading the latest patch and fixes in ROM code". Could you be more specific about this feature? Is there any document?
  3. As far as I know, the dual mode controller should work on BR/EDR and LE at the same time. Does it mean device should have 2 RF modules that work at same time?

Thanks

View solution in original post

0 Likes
Reply
9 Replies
Moderator
Moderator

Hi HaZh_4665521 ,

You have to connect CTS & RTS pins of HCI UART as well.

Can you please try that ?

Regards,
Anjana

0 Likes
Reply
New Contributor II

Thanks AnjanaM_61.

I purchased a new usb2ttl board with rts&cts pin just now. Waiting for shipping.

I happened to see this disccssion : https://community.cypress.com/message/208529#208529

I'm also using wiced6.4, and my board got similar behavior of his. It's very diffecult to download firmware unless using reovering mode. And there's no other LED blinking on board except the power LED, so I always doubt if the application is running. I tried "hello_sensor" demo, could search "Hello" device occasionally, but never success in pairing.

Back to the original issue, if the application is not working well, will it make BT controller work abnormally even when I put switch sw4 to external HCI?

0 Likes
Reply
Moderator
Moderator

Hi HaZh_4665521 ,

There is some bug on WICED 6.4 for CYBT-423028-EVAL (20719 based modules).

So for now you have to use WICED SDK 6.2

Q) Back to the original issue, if the application is not working well, will it make BT controller work abnormally even when I put switch sw4 to external HCI?

A) There won't be any issue with the HCI mode. But its recommended to download an empty application prior to use the module in HCI mode. This is for downloading the latest patch and fixes in ROM code . For that you can use hex file of application created from WICED SDK 6.2

Thanks

Anjana

New Contributor II

Hi AnjanaM_61

I made some progress today. I installed WINCED6.2 then the application downloading is normal now. With "hello_sensor" app I could pair with the device and got some device information.

Then the USB2TTL board with RTS&CTS arrived. I switched s4 to external HCI, connected USB2TTL with TX&RX&RTS&CTS 4 wires, and run hciattach again:

"hciattach ttyUSB0 any 115200 flow"

# hciconfig

# hci1:   Type: Primary  Bus: UART

             BD Address: 20:71:9B:17:19:A2  ACL MTU: 360:20  SCO MTU: 64:1

             DOWN

             RX bytes:113 acl:0 sco:0 events:9 errors:0

             TX bytes:40 acl:0 sco:0 commands:10 errors:0

Sor far so good. The only strange thing is "ACL MTU" is not 1021.

Next:

# hciconfig hci1 up

# Can't init device hci1: Device or resource busy (16)

Bluez can not UP the devcie, and didn't return any significant error. I checked dmesg but got nothing either.

I searched the commiunity and found this discussion:

Re: CYBT_333047-02 via HCI interface on Raspberry Pi

It looks like this guy got the same issue of my. But he solved it by downloading an application, which I had it done at the beginning. So maybe not the same issue.

Could you give me any advice?

0 Likes
Reply
New Contributor II

Hi AnjanaM_61

Even I put switch s4 to external HCI, I still can find "Hello" bluetooth device in the air. Does that mean the application is controlling HCI?

0 Likes
Reply
New Contributor II

Hi AnjanaM_61

Things turned out that I should not use hciattach, it's replaced by btattach  now. So everything works well now. Thanks a lot for your help !!!

I still have some question about this issue:

  1. Even I put switch s4 to external HCI, I still can find "Hello" bluetooth device in the air. Does that mean the application is controlling HCI?
  2. You mentioned "downloading the latest patch and fixes in ROM code". Could you be more specific about this feature? Is there any document?
  3. As far as I know, the dual mode controller should work on BR/EDR and LE at the same time. Does it mean device should have 2 RF modules that work at same time?

Thanks

View solution in original post

0 Likes
Reply
Moderator
Moderator

Hi HaZh_4665521 ,

Thanks for sharing your fix with us.

1. Unless you initiate a HCI reset command from the external MCU , the previous application on the module flash will be running . That's why you are seeing "Hello"

2. I don't have a documentation for that . The thing is for our BT chips , the BT stack is in ROM code. If there is any bugs or enhancements , this will be added as patches in latest SDK releases. That is why its recommended to download an empty application from latest SDK. (Refer CYW20719 in HCI mode )

You can either program it one time with any of our GUI tools ( WICED SDK / WICED Module Programmer User Guide – KBA225060  ) to all the modules prior connecting to the MCU. Or after connecting to the MCU you can use HCI commands to program as mentioned in WICED-HCI-Control-Protocol.pdf doc available in WICED SDK ( /20719-B1_Bluetooth/doc/WICED-HCI-Control-Protocol.pdf)

3) Yes BLE & BR/EDR can be used at the same time. If there is a simultaneous active BT & LE connection, then the radio will be time shared between the two.

Thanks,
Anjana

New Contributor II

Thanks AnjanaM_61

The datasheet mentioned a HCI vendor command to raise external HCI baudrate. Where can I find the document of Cypress's HCI vendor command?

And I do want know more about the system of "radio will be time shared between the two". Could you me share me any reference?

0 Likes
Reply
Moderator
Moderator

Hi HaZh_4665521 ,

1. The datasheet mentioned a HCI vendor command to raise external HCI baudrate. Where can I find the document of Cypress's HCI vendor command?

Vendor Specific UPDATE_BAUDRATE command: (OGF - 0x3F , OCF - 0x018 )

01 18 FC 06 00 00 xx xx xx xx 

In the above command, the xx xx xx xx bytes specify the 32-bit little-endian value of the new rate in bits per second. For example, 115200 is represented as 00 C2 01 00.

The following response to the UPDATE_BAUDRATE command is expected within 100 ms:

04 0E 04 01 18 FC 00

2. And I do want know more about the system of "radio will be time shared between the two". Could you me share me any reference?

I am sorry I don't have any reference doc to share on this. The implementation is taken care by the internal stack.

Let us know if you have any specific queries on Dual mode usage in WICED SDK.

Regards,

Anjana