Integrating Bluedroid stack to the board

Hi,

I am using WP76xx as the processor and using Legato 17.09 with related toolchain.

I am trying to integrate Bluedroid stack to the board so that I can start using it for some BT development. I was planning to use BlueZ but some changes from higher ups reccomended using Bluedroid.

How practical is this ?

Anyways, I have gone ahead with trying. I downloaded Bluedroid fro Linux, a project from GIT, and created a WLP18xx sub-folder in the devices folder, put in my own makefile and libbt-vendor-ti.c[The second one from online] and cross-compiled the same using the toolchain associated to Legato 17.09.
It compiled without issue and I placed executables in /tmp folder of the target and associated libraries in /usr/lib[using overlayfs].

When I run the bdt app I am getting “Bluetooth not enabled. Plz enable it” message. Using rfkill didnot reveal any bluetooth devices.

I downloaded and ran the BluetoothUtil app; hoping it will bring up the drivers and associated processes. I am met with the error ::

Jan 6 00:05:27 swi-mdm9x28 user.info Legato: INFO | supervisor[1905]/supervisor T=main | proc.c proc_Start() 1204 | Execing 'bt-init.sh’
Jan 6 00:05:27 swi-mdm9x28 user.info Legato: INFO | bt-init.sh[1905] | PWD is: /legato/systems/current/appsWriteable/bluetoothUtil
Jan 6 00:05:27 swi-mdm9x28 user.err Legato: =ERR= | bt-init.sh[1905] | modprobe: module hci_uart not found in modules.dep
Jan 6 00:05:28 swi-mdm9x28 user.err Legato: =ERR= | bt-init.sh[1905] | modprobe: module bluetooth not found in modules.dep
Jan 6 00:05:29 swi-mdm9x28 user.err Legato: =ERR= | bt-init.sh[1905] | modprobe: module rfcomm not found in modules.dep
Jan 6 00:05:30 swi-mdm9x28 user.err Legato: =ERR= | bt-init.sh[1905] | modprobe: module hidp not found in modules.dep
Jan 6 00:05:31 swi-mdm9x28 user.err Legato: =ERR= | bt-init.sh[1905] | modprobe: module bnep not found in modules.dep

Bluedroid source:: https://github.com/tiancj/bluedroid.for.linux

TI file :: https://android.googlesource.com/platform/hardware/ti/wpan/+/a74f63454afdc757091c8d1e9c837354ac35a819/bluedroid_wilink/libbt-vendor-ti.c

Did you rebuild the kernel with bluetooth support?

Hi,

I was using a Kernel provided by the offshore guys. So no; I am trying to build the kernel as stated in:

I have downloaded the Legato distribution: Legato-Dist-Source-mdm9x28-SWI9X07Y_02.11.00.00.tar.bz2
And I am following the steps as mentioned in the GIT page above.

Now; I am faced with:
./tmp/log/cooker/swi-mdm9x28/20180220124554.log:ERROR: linux-yocto was skipped: incompatible with machine swi-mdm9x28 (not in COMPATIBLE_MACHINE)

PS: I am new to building kernels and Yocto recipes and all, so IF my question is about something way too obvious please dont be cross and all.

@dfrey

It turns out I had to use linux-quic instead of linux-yocto and menuconfig instead of kernel_configme
in:
bitbake linux-yocto -c kernel_configme -f

Is this fine ?

I have completed the build, and have populated the tmp/deploy/images/swi-mdm9x28 folder.

Using the final command, fdt yocto_wp76xx.4k.cwe seems to fail:

f_ebin@febin-VirtualBox:~/Documents/yocto/build_bin/tmp/deploy/images/swi-mdm9x28$ fdt yocto_wp76xx.2k.cwe _
No command ‘fdt’ found, did you mean:
Command ‘fmt’ from package ‘coreutils’ (main)
Command ‘fet’ from package ‘fet’ (universe)
Command ‘fdp’ from package ‘graphviz’ (main)
_ Command ‘idt’ from package ‘ncl-ncarg’ (universe) _
_ Command ‘fd’ from package ‘fdclone’ (universe) _
_ Command ‘dt’ from package ‘ditrack’ (universe) _
_ Command ‘fdk’ from package ‘plastimatch’ (universe) _
_ Command ‘fdm’ from package ‘fdm’ (universe)

fdt: command not found
febin@febin-VirtualBox:~/Documents/yocto/build_bin/tmp/deploy/images/swi-mdm9x28$ source /opt/swi/y17-ext/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi
febin@febin-VirtualBox:~/Documents/yocto/build_bin/tmp/deploy/images/swi-mdm9x28$ fdt yocto_wp76xx.2k.cwe
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named ‘encodings’

Current thread 0x00007f3c29aba700 (most recent call first):
Aborted (core dumped)
febin@febin-VirtualBox:~/Documents/yocto/build_bin/tmp/deploy/images/swi-mdm9x28$

maybe you can transfer the yocto_wp76xx.4k.cwe image by scp to /tmp folder of the module.
After that you can upgrade the FW by “fwupdate download yocto_wp76xx.4k.cwe” on module UART console.

1 Like