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: st_register failed and empty hcitool scan

Part Number: CC2564MODA
Other Parts Discussed in Thread: CC2564

Tool/software: Linux

Hello,

We are using 'CC2564MODACMOG' module on our target device(Linux buildroot on arm architecture).
And followed the wiki page 'processors.wiki.ti.com/.../Shared_Transport_Driver'  for enabling support for
the shared transport driver, and btwilink driver in linux.

Below are the Kernel changes we have made.
CONFIG_TI_ST=y
CONFIG_BT_WILINK=y


Other additions:
CONFIG_BT=y                        (Bluetooth subsystem support)
BT_BREDR=y                         (Bluetooth Classic (BR/EDR) features)
CONFIG_BT_RFCOMM=y                 (RFCOMM protocol support)
CONFIG_BT_RFCOMM_TTY=y             (RFCOMM TTY support)
CONFIG_BT_BNEP=y                   (BNEP protocol support)
CONFIG_BT_BNEP_MC_FILTER=y         (Multicast filter support)
CONFIG_BT_BNEP_PROTO_FILTER=y      (Protocol filter support)
CONFIG_BT_HIDP=y                   (HIDP protocol support)
BT_LE=y                            (Bluetooth Low Energy (LE) features)
 

We also made required 'Platform changes' given in the above link .


Then downloaded the service pack 'cc256xb_bt_sp_v1.6.zip' and copied the
'initscripts-TIInit_6.7.16_ble_add-on.bts' to target device's '/lib/firmware/' directory,
and renamed bts file as 'TIInit_6.7.16.bts'.

But when device boots up we get below Error messages.

(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-installed
Bluetooth: st_register failed -22


Now if command  'hciconfig hci0 up' is issued the output will be,

(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)


The same error messages will appear if we build btwilink driver as module and load it using modprobe.

we also changed firmware file with one found on link 'git.ti.com/.../initscripts'
TIInit_6.7.16.bts and copied to target device's '/lib/firmware' directory, then also the driver will produce same error messages.


We also tried with another method i.e disabling the 'btwilink' driver support and using plain uart kernel modules,
then we get below error messages.

kernel changes:
enabled:
CONFIG_BT_HCIUART=y         (HCI UART driver)
CONFIG_BT_HCIUART_H4=y      (UART (H4) protocol support ) 
CONFIG_BT_HCIUART_BCSP=y    (BCSP protocol support)
CONFIG_BT_HCIUART_LL=y      (HCILL protocol support)


disabled :
CONFIG_TI_ST
CONFIG_BT_WILINK


Now copied the firmware file , and after boot up we used below commands to bring 'hci0' interface,

command : bluetoothd &
output      :

command : hciattach -n -s 115200 /dev/ttySC2 texas 115200 flow &
output :
            Found a Texas Instruments' chip!
            Firmware file : /lib/firmware/TIInit_6.7.16.bts
            Loaded BTS script version 1
            Device setup complete

command: hciconfig hci0 up
output :

command : hciconfig hci0 piscan
output :

command : hciconfig -a
output :
        hci0:   Type: BR/EDR  Bus: UART
        BD Address: CC:78:AB:3F:45:87  ACL MTU: 1021:4  SCO MTU: 180:4
        UP RUNNING PSCAN ISCAN
        RX bytes:1507 acl:0 sco:0 events:48 errors:0
        TX bytes:1063 acl:0 sco:0 commands:48 errors:0
        Features: 0xff 0xfe 0x2d 0xfe 0xdb 0xff 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF
        Link mode: SLAVE ACCEPT
        Name: 'buildroot-0'
        Class: 0x400100
        Service Classes: Telephony
        Device Class: Computer, Uncategorized
        HCI Version: 4.0 (0x6)  Revision: 0x0
        LMP Version: 4.0 (0x6)  Subversion: 0x1b90
        Manufacturer: Texas Instruments Inc. (13)


command: hcitool scan
output:



Here the hcitool scan detects the devices around it some times, but most of the time it does not detect any devices around it,
i.e produces no output,and the device 'buildroot-0' is also not detectable to other devices.


If we change the firmware file one downloaded from url 'git.ti.com/.../initscripts'.
The command 'hciattach -n -s 115200 /dev/ttySC2 texas 115200 flow &' will produce below output.

Output:

    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/TIInit_6.7.16.bts
    Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1
  
    Initialization timed out.






Thank You,

Deepak