Clarification on HCI control protocol definition

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

cross mob
Anonymous
Not applicable

Hi all

I'm reading WICED HCI UART Control Protocol.pdf and I'm trying to understand how to use HCI commands described from chapter 3 (WICED HCI Control Protocol Definition).

For example I'm trying to use reset command and following what written inside the documentation the command should be:

     0x19 0x01 0x00 0x00 0x00

Where:

0x19 = HCI_WICED_PKT

0x01 = HCI_CONTROL_COMMAND (Reset)

0x00 = HCI_CONTROL_GROUP (Device)

0x00 = low byte packet lenght

0x00 = high byte packet lenght

but If I send this command to my device (BCM20737s) via UART I don't receive any response.

The device is correctly set in programming mode and if I try to reset the device with the other command found on the documentation (01 03 0C 00) the device send back the correct answer (04 0E 04 01 03 0C 00).

Can you please tell me what I'm doing wrong?

I'm trying to do that because my goal is to obtain local bluetooth device address and I would like to have two commands that will let me write and read device address.

But If I'm not able to perferm simple command like reset I'm not confident that I will be able to create that two commands.

Thanks for the help

Davide

0 Likes
1 Solution

Hi Davide

"Write BD_ADDR: 01 01 FC 06 BD_ADDR[5:0]“ is used to write the BD_ADDR into ram, so after reset and power cycle, BD_ADDR will resume to NV_RAM's address.

If you want to change the BD_ADDR in nv_RAM for mass production, please refer to the followed link

Regards

Jenson

View solution in original post

0 Likes
4 Replies
ShengY_96
Employee
Employee
10 sign-ins 5 sign-ins Welcome!

1. 01 03 0C 00 is the SPEC's HCI reset command. CYW207xx also support the SPEC's HCI command.

2. For read and write BD_ADDR, please try followed command:

Read BD ADDR: 01 09 10 00

Write BD_ADDR: 01 01 FC 06 BD_ADDR[5:0]

Regards

Jenson

Anonymous
Not applicable

Hi Jenson

Thanks for the info.

I've tryied with the commands that you have written me and it seems to work fine.

The only problem is that if I power-off my device and I turn it on again when I read BD address I receive as respose the old one.

There is a way to let the device maintain the address that I write even after a power-off?

Thanks a lot

Davide

0 Likes
Anonymous
Not applicable

Hi Jenson

After further analysis I've seen that DB address is not maintained by BCM20737s even after a reset operation.

To better understand what I'm looking for I will explain what my code have to do:

I have a C code that have to program BCM20737s module through main CPU of my custom board via HCI UART (BTLE code and mimi driver .hex file are stored inside board internal memory).

After that operation I have to overwrite MAC address (DB address) of BCM20737s.

This is necessary because during programming phase the same .hex file (that contain DB address info) is downloaded on every board produced so I have to change MAC address assigning the one associated to the specific board after download operation.

What I'm doing now is to program the device, than I put it agian in programming mode and I send it the commands that you have written me (first I write correct DB address, than I read it back to verify that it have been correctly set).

After that I exit form programming mode resetting BMC20737s and taking TX low before release reset signal.

Than if I power off the device or I reset it when I try to read angin DB address, BCM20737s reply with the old address.

What I have to do to change DB address permanently?

Thanks in advance

Davide

0 Likes

Hi Davide

"Write BD_ADDR: 01 01 FC 06 BD_ADDR[5:0]“ is used to write the BD_ADDR into ram, so after reset and power cycle, BD_ADDR will resume to NV_RAM's address.

If you want to change the BD_ADDR in nv_RAM for mass production, please refer to the followed link

Regards

Jenson

0 Likes