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.

Wifi is working but Bluetooth is not working in WL1835 with iMX6SL processor

Other Parts Discussed in Thread: WL1835, TSC2007

hi all,

Please verify the Bluetooth connectivity schematic for iMX6SL processor with WL1835.  Pin Direction wise its connected correctly. For example

1)  "RTS"  signal is output direction for  WL1835. But in iMX6SL processor "RTS" pin is input direction. So i connected both RTS processor pin to RTS WL1835 pin.  

2)   "CTS"  signal is input direction for  WL1835. But in iMX6SL processor "RTS" pin is input direction. So i connected both RTS processor pin to RTS WL1835 pin.  

3) "TX" and "RX" signal has been swapped at both the ends.

Please confirm my connectivity is correct or not?

  • But In the iMX6SL (HOST) side RTS is not the direction of "output".
    and CTS is not the direction of "input". This direction pin (input and output) totally reversed in TI OMAP processor. Please refer the user manual which i have mentioned below link.



    www.freescale.com/.../prod_summary.jsp;tab=Documentation_Tab&pspll=1&SelectedAsset=Documentation&ProdMetaId=PID/DC/i.MX6SL&fromPSP=true&assetLockedForNavigation=true&componentId=2&leftNavCode=1&pageSize=25&Documentation=Documentation/00210KscRcb%60%60Application%20Notes&fpsp=1&linkline=Application%20Notes&site_preference=mobile


    Please click the above link and download "IMX6SLRM" reference manual document.. please check the page no 2929..


    Thanks,
    Sivakumar
  • Sorry for the trouble you couldn't able to click the previous link.  Anyway i made a screen shot i had mentioned above.

    This is the UART pin configuration for iMXSL processor. Please refer the RTS and CTS direction. Based on our processor 

    CTS signal is output and RTS signal is input. But direction totally reversed in some other processor like omap. 

    please tell me my approach is correct or not?

  • Siva,

    You are correct. On i.Mx6 the CTS and RTS lines are reversed compared to TI nomenclature. So you connect CTS to CTS and RTS to RTS.

    Iain

  • Hi lain,

    i need one more doubt in in this scheme.  according to the above attached images , yes already connection done,  " processor CTS  connected with bluetooths CTS"  and "RTS of processor connected with RTS of bluetooth. what about TX and RX  pins of processor for above configuration.? below i have mentioned in WL1835 PIN description block. Please compare both processor image description and wifi data sheet image pin description.  

    As per both image please send connectivity of Bluetooth circuit. 

    Thanks,

    Sivakumar

  • Hi lain,

    now i can see the "Found a Texas Instruments' chip!" in the hyperterminal. but after that i am getting "Initialization timed out." below i have mentioned the log file which i am getting in the hyper terminal.


    ÿ




    U-Boot 2014.10 (Feb 27 2015 - 17:55:20)




    CPU: Freescale i.MX6SL rev1.2 at 792 MHz


    Reset cause: POR


    Board: MX6SLEVK


    I2C: ready


    DRAM: 512 MiB


    padMux SCL = 0x20e016c data = 0x11


    padMux SDA = 0x20e018c data = 0x11


    pad contorl SCL = 0x20e0474 data = 0x1b8b1


    pad contol SDA = 0x20e0494 data = 0x1b8b1


    Sel input In SCL = 0x20e0728 data = 0x2


    Sel input iN SCL = 0x20e0724 data = 0x2


    ADD IADR = 0x21a4000 data = 0x0


    ADD IFDR = 0x21a4004 data = 0x14


    ADD I2CR = 0x21a4008 data = 0x80


    ADD I2SR = 0x21a400c data = 0x81


    ADD I2DR = 0x21a4010 data = 0x0


    PMIC pmic_get


    wait_for_sr_state: failed sr=81 cr=a0 state=2020


    i2c_init_transfer: failed for chip 0x18 retry=0


    wait_for_sr_state: failed sr=81 cr=a0 state=2020


    i2c_init_transfer: failed for chip 0x18 retry=1


    wait_for_sr_state: failed sr=81 cr=a0 state=2020


    i2c_init_transfer: failed for chip 0x18 retry=2


    i2c_init_transfer: give up i2c_regs=021a8000


    Can't find PMIC:PFUZE100






    Satya: PMIC found test print -1


    Satya: Reading the PMIC Data...





    Satya: PMIC Value at add generated 1.2V 0x6c = 0x18




    Satya: PMIC Value at add generated 1.5V 0x6d = 0x1e






    Satya: PMIC Value at add generated 1.8V 0x6e = 0x10




    Satya: PMIC Value at add generated 1.8V 0x6f = 0x10






    Satya: PMIC Value at add generated 2.5V 0x70 = 0x17




    Satya: PMIC Value at add generated 2.8V 0x71 = 0x1a




    MMC: FSL_SDHC: 0


    *** Warning - bad CRC, using default environment




    In: serial


    Out: serial


    Err: serial


    Net: Phy not found


    FEC [PRIME]


    Error: FEC address not set.




    Hit any key to stop autoboot: 3 2 1 0


    switch to partitions #0, OK


    mmc0 is current device


    switch to partitions #0, OK


    mmc0 is current device


    reading boot.scr


    ** Unable to read file boot.scr **


    reading zImage


    4823088 bytes read in 233 ms (19.7 MiB/s)


    Booting from mmc ...


    reading imx6sl-evk.dtb


    25980 bytes read in 18 ms (1.4 MiB/s)


    Kernel image @ 0x82000000 [ 0x000000 - 0x499830 ]


    ## Flattened Device Tree blob at 88000000


    Booting using the fdt blob at 0x88000000


    Using Device Tree in place at 88000000, end 8800957b




    Starting kernel ...




    Booting Linux on physical CPU 0x0
    Linux version 3.10.53 (root@vivek-To-be-filled-by-O-E-M) (gcc version 4.8.1 (GCC) ) #147 SMP PREEMPT Mon Mar 2 11:04:38 IST 2015
    CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
    CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    Machine: Freescale i.MX6 SoloLite (Device Tree), model: Freescale i.MX6 SoloLite EVK Board(PFUZE100)
    cma: CMA: reserved 320 MiB at 8c000000
    Memory policy: ECC disabled, Data cache writealloc
    PERCPU: Embedded 8 pages/cpu @80cec000 s8960 r8192 d15616 u32768
    Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
    Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk0p2 rootwait rw
    PID hash table entries: 2048 (order: 1, 8192 bytes)
    Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    Memory: 512MB = 512MB total
    Memory: 182260k/182260k available, 342028k reserved, 0K highmem
    Virtual kernel memory layout:
    vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
    vmalloc : 0xa0800000 - 0xff000000 (1512 MB)
    lowmem : 0x80000000 - 0xa0000000 ( 512 MB)
    pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
    modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
    .text : 0x80008000 - 0x807db8dc (8015 kB)
    .init : 0x807dc000 - 0x80826300 ( 297 kB)
    .data : 0x80828000 - 0x80875320 ( 309 kB)
    .bss : 0x80875320 - 0x808dd55c ( 417 kB)
    SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    Preemptible hierarchical RCU implementation.
    RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
    NR_IRQS:16 nr_irqs:16 16
    L310 cache controller enabled
    l2x0: 16 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x32030000, Cache size: 262144 B
    sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
    Console: colour dummy device 80x30
    Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    Setting up static identity map for 0x805ce878 - 0x805ce8d0
    Brought up 1 CPUs
    SMP: Total of 1 processors activated (1581.05 BogoMIPS).
    CPU: All CPU(s) started in SVC mode.
    devtmpfs: initialized
    pinctrl core: initialized pinctrl subsystem
    regulator-dummy: no parameters
    NET: Registered protocol family 16
    DMA: preallocated 256 KiB pool for atomic coherent allocations
    Use WDOG1 as reset source
    syscon 20c8000.anatop: regmap [mem 0x020c8000-0x020c8fff] registered
    vdd1p1: 800 <--> 1375 mV at 1125 mV
    vdd3p0: 2800 <--> 3150 mV at 3000 mV
    vdd2p5: 2100 <--> 2850 mV at 2525 mV
    cpu: 725 <--> 1450 mV at 1100 mV
    vddpu: 725 <--> 1450 mV at 1100 mV
    vddsoc: 725 <--> 1450 mV at 1175 mV
    syscon 20e0000.iomuxc-gpr: regmap [mem 0x020e0000-0x020e0037] registered
    syscon 21bc000.ocotp-ctrl: regmap [mem 0x021bc000-0x021bffff] registered
    hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
    hw-breakpoint: maximum watchpoint size is 4 bytes.
    imx6sl-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
    bio: create slab <bio-0> at 0
    lcd-3v3: no parameters
    wm8962-supply-3v15: 3150 mV
    wm8962-supply-4v2: 4325 mV
    wm8962-supply-1v8: 1800 mV
    ov5642-supply-2v8: 2800 mV
    ov5642-supply-1v8: 1800 mV
    ov5642-supply-1v5: 1500 mV
    wlan-en-regulator: 1800 mV
    reg-fixed-voltage regulator.21: Fixed regulator specified with variable voltages
    reg-fixed-voltage: probe of regulator.21 failed with error -22
    i2c-core: driver [max17135] using legacy suspend method
    i2c-core: driver [max17135] using legacy resume method
    SCSI subsystem initialized
    i2c i2c-0: IMX I2C adapter registered
    i2c i2c-1: IMX I2C adapter registered
    media: Linux media interface: v0.10
    Linux video capture interface: v2.00
    pps_core: LinuxPPS API ver. 1 registered
    pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    PTP clock support registered
    MIPI CSI2 driver module loaded
    ads129x: Driver-Driver Init


    ads129x: mutex init


    ads129x: sem init


    ads129x: Init succesfull


    ads129x: 0, 0 ret


    Advanced Linux Sound Architecture Driver Initialized.
    Bluetooth: Core ver 2.16
    NET: Registered protocol family 31
    Bluetooth: HCI device and connection manager initialized
    Bluetooth: HCI socket layer initialized
    Bluetooth: L2CAP socket layer initialized
    Bluetooth: SCO socket layer initialized
    pureg-dummy: no parameters
    Switching to clocksource mxc_timer1
    NET: Registered protocol family 2
    TCP established hash table entries: 4096 (order: 3, 32768 bytes)
    TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
    TCP: Hash tables configured (established 4096 bind 4096)
    TCP: reno registered
    UDP hash table entries: 256 (order: 1, 8192 bytes)
    UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
    NET: Registered protocol family 1
    RPC: Registered named UNIX socket transport module.
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
    imx6_busfreq busfreq.2: busfreq_probe: failed to get pll3_usb_otg
    imx6_busfreq: probe of busfreq.2 failed with error -2
    Bus freq driver module loaded
    futex hash table entries: 256 (order: 2, 16384 bytes)
    VFS: Disk quotas dquot_6.5.2
    Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    NFS: Registering the id_resolver key type
    Key type id_resolver registered
    Key type id_legacy registered
    jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
    fuse init (API version 7.22)
    msgmni has been set to 995
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    MIPI DSI driver module loaded
    ILI9163 driver init


    imx-sdma 20ec000.sdma: loaded firmware 1.1
    imx-sdma 20ec000.sdma: initialized
    pfuze100-regulator 0-0008: unrecognized pfuze chip ID!
    pfuze100-regulator: probe of 0-0008 failed with error -5
    Serial: IMX driver
    imx:uart RTS failed


    2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 58) is a IMX
    console [ttymxc0] enabled
    imx:uart has RTS/CTS


    2038000.serial: ttymxc3 at MMIO 0x2038000 (irq = 61) is a IMX
    serial: Freescale lpuart driver
    imx sema4 driver is registered.
    [drm] Initialized drm 1.1.0 20060810
    brd: module loaded
    loop: module loaded
    kim:/dev/ttymxc3


    kim:1


    kim:0


    kim:115200


    Kim: requested shutdown gpio succesfully


    (stk) :sysfs entries created
    debugfs entries created ads129x: ads129x_probe
    ads129x spi32766.0: No reset-gpios gpio
    IRQ: 238
    ads129x:ADS Chip registered, 1 chips total.
    spi_imx 2008000.ecspi: probed
    ili9163: LCD probe function called


    ili9163: Request CTS


    ili9163: Request Shutdown


    ili9163: pmw ON
    ili9163: vmem ON
    Console: switching to colour frame buffer device 16x20
    ili9163: registerFB done
    ili9163: spi_set_drv_data
    fb0: ili9163fb frame buffer device,
    using 40960 KiB of video memory
    spi_imx 200c000.ecspi: probed
    CAN device driver interface
    mousedev: PS/2 mouse device common for all mice
    input: TSC2007 Touchscreen as /devices/virtual/input/input0
    snvs_rtc 20cc034.snvs-rtc-lp: rtc core: registered 20cc034.snvs-rtc-lp as rtc0
    i2c /dev entries driver
    i2c-core: driver [mag3110] using legacy suspend method
    i2c-core: driver [mag3110] using legacy resume method
    imx2-wdt 20bc000.wdog: IMX2+ Watchdog Timer enabled. timeout=60s (nowayout=0)
    Bluetooth: HCI UART driver ver 2.2
    Bluetooth: HCI H4 protocol initialized
    Bluetooth: HCI BCSP protocol initialized
    Bluetooth: HCILL protocol initialized
    Bluetooth: Generic Bluetooth SDIO driver ver 0.1
    hdev 8602d000
    HCI device registered (hdev 8602d000)
    cpuidle: using governor ladder
    cpuidle: using governor menu
    hci0 8602d000
    (stc): chnl_id list empty :4
    (stk) : st_kim_startuse device tree datakim: Bluetooth GPIO start


    sdhci: Secure Digital Host Controller Interface driver
    sdhci: Copyright(c) Pierre Ossman
    sdhci-pltfm: SDHCI platform and OF driver helper
    mmc0: no vqmmc regulator found
    mmc0: no vmmc regulator found
    mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using DMA
    sdhci-esdhc-imx 2198000.usdhc: could not get ultra high speed state, work on normal mode
    mmc1: no vqmmc regulator found
    mmc0: new high speed SDHC card at address 59b4
    mmcblk0: mmc0:59b4 USD 3.74 GiB
    mmcblk0: p1 p2
    (stk) :ldisc_install = 1mmc1: SDHCI controller on 2198000.usdhc [2198000.usdhc] using DMA
    [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
    mmc1: card claims to support voltages below the defined range. These will be ignored.
    [drm] No driver support for vblank timestamp query.
    [drm] Initialized imx-drm 1.0.0 20120507 on minor 0
    mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
    mmc1: new high speed SDIO card at address 0001
    wm8962 1-001a: customer id 0 revision F
    input: WM8962 Beep Generator as /devices/soc0/soc.1/2100000.aips-bus/21a8000.i2c/i2c-1/1-001a/input/input1
    imx-wm8962 sound.24: wm8962 <-> 202c000.ssi mapping ok
    NET: Registered protocol family 26
    TCP: cubic registered
    NET: Registered protocol family 10
    sit: IPv6 over IPv4 tunneling driver
    NET: Registered protocol family 17
    can: controller area network core (rev 20120528 abi 9)
    NET: Registered protocol family 29
    can: raw protocol (rev 20120528)
    can: broadcast manager protocol (rev 20120528 t)
    can: netlink gateway (rev 20130117) max_hops=1


    Bluetooth: RFCOMM TTY layer initialized
    Bluetooth: RFCOMM socket layer initialized
    Bluetooth: RFCOMM ver 1.11
    Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    Bluetooth: BNEP filters: protocol multicast
    Bluetooth: BNEP socket layer initialized
    Bluetooth: HIDP (Human Interface Emulation) ver 1.2
    Bluetooth: HIDP socket layer initialized
    8021q: 802.1Q VLAN Support v1.8
    Key type dns_resolver registered
    VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
    imx6-cpufreq imx6-cpufreq.0: failed to get regulators
    imx6-cpufreq: probe of imx6-cpufreq.0 failed with error -2
    ov5642-supply-1v5: disabling
    ov5642-supply-1v8: disabling
    ov5642-supply-2v8: disabling
    wm8962-supply-1v8: disabling
    wm8962-supply-4v2: disabling
    wm8962-supply-3v15: disabling
    lcd-3v3: disabling
    vddpu: disabling
    regulator-dummy: disabling
    imx mcc test is registered.
    snvs_rtc 20cc034.snvs-rtc-lp: setting system clock to 1970-01-01 00:00:00 UTC (0)
    ALSA device list:
    #0: wm8962-audio
    kjournald starting. Commit interval 5 seconds
    EXT3-fs (mmcblk0p2): using internal journal
    EXT3-fs (mmcblk0p2): recovery complete
    EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
    VFS: Mounted root (ext3 filesystem) on device 179:2.
    devtmpfs: mounted
    Freeing unused kernel memory: 296K (807dc000 - 80826000)


    INIT: (stk) :ldisc installation timeoutuse device tree data
    (stk) :ldisc_install = 0version 2.88 booting




    (stk) : timed out waiting for ldisc to be un-installedkim: Bluetooth GPIO start


    (stk) :ldisc_install = 1Starting udev
    udevd[120]: starting version 182
    (stk) :ldisc installation timeoutuse device tree data
    (stk) :ldisc_install = 0Loading modules backported from Linux version R8.5-0-gcb51164
    Backport generated by backports.git R8.4-0-g0d46f43
    bootlogd: cannot allocate pseudo tty: No such file or directory
    ov5640_read_reg:write reg error:reg=300a
    camera ov5640 is not found
    (stk) : timed out waiting for ldisc to be un-installedkim: Bluetooth GPIO start


    (stk) :ldisc_install = 1csi_v4l_open: Internal error, camera is not found!
    cfg80211: Calling CRDA to update world regulatory domain
    cfg80211: World regulatory domain updated:


    cfg80211: DFS Master region: unsetcfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
    wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
    wlcore: WARNING falling back to default config
    cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
    cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
    cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
    (stk) :ldisc installation timeoutuse device tree data
    (stk) :ldisc_install = 0cfg80211: (5170000 KHz - 5250000 KHz @ 160000 KHz), (N/A, 2000 mBm), (N/A)
    cfg80211: (5250000 KHz - 5330000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
    cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
    cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
    cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
    wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
    wlcore: loaded
    wlcore: driver version: R8.5
    wlcore: compilation time: Mon Mar 2 05:40:54 2015
    FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    ALSA: Restoring mixer settings...
    Fri Feb 20 11:27:36 UTC 2015


    INIT: Entering runlevel: 5


    Configuring network interfaces... ifconfig: SIOCGIFFLAGS: No such device
    Starting Xserver
    (stk) : timed out waiting for ldisc to be un-installedkim: Bluetooth GPIO start


    (stk) :ldisc_install = 1Starting system message bus: Unknown username "xuser" in message bus configuration file
    Unknown username "avahi" in message bus configuration file
    dbus.
    Starting Connection Manager


    (stk) :ldisc installation timeoutuse device tree data(stk) :ldisc_install = 0Starting Dropbear SSH server: dropbear.
    (stk) : timed out waiting for ldisc to be un-installedkim: Bluetooth GPIO start


    (stk) :ldisc_install = 1Starting rpcbind daemon...done.
    rpcbind: cannot get uid of 'rpc': Success


    Starting advanced power management daemon: No APM support in kernel
    (failed.)
    Starting syslogd/klogd: done
    * Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon


    (stk) :ldisc installation timeoutuse device tree data
    (stk) :ldisc_install = 0(stk) : timed out waiting for ldisc to be un-installedkim: Bluetooth GPIO start


    (stk) :ldisc_install = 1
    (stk) :ldisc installation timeoutuse device tree data
    (stk) :ldisc_install = 0(stk) : timed out waiting for ldisc to be un-installed
    Bluetooth: st_register failed -22
    Timeout reached while wating for return value
    Could not receive return value from daemon process.
    ...fail!
    Starting Telephony daemon
    Starting Linux NFC daemon
    /etc/rc5.d/S64neard: line 26: /usr/lib/neard/neard: No such file or directory
    Running local boot scripts (/etc/rc.local)Successfully initialized wpa_supplicant
    Line 61: unknown global field 'p2p_go_ht40=1'.
    Line 61: Invalid configuration line 'p2p_go_ht40=1'.
    Line 63: unknown global field 'concurrent_sched_scan=1'.
    Line 63: Invalid configuration line 'concurrent_sched_scan=1'.
    Line 64: unknown global field 'p2p_disabled=1'.
    Line 64: Invalid configuration line 'p2p_disabled=1'.
    Failed to read or parse configuration '/etc/wpa_supplicant.conf'.
    wlcore: PHY firmware version: Rev 8.2.0.0.224
    wlcore: firmware booted (Rev 8.9.0.0.31)
    IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    .




    Poky (Yocto Project Reference Distro) 1.7 imx6slevk /dev/ttymxc0






    imx6slevk login: root
    root@imx6slevk:~# hciattach -t 30 -s 115200 /dev/ttymxc3 texas 115200 flow
    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/TIInit_11.8.32.bts
    Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1
    Initialization timed out.
    root@imx6slevk:~#


    Thanks,
    Sivakumar
  • I think that is a symptom of no flow control on the UART. Put a scope on the RTS and CTS lines to see if they are being driven as you would expect.
  • Hi lain,

    below i have attached the Logic Analyzer capture files for all the lines such as TX,RX,CTS,RTS.

    If you have any suggestion please let me know.  Still we are facing the problem in Bluetooth communication.

    Thanks,

    Sivakumar 

  • On the assumption that this is all the UART traffic you see then this is the HCI command to read local version and the response which is what identifies the chip type.
    On identifying the TI device it will try and download the .bts file. Normally this file will ask for a switch to 3Mbaud to speed up download.
    So you may be asking for a baud rate mismatch with your command line.

    I use (on a beaglebone so /dev/ttyO4)
    hciattach ttyO4 texas 3000000 &

    Iain
  • Dear lain,

    We wanted to check if the issue is with Freescale UART or the firmware getting loaded into Wl18XX for BT module.

    Hence we connected the port which we used for TI-BT communication with PC serial port and we are able to Tx and Rx between Freescale imx6 and PC. We also connected LA and Scope
    and are able to confirm that the baud rate is indeed at 3Mbbps.

    When we interface it with TI WL18XX then the command sequence is,

    echo 28 >/sys/class/gpio/export
    echo low >/sys/class/gpio/gpio28/direction
    sleep 1
    echo high >/sys/class/gpio/gpio28/direction

    hciattach -t 30 -s 115200 /dev/ttymxc3 texas 3000000 flow

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

    When we probe using Scope (LA did not have the depth) what we could see is that TI replies and then freezes. Freescale does multiple retry @3Mbbps before giving timeout.

    Any idea on what could be probable cause since Tx,Rx,RTS,CTS and baud rates are fine and the OS is able to read the TI IC.

    Thanks & Regards,
    Siva.
  • Hi,

    We have the same problem with the WL18xx as you Siva. We are on an imx6sl and we are using the uart4 too.

    Our command sequence is,

    echo 53 >/sys/class/gpio/export
    echo low >/sys/class/gpio/gpio28/direction
    sleep 1
    echo high >/sys/class/gpio/gpio28/direction

    hciattach -t 30 -s 115200 /dev/ttymxc3 texas 3000000 flow

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

    And sometimes we have :

    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/TIInit_11.8.32.bts
    Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1
    TI init command failed.
    Can't initialize device: Input/output error

    Siva, did you make it worked ?


    Thanks.

  • Hi Alexis Guillemet,

    In our board both Bluetooth and wifi is working fine with sololite processor.

    1) Check your schematic of CTS and RTS connection between processor and TI BT module as i posted in the same chain.

    2) Make sure that your DTSI file for all pins configured properly or not.

    3) Which driver version are you using for TI chip?

    Thanks,

    Sivakumar

  • Hi Siva,

    Thanks for the answer.
    On our board the wifi is working fine too.

    1) Our schematic is as follow:

    CTS Host -> CTS WL18
    RTS Host -> RTS WL18
    Rx Host -> Tx WL18
    Tx Host -> Rx WL18

    2) In our DTSi we configured the uart4 with fsl,uart-has-rtscts and pins as follow:

    pinctrl_uart4_bt: uart4grp-bt {
                fsl,pins = <
                    MX6QDL_PAD_CSI0_DAT17__UART4_CTS_B        0x1b0b1
                    MX6QDL_PAD_CSI0_DAT16__UART4_RTS_B        0x1b0b1
                    MX6QDL_PAD_CSI0_DAT13__UART4_RX_DATA    0x1b0b1
                    MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA    0x1b0b1

                    /* BT_EN */
                    MX6QDL_PAD_EIM_A17__GPIO2_IO21        0x80000000
                >;
            };

    3) For now all we have done was to add the following config in our kernel :

    CONFIG_BT=y
    CONFIG_BT_HCIUART=y
    CONFIG_BT_HCIUART_H4=y
    CONFIG_BT_HCIUART_LL=y

    We also tried differents TIInit_11.8.32.bts from git.ti.com/ti-bt/service-packs/trees/master, from github.com/TI-ECS/bt-firmware.git and from git.ti.com/wilink8-bt/ti-bt-firmware/trees/master but we have it has the same result.

    For now that's all we have done so I suppose we don't use a particular driver for the TI chip as you mentioned.

    1) Which driver are you talking about ?

    2) For the bluetooth do we have to do a similar build as for the WIFI ( git://git.ti.com/wilink8-wlan/build-utilites.git ) ?
    If it's the case, is it from this git repo, git://git.ti.com/ti-bt/build-utils.git ?


    Thanks.

  • Alexis,
    For your build question the script at git://git.ti.com/wilink8-wlan/build-utilites.git now also adds the BTh firmware download step and also UIM if you are using KIM/UIM to abstract the UART

    How far does your current setup get? Do you:
    - get BT_EN driven high
    - get activity on the UART to read the device type and deduce it is a TI device (assuming you use hciattach)
    - get activity on UART to download the firmware

    Iain
  • All kernel patches to get Wifi and bluetooth running on imx are applied by following processors.wiki.ti.com/.../WL18xx_First_Time_Getting_Started_Guide_%28IMX6SL%29
  • Hi Iain,

    Thanks for the information.

    As I said in a previous post we managed to deduce that this is a TI device but after we get :
    "texas: changing baud rate to 3000000, flow control to 1"
    nothing append and we get a timeout.

    We don't use KIM/UIM so we do the following to setup the device:
    echo 53 >/sys/class/gpio/export
    echo low >/sys/class/gpio/gpio28/direction
    sleep 1
    echo high >/sys/class/gpio/gpio28/direction

    hciattach -t 30 -s 115200 /dev/ttymxc3 texas 3000000 flow

    then we have :
    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/TIInit_11.8.32.bts
    Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1
    Initialization timed out.
  • Just to test we tried to compile a new image with only what we need to use the bluetooth and without what we need to use the wifi. We also took a new wl18xx module and the bluetooth setup could be completed:

    hciattach -t 30 -s 115200 /dev/ttymxc1 texas 3000000 flow hciconfig
    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/TIInit_11.8.32.bts
    Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1
    Device setup complete

    This result was so weird that we made a second image with all we need to use bluetooth and wifi and we have done the same thing but this time:
    hciattach -t 30 -s 115200 /dev/ttymxc1 texas 3000000 flow hciconfig
    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/TIInit_11.8.32.bts
    Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1
    Initialization timed out.

    And once we have this case where we boot with both bluetooth and wifi enabled, even if we recompile an image with only the bluetooth enabled we don't have the "Device setup complete" again. However the wifi works well.

    Could the loading of the WIFI drivers have corrupt something in the bluetooth part of the wl1835 ?

    Is there a way of resetting the module ?

    Should we try to recompile all drivers from the last version of git://git.ti.com/wilink8-wlan/build-utilites.git ?
    We use a Kernel 3.17.

    To build wilink8 related artifacts with an older version of git.ti.com/wilink8-wlan/build-utilites.git we had to modify some branch in the configuration.sh :

    driver
    git://git.ti.com/wilink8-wlan/wl18xx.git
    replace ap_p2p by upstream_318_all

    backports
    git://git.ti.com/wilink8-wlan/backports.git
    replace ap_dfs_mbss_all by upstream_318

    With those changes wifi is working but is it the right thing to do ? Are they the right branches for our kernel ?

  • Hi Alexis,
    All I can say is that we have tested it on official imx release 3.10.53 so the patches we have are for that version. On the TI Sitara processors we run on 3.14 but with UIM/KIM.

    I'm assuming you have flow control enabled on uart4 in the device tree file

    &uart4 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_uart4_1>;
    status = "okay";
    fsl,uart-has-rtscts; // enable rts/cts usage on uart4
    };

    The only other thing that comes to mind is that a while ago we had a problem IF wifi was running when bluetooth was started. This was due to CTS on processor having a pull up that conflicted with WL183x RTS on power up (BT_EN going high). On i.Mx this would be the RTS pin on the processor and it should have pull disabled.
    Iain
  • Hi Alexis,

    As you are on quite a recent kernel I thought I'd share something I'd seen. Someone was porting K4.1rc3 to imx6 and discovered that the bluetooth wasn't working as the imx uart driver had a dma bug.

     "imx.c uart driver issue in mainline (dma mode for imx6q is corrupting data) so set my .dts for working with uart dma disabled" 

    Can you check this on your K3.17?

    Iain

  • Hi Iain,

    I will check this but I doubt it comes from that because after what I could see until now this bug could be reproduce with an imx6q and a K3.10.17.

    If I take a new wl1835 which hasn't been connected with any board and that I create an image with only what we need to make the bluetooth worked, bluetooth works perfectly. But if I boot once with the wifi driver generated with your script, bluetooth doesn't work anymore and we can't load the firmware anymore and I can't comming back unless I try with a new wl18.

    That's why I guess there is some sort of corruption that happened in the wl18 when the kernel detects the wifi module and loads his modules. I really don"t know how but maybe...

    1) Is it possible to reset completly this component ?

    And I suspect it's what it 's happening too with my current board (imx6sl k3.17).

    Alexis.

  • Hi lain,

    After I disabled dma I could successfully setup the bluetooth module and do a scan without problem so It seems that was the problem.

    To be sure that solved the problem I wanted to rebuild an Image with both bluetooth and wifi enabled. As my kernel configs changed a lot for my tests I had to rebuild the wifi driver with your script build_wl18xx.sh. However during the build I get the following error that I hadn't until now :

    Building backport-include/backport/autoconf.h ... done.

    ERROR: Kernel configuration is invalid.
    include/generated/autoconf.h or include/config/auto.conf are missing.
    Run 'make oldconfig && make prepare' on kernel src to fix it.


    WARNING: Symbol version dump ./Module.symvers
    is missing; modules will have no dependencies and modversions.

    /--------------
    | You shouldn't run make in the backports tree, but only in
    | the generated output. This here is only the skeleton code
    | copied into the output directory. To use the backport system
    | from scratch, go into the top-level directory and run
    | ./gentree.py /path/to/linux-next/ /tmp/output
    | and then make menuconfig/... in the output directory. See
    | ./gentree.py --help
    | for more options.
    \--
    Building modules, stage 2.
    ./scripts/Makefile.modpost:42: include/config/auto.conf: Aucun fichier ou dossier de ce type
    /--------------
    | You shouldn't run make in the backports tree, but only in
    | the generated output. This here is only the skeleton code
    | copied into the output directory. To use the backport system
    | from scratch, go into the top-level directory and run
    | ./gentree.py /path/to/linux-next/ /tmp/output
    | and then make menuconfig/... in the output directory. See
    | ./gentree.py --help
    | for more options.
    \--
    make[5]: *** [include/config/auto.conf] Erreur 1
    make[4]: *** [modules] Erreur 2
    make[3]: *** [modules] Erreur 2
    make[2]: *** [modules] Erreur 2
    make[1]: *** [modules] Erreur 2
    make: *** [default] Erreur 2
    ****** ERROR 0 *******

    Do you know where is it coming from ?

    Thanks.
    Alexis.
  • I think this is problem

    ERROR: Kernel configuration is invalid.
    include/generated/autoconf.h or include/config/auto.conf are missing.
    Run 'make oldconfig && make prepare' on kernel src to fix it.

    looks like your kernel needs to be rebuilt to get these compile time files before you run the build_wl18xx.sh
    Iain
  • Thanks lain, disabled dma of the UART solved our problem.

    Now we can use both bluetooth and wifi at the same time without problem.

    Alexis.
  • Alexis,

    I'm having a similar problem to yours - would you mind letting me know how you disabled the DMA on the uart? Devicetree or Driver?
  • Hi Daniel,

    I just changed my devicetree as follow:

    uart4: serial@021f0000 {
                    compatible = "fsl,imx6q-uart", "fsl,imx21-uart" --------------------> compatible = "fsl,imx6sl-uart", "fsl,imx21-uart";
                    reg = <0x021f0000 0x4000>;
                    interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>;
                    clocks = <&clks IMX6QDL_CLK_UART_IPG>,
                         <&clks IMX6QDL_CLK_UART_SERIAL>;
                    clock-names = "ipg", "per";
                    dmas = <&sdma 31 4 0>, <&sdma 32 4 0>;-----------------------> //dmas = <&sdma 31 4 0>, <&sdma 32 4 0>;
                   dma-names = "rx", "tx"; --------------------------------------------------> //dma-names = "rx", "tx";
                    status = "disabled";
     };

  • same error with you , st_register failed -22 , do you had solve it ? thanks !
  • Davil,
    Please start a new thread with this question. This one dealt with hw connections and in their case a kernel bug in imx which was fixed by a device tree workaround.
    Iain