Dragonboard : blue tooth(bt) mac address

How to program the bt mac address? it always shows 5a:ad:

vinaysimha@localhost:~$ sudo bluetoothctl
[NEW] Controller 00:00:00:00:5A:AD localhost.localdomain [default]

this actually looks like we are missing a patchset in the dragonboard kernel:

@ppisati can you take a look ?

1 Like

i am able to make the kernel changes , able to get mac address from dtsi. In dragonboard-gadget
copied the newly built emmc_apssboot.mbn

plugin: dump
source: prebuilt
prepare: |
mv emmc_appsboot.mbn sd_appsboot.mbn

i was trying to get the bt mac address from lk. based on this commit


built the lk also and signed the lk

git clone git://codeaurora.org/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8.git -b LA.BR.1.1.3.c4-01000-8x16.0
git clone http://git.linaro.org/landing-teams/working/qualcomm/lk.git -b dragonboard410c-LA.BR.1.2.7-03810-8x16.0-linaro1
git clone https://git.linaro.org/landing-teams/working/qualcomm/signlk.git
cd lk
make -j4 msm8916 EMMC_BOOT=1 TOOLCHAIN_PREFIX=/bin/arm-eabi-
mv ./build-msm8916/emmc_appsboot.mbn ./build-msm8916/emmc_appsboot_unsigned.mbn
…/signlk/signlk.sh -i=./build-msm8916/emmc_appsboot_unsigned.mbn -o=./build-msm8916/emmc_appsboot.mbn -d

after creating final .img (kernel and gadget snap) and booting from sdcard , not able to boot.

USB device 0: unknown device
switch to partitions #0, OK
mmc0(part 0) is current device
Failed to mount ext2 filesystem…
** Unrecognized filesystem type **
switch to partitions #0, OK
mmc1 is current device
Failed to mount ext2 filesystem…
** Unrecognized filesystem type **
No ethernet found.
No ethernet found.
dragonboard410c =>

This smells like you are getting the wrong lk binary, try to remove the

mv emmc_appsboot.mbn sd_appsboot.mbn


sd_appsboot.mbn used in gadget.yaml.

i am getting this error after modified emmc_appsboot.mbn used from

400] [400] Updating device tree: done
[410] [410] booting linux @ 0x80080000, ramdisk @ 0x84000000 (0), tags/device tree @ 0x83e00000
[410] [410] Jumping to kernel via monitor

U-Boot 2017.05-00001-g7d61458 (Sep 19 2017 - 17:05:19 +0530)
Qualcomm-DragonBoard 410C

DRAM: 986 MiB
MMC: sdhci@07824000: 0, sdhci@07864000: 1
reading uboot.env
In: serial@78b0000
Out: serial@78b0000
Err: serial@78b0000
Net: Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot: 0
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
No FDT memory address configured. Please configure
the FDT address via "fdt addr " command.
reading ifc6309-kernel_x1.snap/kernel.img
Invalid FAT entry
512 bytes read in 16 ms (31.3 KiB/s)
reading ifc6309-kernel_x1.snap/dtbs/apq8016-sbc.dtb
Invalid FAT entry
512 bytes read in 27 ms (17.6 KiB/s)
reading ifc6309-kernel_x1.snap/initrd.img
Invalid FAT entry
512 bytes read in 16 ms (31.3 KiB/s)

Flattened Device Tree blob at 83000000

Booting using the fdt blob at 0x83000000
Using Device Tree in place at 0000000083000000, end 00000000830133bb
fdt_find_or_add_subnode: chosen: FDT_ERR_BADSTRUCTURE
ERROR: /chosen node create failed

  • must RESET the board to recover.

dragonboard-gadget snapcraft.yaml

plugin: dump
#source: http://builds.96boards.org/releases/dragonboard410c/linaro/rescue/17.04/dragonboard410c_bootloader_sd_linux-79.zip
source: /media/vinaysimha/linuxs/vinaysimha_inforce/android_sources/snap/dragonboard410c_bootloader_sd_linux-79.zip
source-type: zip
prepare: |
rm emmc_appsboot.mbn
cp …/…/…/…/emmc_appsboot.mbn sd_appsboot.mbn
#cp emmc_appsboot.mbn sd_appsboot.mbn
- -MD5SUMS.txt
- -NON-HLOS.bin
sbl1.mbn: blobs/sbl1.mbn
tz.mbn: blobs/tz.mbn
rpm.mbn: blobs/rpm.mbn
hyp.mbn: blobs/hyp.mbn

    plugin: dump
    #source: http://builds.96boards.org/releases/dragonboard410c/linaro/rescue/17.04/dragonboard410c_bootloader_emmc_linux-79.zip
    source: /media/vinaysimha/linuxs/vinaysimha_inforce/android_sources/snap/dragonboard410c_bootloader_sd_linux-79.zip
    source-type: zip
    prepare: |
        cp ../../../../emmc_appsboot.mbn emmc_appsboot.mbn
        - -MD5SUMS.txt
        - -NON-HLOS.bin
        - -flashall
        - -gpt_both0.bin
        - -hyp.mbn
        - -rpm.mbn
        - -sbl1.mbn
        - -sbc_*.bin
        - -tz.mbn
        emmc_appsboot.mbn: blobs/emmc_appsboot.mbn

after modifying the lk code, i get the above Invalid FAT entry error. Does uboot is not able to pick the updated entry for local-bd-address?

In the current 4.4.87 in msm8916.dtsi bt compatible is qcom,wcnss-bt, so i had modified in the lk.

+++ b/platform/msm_shared/dev_tree.c
@@ -1392,7 +1392,8 @@ int update_device_tree(void *fdt, const char *cmdline,

/* make sure local-bd-address (and legacy local-mac-address) is set for WCN BT device */
  • offset = fdt_node_offset_by_compatible(fdt, -1, “qcom,wcnss-bt”);
  • /*offset = fdt_node_offset_by_compatible(fdt, -1, “qcom,wcnss-bt”); */
  • offset = fdt_node_offset_by_compatible(fdt, -1, “qcom,hci-smd”);

please give some inputs , why on updating the device tree causing uboot to fail?

as i said already, you do not want to use emmc (unless you actually operate without any SD card over there) but use the sd blobs …
the FAT errors are expected since the emmc blob tries to boot from the internal MMC, not the SD card, where most likely no FAT partition exists at the position the blob looks …

i am booting from sd-card only.

i would assume both sd-card boot or the emmc-boot using the same emmc_appsboot.mbn, since yaml of sd-build-blobs/emmc-build-blobs fetches dragonboard410c_bootloader_sd_linux-79.zip