CYW920706WCDEVAL Linux attaching problem

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

cross mob
BeTa_4607436
Level 2
Level 2
First like received

Hi all,

I'm new to this community , and this is my first discussion, so thanks for this chance.

I have an eval board : CYW920706WCDEVAL, and I'm able to flash it with WICED correctly, but I need to attach it to Linux with hciattach command,

I was able to attach it but I don't know what I'm doing wrong now, because it was a long time since I did it.

Here is what I did for flashing :

  1. Press and Hold on Recovery button
  2. Press on reset for at least 1 seconds
  3. Release recovery after releasing the reset button
  4. Select demo.hci_uart_spi_bridge-CYW920706WCDEVAL TRANSPORT=SPI download example and start flashing the board.

By the way, here is the switch configs for the flash :

SW5
P2 OFF
P33 ON for RX
P0 OFF
P31 ON for TX
P3 ON for CTS
P30 ON for RTS
For SW7 all first 5 are ON for SERIAL FLASH ENABLE

Output of flashing :

Converting CGS to HEX...

Conversion complete

Creating OTA images...

Conversion complete

OTA image footprint in NV is 70235 bytes

Detecting device...

Device found

Downloading application...

Download complete

Application running

But when I execute hciattach to attach the module as HCI device with this command :

  • hciattach -s 115200 ttyWICED_HCI_UART12 any

I did check that ttyWICED_HCI_UART12 is present in /dev for Cypress. And I got a device with zero MAC address :

hciattach command output:

hci1:    Type: Primary  Bus: UART

    BD Address: 00:00:00:00:00:00 ACL MTU: 0:0  SCO MTU: 0:0

    DOWN INIT RUNNING

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

    TX bytes:12 acl:0 sco:0 commands:3 errors:0

I even tried to restore the switches to default state :

SW5 : same as flash except RTS and CTS are off , and SW7 all OFF , and it didn't work with the default combination.

What should I do ?

Thanks, Talel

0 Likes
1 Solution

Problem solved:

  1. Plug EvalBoard into PC
  2. Set RTS and CTS ON on SW5
  3. Set first 5 pins on SW7 ON for serial flash
  4. Open WICED
  5. Set board to recovery mode : Hold Recovery -> +1s Reset -> Release Reset -> Release Recovery.
  6. Choose and double click on project : hci_serial_gatt
  7. Firmware downloaded correctly
  8. Reset SW5 and SW7 to default : SW5(Only RX and TX) SW7 (All OFF)
  9. Plug EvalBoard into Linux
  10. Attach it : sudo hciattach ttyUSB(X) -t 10 any 115200 noflow nosleep
  11. Module attached correctly with a good MAC address
  12. Now you can use BlueZ commands on it (Example: hciconfig, hcitool , ...)

View solution in original post

11 Replies
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Hi Talel,

Can you try keeping following switch configuration:

P2- OFF

P33- ON

P0- OFF

P31- ON

P2, P33- OFF

SW7:

1-5 ON, others OFF

Make sure your HCI UART is not open anywhere else. Recover and then program the board.

Hi,

Thanks for the reply,

I don't know why you mentioned the P2 and P33 again , is it a mistake ?

Any way I switched P3 and P30 OFF , and followed your combination , but WICED stuck at "Detecting device...".

0 Likes

Hi BeTa_4607436 ,

If you were able to program from WICED correctly , it means HCI UART configuration is correct. So hciattach also should work. Make sure you have not opened / using HCI uart by any other console by mistake.

Also please refer Running  BlueZ on CY Part if this will be helpful.

Regards,

Anjana

0 Likes

I tried everything , I tried witch serial flash switch configuration , and a default switches config, with hciattach command from your link  :

sudo hciattach /dev/ttyUSB15 -t 10 any 115200 noflow nosleep

it says "Device setup complete" , but no MAC address in the new HCI module.

And no other HCI uart is opened by other console.

Here are 2 switches combination I tried:

IMG20200623094019.jpg

IMG20200623094035.jpg

0 Likes

Can you try following switch configuration-

pastedImage_1.png

Can you first try programming the board using WICED SDK on Windows? Or you can try using Chipload- Programming Using Chipload.exe - KBA228316 to make sure there is no problem with hardware.

0 Likes

I'm using WICED under Linux, and I don't have Windows for the moment, I set the switch config as you requested,

WICED can detect the device but cannot download the binary, here is the log :

Converting CGS to HEX...

Conversion complete

Creating OTA images...

Conversion complete

OTA image footprint in NV is 70235 bytes

Detecting device...

Device found

Downloading application...

********* Download Failure *************

+------------------------------------------------------------------------------------------+

| Power cycle the CYW920706WCDEVAL board and retry.                                        |

| If this problem persists, the serial flash on the board may be corrupted.                |

| Please see Appendix D in the Kit Guide for recovery instructions.                        |

+------------------------------------------------------------------------------------------+

Download failed. This WICED platform of the SDK only supports download to 20706A2 device.

The project I'm trying to install is : demo.hci_uart_spi_bridge-CYW920706WCDEVAL TRANSPORT=SPI download

0 Likes

Hi Talel,

Can you try programming demo.hello_sensor project for now?

hci_uart_spi_bridge application acts as UART-SPI bridge which is needed for different audio applications like hci_audio_remote_control.

0 Likes

It also failed to download, I don't know actually what is the problem, is there a problem with the hardware ?

0 Likes

If the switch positions are correct and you are recovering the board before programming then I dont think there should be some problem with board.

One thing you can try is recover and try downloading an empty project to the board.

Or if possible, if you get any Windows system then it will be easier to verify the exact problem.

0 Likes

Problem solved:

  1. Plug EvalBoard into PC
  2. Set RTS and CTS ON on SW5
  3. Set first 5 pins on SW7 ON for serial flash
  4. Open WICED
  5. Set board to recovery mode : Hold Recovery -> +1s Reset -> Release Reset -> Release Recovery.
  6. Choose and double click on project : hci_serial_gatt
  7. Firmware downloaded correctly
  8. Reset SW5 and SW7 to default : SW5(Only RX and TX) SW7 (All OFF)
  9. Plug EvalBoard into Linux
  10. Attach it : sudo hciattach ttyUSB(X) -t 10 any 115200 noflow nosleep
  11. Module attached correctly with a good MAC address
  12. Now you can use BlueZ commands on it (Example: hciconfig, hcitool , ...)

Thank you for sharing the solution steps with us Talel.!

0 Likes