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.

Bluetooth and wifi support throuth wl1271 in android JB 4.2.2

Other Parts Discussed in Thread: WL1271, WL1283

Hi All,

i am using wl1271 module from murata with freescale imx6 processor.
We are using android JB 4.2.2.
so i have some doubts regarding that.
in android jb 4.2.2, bluetooth stack is bluedroid instead of bluez.
so do i need to do any different configurations in android so that wl1271 will work with bluedroid stack.
in the case of bluez stack, we are starting following services from init script.
dbus-daemon
uim-sysfs
bluetoothd
but i have built android and i m not finding any bluetoothd in system/bin.
so do i need to do any different configuration in Boardconfig.mk, or init script. etc.
How can I make node for bluetooth, which we need to pass in ti-st platform data structure.?

thanks and regards,
jags gediya

  • Hi Jags,

    Make sure that you have the below “Libbt-vendor-ti”( Make sure that you are having only “Libbt-vendor-ti” of TI and no other libbt-vendor) and HCI TTY driver integrated in your set-up. To get the BT up.

    Libbt-vendor-ti (bluedroid_wilink):

    http://git.omapzoom.org/?p=platform/hardware/ti/wpan.git;a=tree;h=refs/heads/d-jb-mr1-release;hb=refs/heads/d-jb-mr1-release

     HCI TTY driver (drivers/misc/ti-st):

    http://git.omapzoom.org/?p=kernel/omap.git;a=tree;hb=p-android-omap-3.4.

    If you see ‘uim-sysfs’ that should be enough

    For more details please go through the below link(User Guide, Release notes, … )

    http://downloads.ti.com/sitara_android/esd/TI_Android_DevKit/TI_Android_JB_4_2_2_DevKit_4_1_1/index_FDS.html

    Thanks & Regards,

    Sundeep.

  • Hi Sundeep,

    Thanks for the reply.

    I have done configuration as you say.
    i have included libbt-vendor-ti.

    there is no other libbt-vendor compiling inside my android.
    i have adde that hci tty driver inside the kernel in drivers/misc/ti-st.

    we have interfaced bluetooth at uart4 to our processor imx6 from freescale.

    now i have few doubts.
    do it compulsory to use flow control for uart with wl1271.(if we will not use cts-rts lines than it will be ok?)

    now i have done all above configuration and i am getting following errors inside the kernel logs.

    imx-uart.3: ttymxc3 at MMIO 0x21f0000 (irq = 61) is a IMX(stc): registered n_shared line discipline
    (stk) :sysfs entries created
    (stk) : debugfs entries created
    (hci_tty): inside hci_tty_init
    (hci_tty): allocated 251, 0

    Bluetooth: Bluetooth Driver for TI WiLink - Version 1.0

    hci0 ca334000

    (stc): st_register(2)
    (stc):  chnl_id list empty :2
    (stk) : st_kim_start
    INSIDE plat_kim_chip_enable
    ca334000 name hci0 blocked 0

    (stk) :ldisc_install = 1

    (stk) :line disc installation timed out
    (stk) :ldisc_install = 0

    INSIDE plat_kim_chip_enable
    (stk) :ldisc_install = 1
    (stk) :line disc installation timed out
    (stk) :ldisc_install = 0
    INSIDE plat_kim_chip_enable
    (stk) :ldisc_install = 1
    (stk) :line disc installation timed out
    (stk) :ldisc_install = 0
    INSIDE plat_kim_chip_enable
    (stk) :ldisc_install = 1
    (stk) :line disc installation timed out
    (stk) :ldisc_install = 0
    INSIDE plat_kim_chip_enable
    (stk) :ldisc_install = 1
    (stk) :line disc installation timed out
    (stk) :ldisc_install = 0
    Bluetooth: st_register failed -22
    (hci_tty): inside hci_tty_open (cb35e670, cbdeb460)
    (stc): st_register(4)
    (stc):  chnl_id list empty :4
    (stk) : st_kim_start
    INSIDE plat_kim_chip_enable
    (stk) :ldisc_install = 1
    (stk) :line disc installation timed out
    (stk) :ldisc_install = 0
    INSIDE plat_kim_chip_enable
    (stk) :ldisc_install = 1
    init: sys_prop: permission denied uid:1003  name:service.bootanim.exit
    (stk) :line disc installation timed out
    (stk) :ldisc_install = 0select 2793 (d.process.acore), adj 15, size 5258, to kill
    send sigkill to 2793 (d.process.acore), adj 15, size 5258
    INSIDE plat_kim_chip_enable
    (stk) :ldisc_install = 1select 2882 (ndroid.exchange), adj 15, size 4221, to kill
    (stk) :line disc installation timed out
    (stk) :ldisc_install = 0select 2882 (ndroid.exchange), adj 15, size 4221, to kill
    INSIDE plat_kim_chip_enable
    (stk) :ldisc_install = 1
    (stk) :line disc installation timed out
    (stk) :ldisc_install = 0select 3021 (droid.gallery3d), adj 15, size 4683, to kill
    INSIDE plat_kim_chip_enable
    (stk) :ldisc_install = 1
    (stk) :line disc installation timed out
    (stk) :ldisc_install = 0
    INSIDE plat_kim_chip_enable
    (stk) :ldisc_install = 1
    (stk) :line disc installation timed out
    (stk) :ldisc_install = 0
    (hci_tty): st_register failed -22

    uim-logs:

    E/uim-sysfs( 2157): uim: Inside main
    E/uim-sysfs( 2157): uim:ST built into the kernel ?
    E/uim-sysfs( 2157): uim:BT driver module un-available...
    E/uim-sysfs( 2157): uim:BT driver built into the kernel ?
    E/uim-sysfs( 2157): uim:FM driver module un-available...
    E/uim-sysfs( 2157): uim:FM driver built into the kernel ?
    E/uim-sysfs( 2157): uim:GPS driver module un-available...
    E/uim-sysfs( 2157): uim:GPS driver built into the kernel ?
    E/uim-sysfs( 2157): uim:FM V4L2 driver module un-available...
    E/uim-sysfs( 2157): uim:FM V4L2 driver built into the kernel ?
    E/uim-sysfs( 2157): uim:found bluetooth rfkill entry @ 0
    E/uim-sysfs( 2157):
    E/uim-sysfs( 2157): uim:changed permissions for /sys/class/rfkill/rfkill0/state(0)
    E/uim-sysfs( 2157):
    E/uim-sysfs( 2157): uim: Inside st_uart_config
    E/uim-sysfs( 2157): uim:install set to 1
    E/uim-sysfs( 2157): uim: Inside set_baud_rate
    E/uim-sysfs( 2157): uim: set_baud_rate() done
    E/uim-sysfs( 2157): uim: Inside read_firmware_version
    E/uim-sysfs( 2157): uim: Inside read_hci_event
    E/uim-sysfs( 2157): uim: read_hci_event
    E/uim-sysfs( 2157): uim:Failed to read init response (READ_LOCAL_VERSION_INFORMATION)
    E/uim-sysfs( 2157): uim: Setting speed to 3000000
    E/uim-sysfs( 2157): uim: Inside read_command_complete
    E/uim-sysfs( 2157): uim: Command complete started
    E/uim-sysfs( 2157): uim: Inside read_hci_event
    E/uim-sysfs( 2157): uim: read_hci_event
    E/uim-sysfs( 2157): uim: Invalid response
    E/uim-sysfs( 2157): uim:cleanup
    E/uim-sysfs( 2157): uim: Inside st_uart_config
    E/uim-sysfs( 2157): uim: Un-Installed N_TI_WL Line displine

    from above behaviour can you tell me what is happening in our board?

    thanks and regards,

    jags gediya

  • Hi Jags,

     

    Yes flow control is required.

     

    It looks like the GPIO is not toggled correctly.
    Also make sure that you are using RTS/CTS lines.

     

    Thanks & Regards,
    Sundeep.   
  • Hi Sundeep,
    i will use flow control and rts/cts lines.

    i am geeting some further messages in ./adb logcat.

    I/bluedroid( 3006): enable
    I/bt_hci_bdroid( 3006): init
    I/        ( 3006): vendor Init
    D/BTSNOOP-DISP( 3006): btsnoop_open
    I/bt_hci_bdroid( 3006): bt_hc_worker_thread started
    I/GKI_LINUX( 3006): gki_task_entry: gki_task_entry task_id=0 [BTU] starting
    E/uim-sysfs( 2170): uim: Inside st_uart_config
    E/uim-sysfs( 2170): uim:install set to 1
    E/uim-sysfs( 2170): uim: Inside set_baud_rate
    E/uim-sysfs( 2170): uim: set_baud_rate() done
    E/uim-sysfs( 2170): uim: Inside read_firmware_version
    E/uim-sysfs( 2170): uim: Inside read_hci_event
    E/uim-sysfs( 2170): uim: read_hci_event
    E/uim-sysfs( 2170): uim:Failed to read init response (READ_LOCAL_VERSION_INFORMATION)
    E/uim-sysfs( 2170): uim: Setting speed to 3000000
    E/uim-sysfs( 2170): uim: Inside read_command_complete
    E/uim-sysfs( 2170): uim: Command complete started
    E/uim-sysfs( 2170): uim: Inside read_hci_event
    E/uim-sysfs( 2170): uim: read_hci_event
    E/uim-sysfs( 2170): uim: Invalid response
    E/uim-sysfs( 2170): uim:cleanup
    E/        ( 3006):  Can't open hci_tty
    E/bt_userial( 3006): userial_open: wrong numbers of open fd in vendor lib [-1]!
    E/bt_userial( 3006): userial_open: HCI UART expects only one open fd
    I/        ( 3006): BTE_InitTraceLevels -- TRC_HCI
    I/        ( 3006): BTE_InitTraceLevels -- TRC_L2CAP
    I/        ( 3006): BTE_InitTraceLevels -- TRC_RFCOMM
    I/        ( 3006): BTE_InitTraceLevels -- TRC_AVDT
    I/        ( 3006): BTE_InitTraceLevels -- TRC_AVRC
    I/        ( 3006): BTE_InitTraceLevels -- TRC_A2D
    I/        ( 3006): BTE_InitTraceLevels -- TRC_BNEP
    I/        ( 3006): BTE_InitTraceLevels -- TRC_BTM
    I/        ( 3006): BTE_InitTraceLevels -- TRC_PAN
    I/        ( 3006): BTE_InitTraceLevels -- TRC_SDP
    I/        ( 3006): BTE_InitTraceLevels -- TRC_BTAPP
    I/        ( 3006): BTE_InitTraceLevels -- TRC_BTIF
    D/bt-btm  ( 3006): btm_acl_device_down
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    E/uim-sysfs( 2170): uim: Inside st_uart_config
    E/uim-sysfs( 2170): uim: Un-Installed N_TI_WL Line displine
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing
    D/bt-btm  ( 3006): btm_acl_reset_paging
    D/bt-btm  ( 3006): btm_acl_set_discing

    tell me if you get any more clue, my bt enable gpio is looks like working fine.

  • Hi Jags,

    From the it looks like it is a GPIO is not toggled properly. Make sure you are using the correct GPIO.

    Thanks & Regards,

    Sundeep.

  • Hi Sundeep,

    We are using WL1283 from TI. we are using Android 4.3, Where BT stack is bluedroid. Wl1283 uses TI-ST. But we are getting following errors when we are trying to enable Bluetooth.

    E/ ( 1407): Can't open hci_tty
    E/bt_userial( 1407): userial_open: wrong numbers of open fd in vendor lib [-1]!
    E/bt_userial( 1407): userial_open: HCI UART expects only one open fd

    Does it need ST_HCI config too apart from TI-ST?

    Regards,

    Indra

  • I/bluedroid( 1334): enable
    I/bt_hci_bdroid( 1334): init
    I/ ( 1334): vendor Init
    I/ ( 1334): vendor op - 5
    I/ ( 1334): vendor op - 0
    I/ ( 1334): vendor op - 0
    I/bt_hci_bdroid( 1334): bt_hc_worker_thread started
    I/GKI_LINUX( 1334): gki_task_entry: gki_task_entry task_id=0 [BTU] starting
    I/bt-btu ( 1334): btu_task pending for preload complete event
    I/ ( 1334): vendor op - 3
    E/ ( 1334): Can't open hci_tty
    E/bt_userial( 1334): userial_open: wrong numbers of open fd in vendor lib [-1]!
    E/bt_userial( 1334): userial_open: HCI UART expects only one open fd
    I/ ( 1334): vendor op - 4
    I/ ( 1334): vendor op - 1
    I/bt-btu ( 1334): btu_task received preload complete event
    I/ ( 1334): BTE_InitTraceLevels -- TRC_HCI
    I/ ( 1334): BTE_InitTraceLevels -- TRC_L2CAP
    I/ ( 1334): BTE_InitTraceLevels -- TRC_RFCOMM
    I/ ( 1334): BTE_InitTraceLevels -- TRC_AVDT
    I/ ( 1334): BTE_InitTraceLevels -- TRC_AVRC
    I/ ( 1334): BTE_InitTraceLevels -- TRC_A2D
    I/ ( 1334): BTE_InitTraceLevels -- TRC_BNEP
    I/ ( 1334): BTE_InitTraceLevels -- TRC_BTM
    I/ ( 1334): BTE_InitTraceLevels -- TRC_GAP
    I/ ( 1334): BTE_InitTraceLevels -- TRC_PAN
    I/ ( 1334): BTE_InitTraceLevels -- TRC_SDP
    I/ ( 1334): BTE_InitTraceLevels -- TRC_GATT
    I/ ( 1334): BTE_InitTraceLevels -- TRC_SMP
    I/ ( 1334): BTE_InitTraceLevels -- TRC_BTAPP
    I/ ( 1334): BTE_InitTraceLevels -- TRC_BTIF

  • Hi Jags,

    I am able to turn on Bluetooth. See if following steps are helpful.

    1. In defconfig added following entry

    #
    # Texas Instruments shared transport line discipline
    #
    CONFIG_TI_ST=y
    CONFIG_ST_HCI=y

    2. modified Kconfig and Makefile (/kernel/drivers/misc/ti-st) with tty_hci related entries.

    3. In ueventd.omap44xxtabletboard.rc defined hci_tty as follows

    Code:

    /dev/hci_tty              0666   bluetooth bluetooth

    Regards,

    Indra.

  • Hi siva,

    Thanks for your kind advice.
    I am using the same configuration like you. but still i am facing the same problem.
    can you attach here your board file if possible.

    With which processor you are using wl1283?

    Thanks and Regards,
    Jags Gediya

  • Hi Jags,

     

    As mentioned before if you have the below that means you have the correct software:

    In “platform/hardware/ti/” please clone the “wpan” which consists of  Libbt-vendor-ti (bluedroid_wilink) and UIM as well:

    http://git.omapzoom.org/?p=platform/hardware/ti/wpan.git;a=tree;h=refs/heads/d-jb-mr1-release;hb=refs/heads/d-jb-mr1-release

     HCI TTY driver (drivers/misc/ti-st) in your kerne:

    http://git.omapzoom.org/?p=kernel/omap.git;a=tree;hb=p-android-omap-3.4.

    Make sure that In you have the correct permission for all Bluetooth related things in you your “init.rc”

    once you have everything in place please clean build you kernel and then rebuild your file system after the kernel is built

     

    You can download the reference code from the below link

    http://downloads.ti.com/sitara_android/esd/TI_Android_DevKit/TI_Android_JB_4_2_2_DevKit_4_1_1/index_FDS.html

    Thanks & regards,

    Sundeep