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/CC2564MODA: CC2564MODA-Bluetooth: st_register failed -22

Part Number: CC2564MODA
Other Parts Discussed in Thread: WL1837

Tool/software: Linux

Hello ,

I am using CC2564MODA bluetooth module with IMX7.

Interface: UART

I have followed some of the ti-links & accordingly i have enabled  CONFIG_TI_ST, CONFIG_ST_HCI & CONFIG_BT_WILINK in kernel.

Added device tree support for uart6 &  kim , wilink driver.

Downloaded TIINIT_6.7.16.bts in /lib/firmware.

I got "hci0" node .but when i am trying to make hciconfig hci0 up, i am getting error as below.

(stc):  chnl_id list empty :4
(stk) : st_kim_start(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installedBluetooth: st_register failed -22
Can't init device hci0: Input/output error (5)

Any idea on the above error.

Thanks & regards

Surya

  • Which kernel version are you using? In recent TI SDKS, shared transport is not used any more.

    thanks
  • Hi hari,
    I am using kernel 4.1.15 .
    May i know is there any dependency for TI SDK on my current kernel-4.1.15 version.

    Thanks
  • our suggestion is to remove 'shared transport' driver, and use just 'hci_uart' driver from the kernel. Here is the recommended procedure on the TI baseline 4.4 kernel.

    Kernel Part :

    a) Build kernel BT module without TI ST driver.. Use plain linux UART driver with HCI.. For K4.4, we use below kernel config options:

    CONFIG_BT_RFCOMM
    CONFIG_BT_HCIUART
    CONFIG_BT_HCIUART_H4
    CONFIG_BT_HCIUART_LL
    CONFIG_BT_HCIUART_3WIRE


    User space/File system Part:

    b) Take a note of the UART and GPIO (BT Enable) wired to the WL1837 for Bluetooth.

    After, kernel has booted..

    i) Toggle the BT EN GPIO lines to reset the device.
    ex:
    echo <bt_en> /sys/class/gpio/export
    echo out > /sys/class/gpio/gpio<bt_en>/direction
    echo 0 > /sys/class/gpio/gpio<bt_en>/value
    echo 1 > /sys/class/gpio/gpio<bt_en>/value

    ii) If, you are using Bluez, use hciattach, to load the firmware as below :

    #hciattach <uart dev port> texas <baudrate>