Unable to use Factory Commit BD ADDR command using WICED STUDIO 6.4

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

cross mob
RaKa_4741636
Level 1
Level 1
First like received First like given

Hi Team,

I am trying to write BDADDR using the Factory Commit BD ADDR command.

I am using the below environment:

  1. WICED STUDIO 6.4
  2. CYBT-483039-EVAL board.
  3. WMBT tool for sending HCI command.
  4. demo.hello_client-CYBT_483039_EVAL download UART=COM13 BT_DEVICE_ADDRESS=FFFFFFFFFFFF (sample app for testing)
I am able to do HCI reset using wmbt tool:

C:\Users\Admin\Documents\WICED-Studio-6.4\wiced_tools\wmbt\Release>wmbt reset COM13

MBT_BAUD_RATE:  4000000

TRANSPORT_MODE: 0 (HCI)

Opened COM13 at speed: 115200

Close Serial Bus

Opened COM13 at speed: 4000000

Sending HCI Command:

0000 < 01 03 0C 00 >

Received HCI Event:

0000 < 04 0E 04 01 03 0C 00 >

Success

Close Serial Bus

But could not able to write/read BDADDR using below commands:

C:\Users\Admin\Documents\WICED-Studio-6.4\wiced_tools\wmbt\Release>wmbt factory_commit_bd_addr COM13 112233445566

MBT_BAUD_RATE:  4000000

TRANSPORT_MODE: 0 (HCI)

Opened COM13 at speed: 4000000

Close Serial Bus

Opened COM13 at speed: 4000000

Sending HCI Command:

0000 < 01 10 FC 07 66 55 44 33 22 11 00 >

C:\Users\Admin\Documents\WICED-Studio-6.4\wiced_tools\wmbt\Release>wmbt read_bd_addr COM13

MBT_BAUD_RATE:  4000000

TRANSPORT_MODE: 0 (HCI)

Opened COM13 at speed: 4000000

Close Serial Bus

Opened COM13 at speed: 4000000

Sending HCI Command:

0000 < 01 09 10 00 >


NOTE: My target is to write the Factory Commit BD ADDR to 20719-B1_bluetooth module from the microcontroller.

(required after programming BT module from micro)

Could you please have a look into it and see if I am missing anything?

Thanks,

Rakesh Kabade

0 Likes
1 Solution

Hi RaKa_4741636 ,

I am not sure about your complete HW setup and application flow.

Are you using 20719 module in controller only mode or embedded mode?

I am asking because you have mentioned you are using WICED and then Micro controller to program the module.

So can you please confirm if below is the work flow which you are using:

- make an embedded application using WICED SDK and create a hex image

- download the image to 20719 module via HCI from a micro controller

If then, your next requirement is to set a BD address in flash for each modules , then yes you can read and write the required BD address even in the embedded application itself. Say first you can save it to the nvram  (wiced_hal_write_nvram) and then load it (wiced_hal_read_nvram) and set using set BD address API (wiced_bt_set_local_bdaddr). For example , refer How to generate BD address randomly and save in flash for CYW20xx devices?

Let me know if you need any clarification.

Regards,

Anjana

View solution in original post

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

Hi RaKa_4741636 ,

Unfortunately Factory Commit BD address VSC is not supported on 20719 chip.

You may have to use the other options discussed in your previous thread here: Re: Configuring unique BD address for client device in CYBT-483039-EVAL

If you are specifically using controller only mode , then you can use Write_BD_ADDR command.

But please note that this will only work for the duration of power on.  Once you power cycle the device , the BD address will go back to default.

24:23.753  com1   c>  Write_BD_ADDR                         BD_ADDR: 112233445566

                 HCI Command

           com1@115200

    [01 FC 06]: 66 55 44 33 22 11

    opcode = 0xFC01 (64513, "Write_BD_ADDR")

    BD_ADDR = "112233445566"

24:23.755  com1   <c  Write_BD_ADDR

                 HCI Command Complete Event

           com1@115200

    [0E 04]: 01 01 FC 00

    event = 0xE (14, "Command Complete")

    Num_HCI_Command_Packets = 0x1 (1)

    Command_Opcode = 0xFC01 (64513, "Write_BD_ADDR")

    Status = 0x0 (0, "Success")

Regards,

Anjana

0 Likes

I think it is better to do the change like "Store the BDADDR in NVRAM of BT module and load it on every boot of the module".

So before programming the BT module, save the BDADDR in micro first and after programming BT module from micro, store the BDADDR back to the module again.

I think with the help of micro, we can manage read and write BDADDR to BT module respectively. Please confirm?

0 Likes

Hi RaKa_4741636 ,

I am not sure about your complete HW setup and application flow.

Are you using 20719 module in controller only mode or embedded mode?

I am asking because you have mentioned you are using WICED and then Micro controller to program the module.

So can you please confirm if below is the work flow which you are using:

- make an embedded application using WICED SDK and create a hex image

- download the image to 20719 module via HCI from a micro controller

If then, your next requirement is to set a BD address in flash for each modules , then yes you can read and write the required BD address even in the embedded application itself. Say first you can save it to the nvram  (wiced_hal_write_nvram) and then load it (wiced_hal_read_nvram) and set using set BD address API (wiced_bt_set_local_bdaddr). For example , refer How to generate BD address randomly and save in flash for CYW20xx devices?

Let me know if you need any clarification.

Regards,

Anjana

0 Likes