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/WL1835MODCOM8B: bt-en.sh script not working correctly

Part Number: WL1835MODCOM8B

Tool/software: Linux

I have the WL1835MODCOM8B plugged into an AM437x EVM board, and I am trying to get Bluetooth working. I went through the Getting Started Guide to get Bluetopia PM up and running, and now i am trying to get one of the sample applications running. Whenever I try to run the SetDevicePower command in order to power up the BT device, I get the following output:

echo 0 > /sys/class/gpio/gpio16/value
echo 1 > /sys/class/gpio/gpio16/value
echo 0 > /sys/class/gpio/gpio16/value
echo 1 > /sys/class/gpio/gpio16/value
BT COMM PORT (/dev/ttyS3): 2
Changing HCI baud rate to 3000000
Status: Executing BTS Script /lib/firmware/TIInit_11.8.32.bts.
Status: BTS Script successfully executed.
DEVM_PowerOnDevice() Failure: -4, Unknown Error.
Function Error.

I think this error might be related to the fact that whenever I try to run bt-en.sh, I get the following output:

TI AM437x GP EVM
success
./bt-en.sh: line 19: echo: write error: Device or resource busy
Done enabling BT
mkdir: can't create directory '/home/root/tibt': File exists

The line causing the write error is "echo 16 > /sys/class/gpio/export" in bt-en.sh. Any ideas about why this is happening?

  • Are, you using processor SDK? If, so which version.

    To check UART/HCI link to the WL18xx BT controller, you can use below tool :

    $hci-test <dev name> <baudrate> <bt en gpio>https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/667/hci_2D00_test-_2800_1_2900_

  • Use this command from console. dev name = tty device
    $hci-test <dev name> <baudrate> <bt en gpio>
  • I am using SDK version 04.03.00.05.

    I tried using the hci-test tool, but when I try to run it I get the following error:

    -sh: ./hci-test: cannot execute binary file
  • That is strange.. Did, you make any changes to the kernel (specially UART driver, enable/disable DMA etc) to SDK4.03 binaries? If, not i can try on a AM43x EVM woth SDK4.03 binaries..

    Thanks
  • I don't think I have made any changes to the kernel relating to the UART driver or DMA... I think the only thing I've done is created an LKM and made some minor changes to the .dts file.
  • Is the issue still persistent? If so, i suggest a fresh reformat of the SDCARD, copy the TISDK file system and binaries and give it a try..

    Thanks
  • Yes, this problem is still happening. What are the exact steps that I need to follow to get the Bluetooth stack and BluetopiaPM up and running? The documentation is all over the place and I just want to be sure I have everything installed an set up correctly.
  • I tried on my AM437x EVM and there are no issues, it ran just fine. The steps are simple, as listed here:
    processors.wiki.ti.com/.../TI_Bluetooth_Stack_for_WL18xx_-_Getting_Started_Guide
  • So it must have been an issue with the previous version of Bluetooth stack because after I re-downloaded everything and started over, I no longer got the Unknown Error. Now when I run the sample program I can power on the device, however I am now getting the following messages:

    Hands Free AG wl18xx>9 1

    echo 0 > /sys/class/gpio/gpio16/value
    echo 1 > /sys/class/gpio/gpio16/value
    echo 0 > /sys/class/gpio/gpio16/value
    echo 1 > /sys/class/gpio/gpio16/value
    BT COMM PORT (/dev/ttyS3): 2
    Changing HCI baud rate to 3000000
    Status: Executing BTS Script /lib/firmware/TIInit_11.8.32.bts.
    Status: BTS Script successfully executed.
    DEVM_PowerOnDevice() Success: 0.

    Device Powered On.
    Hands Free AG wl18xx>killall: gst-launch-1.0: no process killed
    Setting pipeline to PAUSED ...
    ERROR: Pipeline doesn't want to pause.
    ERROR: from element /GstPipeline:pipeline0/GstAlsaSink:alsasink0: Could not open audio device for playback.
    Additional debug info:
    ../../../gst-plugins-base-1.8.3/ext/alsa/gstalsasink.c(863): gst_alsasink_open (): /GstPipeline:pipeline0/GstAlsaSink:alsasink0:
    Playback open error on device 'plughw:AM335xEVM': No such device
    Setting pipeline to NULL ...
    Freeing pipeline ...
    Hands Free AG wl18xx>Setting pipeline to PAUSED ...
    ERROR: Pipeline doesn't want to pause.
    ERROR: from element /GstPipeline:pipeline0/GstAlsaSink:alsasink0: Could not open audio device for playback.
    Additional debug info:
    ../../../gst-plugins-base-1.8.3/ext/alsa/gstalsasink.c(863): gst_alsasink_open (): /GstPipeline:pipeline0/GstAlsaSink:alsasink0:
    Playback open error on device 'plughw:WILINK8BT': No such device
    Setting pipeline to NULL ...
    Freeing pipeline ...

    Do I need to change the name of the playback device?
  • Alright.. I would suggest testing with SPP or other demo examples instead of HFP handsfree etc, which needs additional changes to route PCM traffic to the codec on the EVM etc..

    Since, the Bluetopia stack itself is up and able to down load the BTS file to controller etc., i suggest closing this thread. If you have issues with any other issues, please open a new one with relevant topic title.

    Thanks