CYW920819EVB-02 connect Linux(Ubuntu) issue

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

cross mob
brzh_4710371
Level 1
Level 1
First question asked First reply posted

Hi,

I bought a CYW920819EVB-02 for doing some bluetooth test. I have connected this board to my Ubuntu laptop via USB cable. My Ubuntu installed the latest bluez.

Now I have one issue:

1. I run 'lsusb' to see whether my board is connected well, it shows connected.(good)

2. I run 'btattach -B /dev/ttyUSB1 -S 115200 &' and it runs well.

3. I run 'hciconfig' and it shows my board(hci0 is the default bluetooth adapter on my laptop, hci1 is my board). my board hci1 is DOWN, and I want to up it !

bluetooth.JPG

4. I run 'hciconfig hci1 up' for up the board. It shows timeout.

bt2.JPG

5. I run 'hcitool dev', the board is not detected(I think because it is DOWN).

So any know how can I up it?

Many thanks

Brian

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

Hi

There will be two UART ports, please make sure you are trying to open HCI UART.

Please check if the following blog :Running BlueZ on CY Part

Regards,

Anjana

View solution in original post

0 Likes
3 Replies
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi

There will be two UART ports, please make sure you are trying to open HCI UART.

Please check if the following blog :Running BlueZ on CY Part

Regards,

Anjana

0 Likes

Hi,

Thank you so much! It works after I attach the correct UART.

For doing some testing, I need to go to the diagnostic mode. As I know, I need to send something to the UART, then I can jump to diagnostic mode.

The script I use in python is here:

import socket

s = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_RAW, socket.BTPROTO_HCI)

s.bind((0,))

s.send(b"\x07\xf0\x01")

s.close()

I think it should work, however, I receive error:

Traceback (most recent call last):

  File "enable_diag.py", line 5, in <module>

    s.send(b"\x07\xf0\x01")

OSError: [Errno 22] Invalid argument

Do you have any idea of this issue?

Many thanks.

0 Likes

Hi brzh_4710371 ,

Glad to know that it started working after choosing HCI UART.

But I am not sure about the new error. Can you please confirm what exactly you want to do / what test command  you want to try ?

Regards,

Anjana

0 Likes