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.

hciattach tool doesn't detect TiWi-BLE(WL1271L) module

Hi,


Trying to interface TiWi-BLE (WL1271L) module with imx6. WiFi is working perfect. But bluetooth functionality not working as expected. SLOW_CLK is connected to 32KHz. Both BT_EN and BT_FUNC2 have been mapped to GPIO and pulled high. When I run below command I get "Initialization timed out." Tried with bluez-4 and bluez-5.37

root@WINGZ:~# hciattach -s 115200 /dev/ttymxc3 texas 3000000
Initialization timed out.

It doesnt even show "Found a Texas Instruments' chip! ". What could be the reason?


Regards,

Thaj

  • Does cycling the BT_EN pin and then doing hciconfig hciX up; hciconfig hciX down (where X is the device number given by hciconfig) help? I had the same problem and doing the hciconfig cycle before hciattach seemed to solve it...
  • Hi Thaj,

    The hciattach is not getting any response from the device. The typical reason is that the BT_EN is not high. You can also confirm if the UART port is correct, and also check that the proper power up sequence is followed - does the HCI_RTS go low after BT_EN ?

    Regards,
    Gigi Joseph.
  • Thank you Gigi.

    I did debug the issue and found out the following.

    1. Initial state of HCI_RTS is high (1.8V) when BT_EN is low. When I pull BT_EN high HCI_RTS should go low (0V) (As per datasheet power up sequence). But instead it goes to 0.9V. And when I run hciattach command it goes to 0V and ends up with time out error.
    2. As HCI_RTS is connected to UART4_CTS_B of imx6 processor I doubt processor is pulling it to 0.9V even if pin muxing is done correct.
    3. Finally I physically removed HCI_CTS and HCI_RTS connections and executed below command.

    root@WINGZ:~# hciattach -s 115200 /dev/ttymxc3 texas 3000000 noflow
    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/ti-connectivity/TIInit_7.6.15.bts
    Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1
    Initialization timed out.

    4. Now its detecting the chip. But time out error after loading the BTS script. The problem is as per texas configuration flow control is enabled. I can see it is setting flow control to 1. I checked hciattach_ti.c and found that the flow control setting is coming from BTS file.

    Questions:
    1. Is flow control mandatory for this chip (HCI_CTS and HCI_RTS connections)?
    2. If not is there any way to disable flow control. Different BTS file or some hci command?

    Regards,
    Thaj
  • Hi Thaj,

    Yes it is required.
    Please see: processors.wiki.ti.com/.../WL127x_Porting_Guide

    AFAIK, on i.Mx6 the CTS and RTS definitions are reversed to TI nomenclature. So you connect CTS to CTS and RTS to RTS. Please also confirm that you have the "uart-has-rtscts" defined in the dts.

    Regards,
    Gigi Joseph.
  • Hi Gigi,

    Yes IMX6 CTS and RTS is a little confusing. "fsl,uart-has-rtscts" defined in dts already. I will find out the CTS/RTS fix for IMX6. Looks like we can interchange CTS and RTS pin functionality of IMX6.
    community.freescale.com/.../DOC-97509

    Thanks again for your support. I will fix this and post the updates here.

    Regards,
    Thaj