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

Smart Bluetooth Forum Discussions

Not applicable

Our problem here is that we have a script that should write the random MAC address.  But after we used the script,  the board becomes not discoverable.   We cannot program or recover the board.  

Also if we used SDK and specify random MAC address,  we have the same issue.

Why does specifying a random MAC address seem to brick our boards?

The error in download.log was like this:

Error creating a transport connection ( PORT=COM3


)   Failed to open the specified port!

1 Solution
6 Replies
Not applicable

Here is a printout of the randomly generated MAC address

-O DLConfigBD_ADDRBase:20736A1003BDA

Does that look right to you?


Is this script something you guys developed?

Anyway, at the end of this blog BD_ADDR: Changing BCM20737 Board Address for Production, we have an attachment that contains a bunch of executable scripts for use in production. One of them is a Perl script called mac.pl which does exactly what you have described above. I have cut and place the instructions here.

Can you try to verify or repeat your work on the tag3? This will minimise your losses as it is considered gone if you cannot do a recovery from a corrupted eeprom.

Perl Script Definitions - See file attached below:

  1. mac.pl:


         1.  20480 is the maximum number you want to generate

          2.  Rand will generate a number between 0 and 20480

          3.  Upper 24 bits are the OUI numbers (Broadcom Corporation Assigned) - Please see BD_ADDR - how do you get one?

          4.  The lower 12 bits are unique for each device

          5.  If you have several production test stations operating in parallel it may be easier to generate random numbers.

          6.  A more elegant script may be written to generate a serialization for inventory purposes.

          7.  You can choose how to generate the lower 12 bits - either random or from a structured database.

   2.  printf "00101801%04X",$$r;

          00101801%04X - Lower 12 bits are programmed to a Random Value

Not applicable

When we use the script to program the board we are using the script provided in the RAR file in the link you sent.

When we use the SDK we are using BT_DEVICE_ADDRESS=random option and the default makefile override to generate a random address. For example, in the SDK the default override looks like this:

# Override the BD_ADDR parameter if provided on the command line.

ifeq ($(BT_DEVICE_ADDRESS),random)

BT_DEVICE_ADDRESS_OVERRIDE := -O DLConfigBD_ADDRBase:$(shell $(call CONV_SLASHES,$(PERL)) -e '$$r=int(rand(32768));printf "$(CHIP)$(CHIP_REV)00%X",$$r;')


There are 13 nibbles in that address (you need 12). Try changing the script/makefile to this:

BT_DEVICE_ADDRESS_OVERRIDE := -O DLConfigBD_ADDRBase:$(shell $(call CONV_SLASHES,$(PERL)) -e '$$r=int(rand(32768));printf "$(CHIP)$(CHIP_REV)0%04X",$$r;')

I used the cgs-and-chipload method to download the hello sensor app onto my tag3. I changed the following entry inside the btp: DLConfigBD_ADDRBase = "************"

I did the usual stuff and download it onto my tag3. It was discoverable with a random BD address.

Any progress on your side? Perhaps you can try the above method and download the hello sensor app onto your board instead.




I believe your question was just answered here in this thread: Re: How to program BCM20736 without changing the BTP file each time