This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/WL1837MOD: Porting the TI Dual-Mode Bluetooth Stack to a Yocto Enviroment

Part Number: WL1837MOD
Other Parts Discussed in Thread: WL1837

Tool/software: Linux

Our design is on a different platform that we can build using a Yocto Build enviroment. We have been using BlueZ but would like to use the TI Dual-Mode Stack to leverage the BLE functionality of the WL1837.

  • It would be preferable if a Yocto Recipe could be provided that would could include in our Yocto Environment.
    Our Yocto Environment uses the Linaro 4.8 Toolchain and our kernel version is 3.1.10
  • TI provides Blutopia stack. It is not based on Yocto Environment, but can be easily built with Linaro/GCC tool chain.
    www.ti.com/.../ti-bt-stack-linux-addon

    Thanks
  • You will need to write your own recipe and download code separately. The download is from http://www.ti.com/tool/ti-bt-4-2-stack-linux-addon . You need to accept a click wrap license to get at a tarball of the delivery. Once you have that tarball you can put it in your download repository.

     

    There is a script to build the Bluetopia as part of a larger SDK project you can download from https://gforge.ti.com/gf/download/user/1160/8013/sdk3.0.1-system-build-v3.2.tar.gz (wiki is http://processors.wiki.ti.com/index.php/WL1835%5CWL1837-Wireless-Sensor-Gateway).

     

    The key info I think you might need to create the .bb file is in the lines below. Hopefully this gives you all the information you need to create a .bb file

     Iain

     

    SDK_DIR=`pwd`

    BLUETOPIA=AM335xBluetopiaLinuxProduction-4.2.1.0.1.0

     

     

    #set environment for Bluetopia build

    export BLUETOPIA_PATH=${SDK_DIR}/${BLUETOPIA}/BluetopiaPM/Bluetopia/

    export BLUETOPIA_ROOT_PATH=${SDK_DIR}/${BLUETOPIA}/BluetopiaPM/Bluetopia/

    export TI_SDK_PATH=${SDK_DIR}

     

    export NATIVE_PATH=x86_64-arago-linux

    export TARGET_PATH=armv7ahf-neon-linux-gnueabi

    export CROSS_COMPILE="${SDK_DIR}/linux-devkit/sysroots/${NATIVE_PATH}/usr/bin/arm-linux-gnueabihf-"

    export PATH="$PATH:${SDK_DIR}/linux-devkit/sysroots/${NATIVE_PATH}/usr/bin"

    export USR_INCLUDE_PATH="${SDK_DIR}/linux-devkit/sysroots/${TARGET_PATH}/usr"

     

    # Pick up the correct kernel version used in this particular SDK

    KERNEL_VER=linux-4.4.19+gitAUTOINC+db0b54cdad-gdb0b54cdad

     

     

    …..

     

     

    cd ${BLUETOPIA} || exit

     

    # Bluetopia 4.0.3 has a preparation stage before building

       

    # first stage is to create build/setup-bt with correct paths for this SDK

    cd build || exit

    cp setup-bt.sample setup-bt

     

    # now substitute root directory of this SDK and correct linux kernel

    sed --in-place "s:~/ws/sdk/am335x-sdk8.00:${SDK_DIR}:g" setup-bt

    sed --in-place "s:linux-3.14.26-g2489c02:${KERNEL_VER}:g" setup-bt

     

    # and update tool chain subdirectories

    cp proj/toolchain-defs.mak proj/toolchain-defs.mak.original

    sed --in-place "s:i686-arago-linux:${NATIVE_PATH}:g" proj/toolchain-defs.mak

    sed --in-place "s:cortexa8t2hf-vfp-neon-linux-gnueabi:${TARGET_PATH}:g" proj/toolchain-defs.mak

    cd ..

     

      

     

    # import env settings for bluetopia

    cd build || exit

    source configure.sh

     

    # and rebuild all bluetopia package including the newly added app

    make clobber

    make

    cd ..

     

     

    # Now cd to the filesystem directory

    cd ${INSTALL_PATH}

     

     

    # copy bth stack

    sudo mkdir -p home/root/sensors

    sudo cp ${SDK_DIR}/${BLUETOPIA}/BluetopiaPM/bin/SS1BTPM home/root/

    sudo chmod a+x home/root/SS1BTPM

     

     

  • Thanks for the feedback, I noticed you mentioned a Linux Kernel version of 4.4.xx

    Is there a version of the Stack that is supported on older kernels?

    One limitation is we are working with a Linux Kernel 3.1.10 and don't have support from our main soc manufacturer to updating the kernel past this version.

  • Hi Brent,
    There is no kernel dependency in Bluetopia, that was just to make build script work. As is, Bluetopia expects a device tree to set UART etc which I expect you will need to hardcode if you are on a 3.1.
    The only real dependency is that you need to have a hard float file system as the binaries are compiled with an armhf toolchain.
    Iain