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.

wl127x we got the timeout error when i do hciattach

Other Parts Discussed in Thread: DM385

Hi,

 We are trying to bring up the BT on DM385 evm platform (dm814x) ezsdk package.

successfully compile the TI-compat-bluetooth package and get bluetooth.ko,compat.ko,hci_uart.ko.

After modprobe bluetooth,hci_uart successfully loaded. I have verified uart pin mux on debuffs also enable the bt-enable pin as high

I start the dbus deamon,then hciattach /dev/ttyO1 texas 3000000 &

we got the initialisation timeout, i checked other threads on e2e couldn't help....


Regards

 RAJ

  • Hi RAJ,

    The "Initialization timeout" usually indicate that the host is not able to communicate with the device (or the device is not up).
    Please verify if BT_EN is high using a scope...

    Please also check if the device power up sequence is as per the datasheet.

    Regards,
    Gigi Joseph.
  • Hi Joseph Gigi,

    Thanks for your reply,

    I verified BT_EN its 1.7v.

    this is my PIN MUX data on board file

    struct ti_st_plat_data wilink_pdata = {
    .nshutdown_gpio = -1,
    .dev_name = "/dev/ttyO1",
    .flow_cntrl = 1,
    .baud_rate = 300000,
    };

    static struct platform_device wl12xx_device = {
    .name = "kim",
    .id = -1,
    .dev.platform_data = &wilink_pdata,
    };


    /* Set up uart1 muxes */
    omap_mux_init_signal("gmii0_txd6.uart1_txd_mux1", TI814X_PULL_UP);
    omap_mux_init_signal("gmii0_txd5.uart1_rxd_mux1", TI814X_PULL_DIS | TI814X_INPUT_EN);
    omap_mux_init_signal("gmii0_txd7.uart1_ctsn", TI814X_PULL_DIS | TI814X_INPUT_EN);
    omap_mux_init_signal("gmii0_txen.uart1_rtsn", TI814X_PULL_UP);

    platform_device_register(&wl12xx_device);

    this is my dm385 process

    root@dm814x-evm:~# ps
    PID USER VSZ STAT COMMAND
    1 root 1708 S init [5]
    2 root 0 SW [kthreadd]
    3 root 0 SW [ksoftirqd/0]
    4 root 0 SW [kworker/0:0]
    5 root 0 SW [kworker/u:0]
    6 root 0 SW< [khelper]
    7 root 0 SW [irq/72-serial i]
    8 root 0 SW [irq/73-serial i]
    9 root 0 SW [irq/74-serial i]
    10 root 0 SW< [mboxd]
    11 root 0 SW [sync_supers]
    12 root 0 SW [bdi-default]
    13 root 0 SW< [kblockd]
    14 root 0 SW< [omap2_mcspi]
    15 root 0 SW [khubd]
    16 root 0 SW [kseriod]
    17 root 0 SW< [kmmcd]
    18 root 0 SW< [musb-hdrc.0]
    19 root 0 SW< [musb-hdrc.1]
    20 root 0 SW< [rpciod]
    21 root 0 SW [kswapd0]
    22 root 0 SW [kworker/0:1]
    23 root 0 SW [fsnotify_mark]
    24 root 0 SW< [aio]
    25 root 0 SW< [nfsiod]
    26 root 0 SW< [crypto]
    37 root 0 SW [mtdblock0]
    38 root 0 SW [mtdblock1]
    39 root 0 SW [mtdblock2]
    40 root 0 SW [mtdblock3]
    41 root 0 SW [mtdblock4]
    42 root 0 SW [mtdblock5]
    43 root 0 SW [kworker/u:1]
    52 root 0 SW< [usbhid_resumer]
    54 root 0 SW [mmcqd/1]
    55 root 0 SW [kjournald]
    83 root 1956 S < /sbin/udevd -d
    1225 root 0 SW< [HDMI WQ]
    1239 messageb 3676 S /usr/bin/dbus-daemon --system
    1250 root 2304 S /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host
    1255 root 2936 S /usr/sbin/telnetd
    1260 root 2524 S /usr/sbin/netserver
    1265 root 3000 S /sbin/syslogd -n -C64 -m 20
    1267 root 2936 S /sbin/klogd -n
    1272 root 2172 S /usr/sbin/thttpd -d /srv/www -p 8080 -u root -c /cgi-
    1287 root 98904 S /usr/bin/matrix_guiE -qws /usr/share/matrix/html/menu
    1293 root 2516 S login -- root
    1295 root 1968 S /sbin/getty 38400 tty1
    1298 root 3128 S -sh
    1304 root 6604 S bluetoothd
    1319 root 0 SW [flush-179:0]
    1321 messageb 3676 S dbus-daemon --system

    this is are the modules i loaded

    root@dm814x-evm:~# lsmod
    Module Size Used by
    bnep 9120 2
    bluetooth 76301 3 bnep
    compat 7219 1 bluetooth
    ti81xxhdmi 24896 0
    ti81xxfb 21991 1
    vpss 76633 2 ti81xxhdmi,ti81xxfb
    syslink 1130015 0
    ipv6 209855 14

    kindly notify i any wrong in this...

    Regards
    RAJ M
  • Hi RAJ,

    How are you toggling BT_EN?

    Regards,
    Gigi Joseph.
  • Hi Gigi Joseph,

    Thanks for your replay

    My BT_EN is connected i2c i/o expander board so i use i2cset utility to high the signal...I verified the BT_EN line is high with scope...

    Regards
    RAJ M
  • Hi Gigi Joseph,

    I have one more doubt is it correct

    # hciattach /dev/ttyO1 texas 3000000 &

    I use Jorjin WG7311-0A (TI WL1271L chipset)

    which BTS file is suitable for above one?

    Is it uses?

    /* Texas Instruments Bluelink (BRF) modules */
            { "texas",      0x0000, 0x0000, HCI_UART_LL,   115200, 115200,
                                    FLOW_CTL, DISABLE_PM, NULL, texas,    texas2 },


    Regards
    RAJ M

  • Hi,

    Yes, it is correct (though you can also use 115200).
    I would suggest that you verify proper power up sequence of the device (as per datasheet).

    Regards,
    Gigi Joseph.
  • Hi Gigi Joseph,

    Thanks for your reply.

    I probed tx signal of the device, when i do hciattach /dev/ttyO1 texas 3000000 & . I got 1msec interrupt.

    Actually what is the command will send to device when we do hciattach /dev/ttyO1 texas 3000000 & ?

    which BTS file is suitable for Jorjin WG7311-0A (TI WL1271L chipset) one?

    Regards
    RAJ M
  • Hi Raj,

    The first command will be "Read_Local_Version" and depending on the result, the appropriate firmware (TIInit_7.6.15.bts) will be loaded from "/lib/firmware/"

    Regards,
    Gigi Joseph.
  • Hi Joseph Gigi,

    Thanks for your reply.

    what is the appropriate firmware (TIInit_xxxx.bts)  for Jorjin WG7311-0A (TI WL1271L chipset)?

    can you share the file?

    Regards

    RAJ M

  • Hi RAJ,

    Like I told, the bts file for WL1271L is: TIInit_7.6.15.bts
    It is available from: git.ti.com/.../initscripts

    Regards,
    Gigi Joseph.
  • Hi Joseph Gigi,

    Thanks for your reply.

    In kernel make menuconfig

    [*] Networking support --->
    <M> Bluetooth subsystem support --->
    [M] L2CAP protocol support
    Bluetooth device drivers --->
    <M> HCI UART driver
    [*] UART (H4) protocol support
    [*] BCSP protocol support
    [ ] Atheros AR300x serial support
    [*] HCILL protocol support
    Networking support →
    <*> RF switch subsystem support

    Is it enough for bluetooth enable?

    bluetooth.ko and hci_uart.ko compiled from ti-compat-wireless-wl12xx package.

    Regards
    RAJ M
  • Hi Joseph Gigi,

    Thanks for your reply.

    In kernel make menuconfig

    [*] Networking support --->
    <M> Bluetooth subsystem support --->
    [M] L2CAP protocol support
    Bluetooth device drivers --->
    <M> HCI UART driver
    [*] UART (H4) protocol support
    [*] BCSP protocol support
    [ ] Atheros AR300x serial support
    [*] HCILL protocol support
    Networking support →
    <*> RF switch subsystem support

    Is it enough for bluetooth enable?

    bluetooth.ko and hci_uart.ko compiled from ti-compat-wireless-wl12xx package.

    Regards
    RAJ M
  • Hi Joseph Gigi,

    Thanks for your reply.

    In kernel make menuconfig

    [*] Networking support --->

    <M> Bluetooth subsystem support --->

    [M] L2CAP protocol support

    Bluetooth device drivers --->

    <M> HCI UART driver

    [*] UART (H4) protocol support

    [*] BCSP protocol support

    [ ] Atheros AR300x serial support

    [*] HCILL protocol support

    Networking support →

    <*> RF switch subsystem support

    Is it enough for bluetooth enable?

    bluetooth.ko and hci_uart.ko compiled from ti-compat-wireless-wl12xx package.

    Regards

    RAJ M

  • Hi Joseph Gigi,

    Thanks for your reply.

    I verify proper power up sequence of the device (as per datasheet).

    so hciattach send 4 byte command to device then device send back to host..below snap i did with scope.

    The attached scope trace channel assignments:

    1. HOST_TX  / HCI_RX
    2. HOST_RX / HCI_TX
    3. HCI_RTS
    4. BT_EN

    When I set BT_EN high, the chip takes 114ms for HCI_RTS to go low.The jorjin datasheet says this should occur in less then 100 ms according to their datasheet.

    But i still got initialisation timed out.

    Regards,

     RAJ M

  • Hi RAJ,

    I see that you have raised a new query on this: e2e.ti.com/.../1592544.
    We will track it as part of that thread. I am closing this one.

    Regards,
    Gigi Joseph.