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.

WL1837MOD: Linux 4.9.x: Bluetooth (stc): chnl_id 4 already registered

Part Number: WL1837MOD

I am struggling with a problem when bringing up the Bluetooth interface under Linux kernel 4.9.x for a WL1837MOD.

dmesg summary at boot:

Bluetooth: Core ver 2.22
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
(stk) :sysfs entries created
(stc): chnl_id list empty :4
(stk) : st_kim_start
(stk) :ldisc_install = 1
(stc): st_tty_open
(stk) :line discipline installed
(stk) :ti-connectivity/TIInit_11.8.32.bts
(stk) :change remote baud rate command in firmware
(stk) :skipping the wait event of change remote baud
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
Bluetooth: BNEP socket layer initialized
(stc): add_channel_to_table: id 4
(stc): add_channel_to_table: id 2
(stc): add_channel_to_table: id 3

'hciconfig' output:

hci0: Type: Primary Bus: UART
BD Address: A4:D5:78:10:A2:BC ACL MTU: 1021:6 SCO MTU: 180:4
DOWN
RX bytes:588 acl:0 sco:0 events:31 errors:0
TX bytes:402 acl:0 sco:0 commands:31 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

When trying to bring the HCI 'up' I get the following error:

(stc): chnl_id 4 already registered Bluetooth: st_register failed -114
Can't init device hci0: Input/output error (5)

Anybody any ideas where I'm going wrong?

  • Hi,

    We will need some more information on your system.

    In the latest kernel versions (i.e. 4.9), the shared transport (st) is removed. For mainline linux releases and TI Linux SDK releases for AMxxx processors, WL18xx BT is supported through HCI tty and Bluez. Did you manually add the shared transport and rebuild your kernel?

    Best regards,
    Vihang
  • Hi Vihang,

    I'm not on the mainline kernel, but using a Freescale (NXP) branch for the IMX7D processor.
    Since my original post I have been researching this issue and, as you are suggesting, a number of posts say not to use the ST. I'm just re-building my Kernel to try this and will post back.

    dh
  • Hi Vihang,

    I've changed my kernel build by removing the TI_ST driver. I am now using the Linux HCI tty and I can confirm that the WiLink8 Bluetooth is now up and running using the following:

    #export the BT enable line 'BT_EN'
    echo 'BT_EN' > /sys/class/gpio/export

    #set the BT_EN pin direction to an output
    echo out > /sys/class/gpioXX/direction

    #toggle the BT_EN line to re-initialise the BT interface; this is so it is ready to accept the firmware
    echo 1 > /sys/class/gpioXX/value
    echo 0 > /sys/class/gpioXX/value
    echo 1 > /sys/class/gpioXX/value

    #attach to the bluetooth HCI using your UART interface (in my case 'ttymxc2')
    hciattach /dev/ttymxc2 texas flow

    #firmware TIInit_11.8.32.bts loads from /lib/firmware/ti-connectivity
    ...Found a Texas Instruments' chip!
    ...Firmware file : /lib/firmware/ti-connectivity/TIInit_11.8.32.bts
    ...Loaded BTS script version 1
    ...texas: changing baud rate to 3000000, flow control to 1
    ...Bluetooth: HCI UART driver ver 2.3
    ...Bluetooth: HCI UART protocol H4 registered
    ...Bluetooth: HCI UART protocol LL registered
    ...Device setup complete

    #confirm HCI is up
    hciconfig -a


    Many thanks for your help.
    dh