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.

AM5728: TI Bluetooth Stack WL18xx Power on failure

Part Number: AM5728


Hi All,

I am using AM57xx EVM for Bluetooth interface with WL18xx, for that I am following TI Bluetooth Stack WL18xx guide,

I did the following steps,

1) Installed  AM335xBluetopiaLinuxProduction-4.2.1.0.1.0-linux-x64-installer.run ,

2) Build the above WiLink™ 8 Linux Bluetooth Add-On using build guide ,

3)Copy the BluetopiaPM server (SS1BTPM) on EVM to  /home/root/BluetopiaPM

4)Copy Init-scripts "Bluetooth Script (BTS) " on EVM to lib/firmware/

5) Ran Bluetooth Hardware configuration scrip bt-en.sh , where bt_en gpio is 132 and uart is ttyS7, baud_rate=3686400,

6) Than ran SS1BTPM  and LinuxSPPM from /home/root/BluetopiaPM/bin,

But when I try to SetDevicePower 1 on LinuxSPPM prompt after  Initialize 1, it's giving folowing error , please help me on this,

Error: Could not get the script version from the controller. TIBTS_Get_Script_Version() Result: -14.
echo 0 > /sys/class/gpio/gpio132/value
DEVM_PowerOnDevice() Failure: -4, Unknown Error.
Function Error.

Note: I am using ti-processor-sdk-linux-am57xx-evm-04.03.00.05

Thanks and Regards,

Snehal Patel

  • Snehal ,
    - Can you confirm BT_EN and the UART are as per AM57xx EVM schematics ?
    - Does the sdk dts file already include BT related mods ?

    Saurabh
  • If, you are using the AM57x EVM with TI Processors SDK4.x, the systemmd service automatically detects the board and creates the bt config file (/home/root/tibt/config). The speed is limited to 3M (3000000) baud.

    Thanks
  • Hi Saurabh,

    BT_EN is connected to EVM gpio5_4 means gpio132 on linux,

    EVM UART8 is connected to  Bluetooth interface (BT_UART_TX ,BT_UART_RX, BT_UART_CTS, BT_UART_RTS) ,

    SDK dts already has BT related config like uart8 and BT_EN gpio 132,

    I have probe  gpio132 and BT_UART_CTS using DSO and there are activity going this pins when I am giving 'SetDevicePower 1' on LinuxSPPM prompt.

    Regards,

    Snehal 

  • Hi Hari,

    After power on the EVM I can see bt config file at /home/root/tibt/config with following contain,

    nshutdown_gpio=132
    tty=/dev/ttyS7
    flow_cntrl=1
    baud_rate=3000000

    But with this baud rate I am getting error "Error: Could not open the script file /lib/firmware/TIInit_12.8.32.bts." Below are the logs.

    " SPPM>1 1

    BTPM_Initialize() Success: 0.
    DEVM_RegisterEventCallback() Success: 5.
    SPPM>9 1

    echo 132 > /sys/class/gpio/export
    sh: line 0: echo: write error: Device or resource busy
    echo out > /sys/class/gpio/gpio132/direction
    echo 0 > /sys/class/gpio/gpio132/value
    echo 1 > /sys/class/gpio/gpio132/value
    echo 0 > /sys/class/gpio/gpio132/value
    echo 1 > /sys/class/gpio/gpio132/value
    BT COMM PORT (/dev/ttyS7): 1
    Changing HCI baud rate to 3000000
    Status: Executing BTS Script /lib/firmware/TIInit_12.8.32.bts.
    Error: Could not open the script file /lib/firmware/TIInit_12.8.32.bts.
    echo 0 > /sys/class/gpio/gpio132/value
    DEVM_PowerOnDevice
    () Failure: -4, Unknown Error.
    Function Error. "

    Note: when I change baud rate to 3686400, following error is coming,
    BT COMM PORT (/dev/ttyS7): 1
    Changing HCI baud rate to 3686400
    Error: Could not get the script version from the controller. TIBTS_Get_Script_Version() Result: -14.

    Regards,
    Snehal
  • Hi,

    Bletopia libraries look for BTS frimware in '/lib/firmware' folder, where as the SDK has populated them in '/lib/firmware/ti-connectivity'.. Please copy the BTS files to '/lib/firmware' and try again..

    Thanks
  • Hi Hari,

    Now Bluetooth device is power on, the problem was I am using wrong BTS file, the following one work for me,
    git.ti.com/.../TIInit_12.8.32.bts

    logs:

    " SPPM>1 1

    BTPM_Initialize() Success: 0.
    DEVM_RegisterEventCallback() Success: 5.
    SPPM>9 1

    echo 132 > /sys/class/gpio/export
    sh: line 0: echo: write error: Device or resource busy
    echo out > /sys/class/gpio/gpio132/direction
    echo 0 > /sys/class/gpio/gpio132/value
    echo 1 > /sys/class/gpio/gpio132/value
    echo 0 > /sys/class/gpio/gpio132/value
    echo 1 > /sys/class/gpio/gpio132/value
    BT COMM PORT (/dev/ttyS7): 1
    Changing HCI baud rate to 3000000
    Status: Executing BTS Script /lib/firmware/TIInit_12.8.32.bts.
    Status: BTS Script successfully executed.
    DEVM_PowerOnDevice() Success: 0.
    SPPM>
    Device Powered On. "


    Regards,
    Snehal