Unique information (BD_ADDR,MAC,SN,PKI) on BCM94343W platform during mass production

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

cross mob
JeGu_2199941
Level 5
Level 5
25 likes received 10 likes received 10 likes given

Platform : SPIL N08 (STM32F411, BCM94343W, external 2MB FLASH, supported by EDOM)

SDK       : 3.5.2

Purpose : mass production

There are at least 3 kinds of values that should be unique over all product :

1. BD_ADDR      : rare collision is OK for my case

2. wifi MAC         : rare collision is OK for my case

3. serial number  : stored in APP_DCT, should be absolutely unique

4. PKI files           : unique for each device so server can identify individually

All above should not be changed during future OTA2 (not available in 3.5.2).

What is the suggested (easiest) way to accomplish all above?

(It will work best if we can have all procedures run on OS X, or Windows is also OK.)

BTW, is there any news update for OTA2 feature on STM platforms w/ external FLASH?

0 Likes
1 Solution
Anonymous
Not applicable

For the SIP you are using the WLAN mac address and the BD ADDR are programmed in hardware otp and cannot be changed


They are unique globally


The is no way in software to override them

View solution in original post

0 Likes
6 Replies
JeGu_2199941
Level 5
Level 5
25 likes received 10 likes received 10 likes given

1. For BD_ADDR I found it is possible to setup MACRO : WICED_DCT_INCLUDE_BT_CONFIG so there will be a a section in DCT to store BD_ADDR information. And there are sample code to set BD_ADDR by calling "wicked_bt_set_local_bdaddr()" in BTM_ENABLED_EVT. However, my device fails to pair to peer BLE peripheral if BD_ADDR is modified this way. Any comment from Broadcom?

2. It seems that "store in DCT and set when power on" works fine for WIFI MAC.

3. Same as above

4. Use DCT_SECURITY_SECTION

Besides, is there any information about OTA2 ?

0 Likes

xavier@candyhouse​ we have a sample application under snip-> bluetooth->bt_dualmode_server application where you can use the bt_config_dct.h to program the local bluetooth address. Have you tried that ?

    

#ifdef WICED_DCT_INCLUDE_BT_CONFIG

    {

        /* Configure the Device Name and Class of Device from the DCT */

         platform_dct_bt_config_t* dct_bt_config;

        wiced_dct_read_lock( (void**) &dct_bt_config, WICED_TRUE, DCT_BT_CONFIG_SECTION, 0, sizeof(platform_dct_bt_config_t) );

        WPRINT_APP_INFO( ("WICED DCT BT NAME: %s \r\n", dct_bt_config->bluetooth_device_name) );

        strlcpy((char*)bluetooth_device_name, (char*)dct_bt_config->bluetooth_device_name, sizeof(bluetooth_device_name));

        wiced_bt_cfg_settings.device_name = bluetooth_device_name;

        WPRINT_APP_INFO( ("WICED DCT BT DEVICE CLASS : %02x %02x %02x\r\n", dct_bt_config->bluetooth_device_class[0],

                dct_bt_config->bluetooth_device_class[1],dct_bt_config->bluetooth_device_class[2]) );

        memcpy(wiced_bt_cfg_settings.device_class, dct_bt_config->bluetooth_device_class, sizeof(dct_bt_config->bluetooth_device_class));

        wiced_dct_read_unlock( (void*) dct_bt_config, WICED_TRUE );

    }

#endif

Presently we are working on getting OTA2 supported on this platform. Will update you once we have that ready

0 Likes

Thank you for your reply, and yes I had tried to call this API as bt_dualmode_server application (as a matter of fact, I think all occurrence in stock SDK 3.5.2 use this API the same way).

I tried this API without actually setting WICED_DCT_INCLUDE_BT_CONFIG, thus there is no BT DCT region on flash, but by direct use with explicitly declared variable as below.

case BTM_ENABLED_EVT:

            /* Bluetooth controller and host stack enabled. Event data: wiced_bt_dev_enabled_t */

            wiced_assert( "BT stack init failed", ( data->enabled.status == WICED_SUCCESS ) );

            init_result = data->enabled.status;

            if ( data->enabled.status == WICED_BT_SUCCESS )

            {

                wiced_bt_device_address_t local_address = {0xff, 0xff, 0xff, 0x10, 0x56, 0x38}; // Candyhouse OUI

                wiced_bt_set_local_bdaddr( local_address );

                wiced_bt_dev_read_local_addr( (uint8_t*)&local_address );

                WPRINT_LIB_INFO( ( "Bluetooth Internet Gateway initialised. BD address : %02X:%02X:%02X:%02X:%02X:%02X\r\n", local_address[ 0 ], local_address[ 1 ], local_address[ 2 ], local_address[ 3 ], local_address[ 4 ], local_address[ 5 ] ) );

                wiced_rtos_set_semaphore( &init_semaphore );

            }

            else

            {

                WPRINT_LIB_INFO( ( "Bluetooth Internet Gateway stack error [%u]\n", (unsigned int)data->enabled.status ) );

            }

            break;

.

When execution here does not print expected MAC address.

And later on when our WICED central device tries to pair a peer, it fails. (it will success pairing if this API is not called here)

Am I doing anything wrong ?

0 Likes
Anonymous
Not applicable

For the SIP you are using the WLAN mac address and the BD ADDR are programmed in hardware otp and cannot be changed


They are unique globally


The is no way in software to override them

0 Likes

@nsankar

Hmm...

I guess this means those usages of wiced_bt_set_local_bdaddr() API in demo / snip are made for some other platforms.

For my BCM94343W module I simply don't use this API.

Am I understanding correctly?

0 Likes
Anonymous
Not applicable

Yes in general you are correct


The specific module you are using had addresses burnt into the otp


Other module might not have this and hence those APIs exist

0 Likes