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 wl1271 issue:

Other Parts Discussed in Thread: WL1271, DM3730, WL1835

Hi All,


HW: DM3730 with wl1271 module.
SW:  Linuix-3.9.6 kernel
I have a combo (wifi+bluetooth) module on my dm3730 board.

Wifi is working without much issues. But my bluetooth is not working. After running through my setup and code base I understood btwilink is built as module and I need this module to work with bluetooth. So I did modprobe btwilink.ko and KO got fit into kernel.

But same time I get following errors when I do modprobe or insmod for btwilink.ko

Please find the error logs below:

root@arm:~# insmod /lib/modules/3.9.6-x3/kernel/drivers/bluetooth/btwilink.ko
root@arm:~# (stk) :ldisc installation timeout(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc installation timeout(stk) : timed out waiting
for ldisc to be un-installed(stk) :ldisc installation timeout(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc installation timeout(stk) : ti
med out waiting for ldisc to be un-installed(stk) :ldisc installation timeout(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc installation t
imeout(stk) : timed out waiting for ldisc to be un-installedBluetooth: st_register failed -22

starting Linux...............
3348478 bytes read in 210 ms (15.2 MiB/s)
__ex_table already sorted, skipping sort
allocated 524288 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Memory: 254MB = 254MB total
Memory: 223212k/223212k available, 38932k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
    lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0bc85f0   (12034 kB)
      .init : 0xc0bc9000 - 0xc0c3c600   ( 462 kB)
      .data : 0xc0c3e000 - 0xc0d1e7f8   ( 898 kB)
       .bss : 0xc0d1e7f8 - 0xc0e0a524   ( 944 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
        RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
NR_IRQS:16 nr_irqs:16 16
IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
Total of 96 interrupts on 1 active controller
Clocking rate (Crystal/Core/MPU): 26.0/400/600 MHz
OMAP clockevent source: GPTIMER12 at 32768 Hz
sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
OMAP clocksource: 32k_counter at 32768 Hz
Console: colour dummy device 80x30
Calibrating delay loop... 329.31 BogoMIPS (lpj=1646592)
pid_max: default: 32768 minimum: 301
Security Framework initialized
AppArmor: AppArmor initialized
Mount-cache hash table entries: 512
kmemleak: Trying to color unknown object at 0xce01db80 as Grey
Initializing cgroup subsys cpuacct
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys blkio
Initializing cgroup subsys perf_event
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket -1, mpidr 0
Setting up static identity map for 0xc0778d00 - 0xc0778d58
Brought up 1 CPUs
SMP: Total of 1 processors activated (329.31 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
xor: measuring software checksum speed
   arm4regs  :   620.000 MB/sec
   8regs     :   458.400 MB/sec
   32regs    :   554.000 MB/sec
xor: using function: arm4regs (620.000 MB/sec)
pinctrl core: initialized pinctrl subsystem
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
omap-gpmc omap-gpmc: GPMC revision 5.0
OMAP GPIO hardware version 2.5
omap_mux_init: Add partition: #1: core, flags: 4
OMAP3 Beagle Rev: MyRev
Beagle expansion: wl12xx: setting up gpio pinmux
Beagle MMC_WIFI calling hsmmc_init
omap_mux_get_by_name: Could not find signal uart4_rx.uart4_rx
Reprogramming SDRC clock to 400000000 Hz
Beagle expansionboard: initializing wl12xx platform
wl12xx: 26Mhz reference clock (TiWi5)
Beagle expansionboard: registering wl12xx bt platform device
Beagle expansionboard: registering wl12xx wifi platform device
_omap_mux_get_by_name: Multiple signal paths (2) for sys_drm_msecure
omap_mux_get_by_name: Could not find signal sys_drm_msecure
hw-breakpoint: debug architecture 0x4 unsupported.
Could not look up dss_hdmi hw_mod
Could not look up dmic hw_mod
Could not look up mcpdm hw_mod
 omap-mcbsp.2: alias fck already exists
 omap-mcbsp.3: alias fck already exists
OMAP DMA hardware revision 5.0
 arm-pmu: alias fck already exists
bio: create slab <bio-0> at 0
edma-dma-engine edma-dma-engine.0: Can't allocate PaRAM dummy slot
edma-dma-engine: probe of edma-dma-engine.0 failed with error -5
omap-dma-engine omap-dma-engine: OMAP DMA engine driver
vwl1271: 1800 mV 
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
twl4030_power_init
twl4030 use_poweroff call = 1
registering twl4030_power_off
twl 1-0048: PIH (irq 23) chaining IRQs 338..346
twl 1-0048: power (irq 343) chaining IRQs 346..353
twl4030_gpio twl4030_gpio: gpio (irq 338) chaining IRQs 354..371
Beagle enable of wifi mmc
VUSB1V5: 1500 mV normal standby
VUSB1V8: 1800 mV normal standby
VUSB3V1: 3100 mV normal standby
twl4030_usb twl4030_usb: Initialized TWL4030 USB module
vdd_mpu_iva: 600 <--> 1450 mV normal 
vdd_core: 600 <--> 1450 mV normal 
VMMC1: 1850 <--> 3150 mV at 3150 mV normal standby
VDAC: 1800 mV normal standby
VDVI: 1800 mV normal standby
VSIM: 1800 <--> 3000 mV at 1800 mV normal standby
VAUX3: 1800 mV normal standby
VAUX4: 1800 <--> 2800 mV at 2800 mV normal standby
VAUX4: Voltage range but no REGULATOR_CHANGE_VOLTAGE
omap_i2c omap_i2c.1: bus 1 rev4.4 at 2600 kHz
omap_i2c omap_i2c.2: bus 2 rev4.4 at 100 kHz
omap_i2c omap_i2c.3: bus 3 rev4.4 at 100 kHz
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
omap-iommu omap-iommu.0: mmu_isp registered
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
NetLabel: Initializing
NetLabel:  domain hash size = 128
NetLabel:  protocols = UNLABELED CIPSOv4
NetLabel:  unlabeled traffic allowed by default
nfc: nfc_init: NFC Core ver 0.1
NET: Registered protocol family 39
Switching to clocksource 32k_counter
AppArmor: AppArmor Filesystem Enabled
NET: Registered protocol family 2
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
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.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 3268K
CPU PMU: probing PMU on CPU 0
hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5 counters available
audit: initializing netlink socket (disabled)
type=2000 audit(1.620:1): initialized
VFS: Disk quotas dquot_6.5.2
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
fuse init (API version 7.21)
Btrfs loaded
msgmni has been set to 474
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
OMAP DSS rev 2.0
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 88) is a OMAP UART0
omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 89) is a OMAP UART1
omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 90) is a OMAP UART2
console [ttyO2] enabled
omap_uart.3: ttyO3 at MMIO 0x49042000 (irq = 96) is a OMAP UART3
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
twl4030_madc twl4030_madc: clk disabled, enabling
Trying ONFI probe in 16 bits mode, aborting !
No NAND device found
No NAND device found
OneNAND driver initializing
omap-dma-engine omap-dma-engine: allocating channel for 71
omap-dma-engine omap-dma-engine: allocating channel for 70
usbcore: registered new interface driver ax88179_178a
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver rndis_host
usbcore: registered new interface driver cdc_ncm
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-omap.0 supply hsusb1 not found, using dummy regulator
ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
ehci-omap ehci-omap.0: irq 93, io mem 0x48064800
ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: OMAP-EHCI Host Controller
usb usb1: Manufacturer: Linux 3.9.6-x3 ehci_hcd
usb usb1: SerialNumber: ehci-omap.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
 gadget: using random self ethernet address
 gadget: using random host ethernet address
usb0: MAC fe:ea:e2:9f:ed:68
usb0: HOST MAC de:8f:7f:ff:ef:b2
 gadget: Ethernet Gadget, version: Memorial Day 2008
 gadget: g_ether ready
musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 2
usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: MUSB HDRC host driver
usb usb2: Manufacturer: Linux 3.9.6-x3 musb-hcd
usb usb2: SerialNumber: musb-hdrc.0.auto
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
mousedev: PS/2 mouse device common for all mice
input: twl4030_pwrbutton as /devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_pwrbutton/input/input0
input: twl4030:vibrator as /devices/platform/omap_i2c.1/i2c-1/1-0049/twl4030-audio/input/input1
vibra disabling led output
twl_rtc twl_rtc: Power up reset detected.
twl_rtc twl_rtc: Enabling TWL-RTC
twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0
i2c /dev entries driver
lirc_dev: IR Remote Control driver registered, major 244 
smssdio: Siano SMS1xxx SDIO driver
smssdio: Copyright Pierre Ossman
Driver for 1-wire Dallas network protocol.
omap_wdt: OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
device-mapper: ioctl: 4.24.0-ioctl (2013-01-15) initialised: dm-devel@redhat.com
Bluetooth: HCI UART driver ver 2.2
Bluetooth: HCI H4 protocol initialized
Bluetooth: HCILL protocol initialized
Bluetooth: HCI Three-wire UART (H5) protocol initialized
voltdm_scale: No voltage scale API registered for vdd_mpu_iva
cpu cpu0: omap_target: unable to scale voltage up.
voltdm_scale: No voltage scale API registered for vdd_mpu_iva
cpu cpu0: omap_target: unable to scale voltage up.
cpuidle: using governor ladder
cpuidle: using governor menu
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
omap-dma-engine omap-dma-engine: allocating channel for 62
omap-dma-engine omap-dma-engine: allocating channel for 61
omap-dma-engine omap-dma-engine: allocating channel for 48
omap-dma-engine omap-dma-engine: allocating channel for 47
omap_hsmmc.1 supply vmmc_aux not found, using dummy regulator
ledtrig-cpu: registered to indicate activity on CPUs
hidraw: raw HID events driver (C) Jiri Kosina
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
ashmem: initialized
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SDHC card at address 0007
mmcblk0: mmc0:0007 SD08G 7.42 GiB 
 mmcblk0: p1 p2 p3 p4
omap-twl4030 omap-twl4030:  twl4030-hifi <-> omap-mcbsp.2 mapping ok
oprofile: using arm/armv7
TCP: cubic registered
NET: Registered protocol family 10
NET: Registered protocol family 17
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
Key type dns_resolver registered
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
mmc1: card claims to support voltages below the defined range. These will be ignored.
ThumbEE CPU extension supported.
Registering SWP/SWPB emulation handler
SmartReflex Class3 initialized
omap3isp supply VDD_CSIPHY1 not found, using dummy regulator
omap3isp supply VDD_CSIPHY2 not found, using dummy regulator
omap3isp omap3isp: Revision 15.0 found
omap-iommu omap-iommu.0: mmu_isp: version 1.1
ccdc_set_format
ccdc_try_format
ccdc_try_format
pad_source_of 300a
pad_source_of set to 300a
ccdc_try_format
mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
mmc1: new SDIO card at address 0001
registered taskstats version 1
kmemleak: Kernel memory leak detector initialized
kmemleak: Automatic memory scanning thread started
omap_i2c omap_i2c.3: timeout waiting for bus ready
Console: switching to colour frame buffer device 80x30
console [netcon0] enabled
netconsole: network logging started
twl_rtc twl_rtc: setting system clock to 2000-01-01 00:00:02 UTC (946684802)
sr_init: No PMIC hook to init smartreflex
smartreflex smartreflex.0: omap_sr_probe: SmartReflex driver initialized
smartreflex smartreflex.1: omap_sr_probe: SmartReflex driver initialized
ALSA device list:
  #0: omap3beagle
Freeing init memory: 460K
Loading, please wait...
udevd[84]: starting version 175
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
EXT4-fs (mmcblk0p2): write access will be enabled during recovery
EXT4-fs (mmcblk0p2): recovery complete
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... done.
init: ureadahead main process (208) terminated with status 5
init: mounted-proc main process (217) terminated with status 1
EXT4-fs (mmcblk0p2): re-mounted. Opts: errors=remount-ro
[ OK ]ding cpufreq kernel modules...        
[ OK ]Freq Utilities: Setting ondemand CPUFreq governor...         * CPU0...        
udhcpd: Disabled. Edit /etc/default/udhcpd to enable it.
No apache MPM package installed
Simple mixer control 'HandsfreeL',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'HandsfreeL Mux',0
  Capabilities: enum
  Items: 'Voice' 'AudioL1' 'AudioL2' 'AudioR2'
  Item0: 'AudioL1'
Playing WAVE '/root/audio/one.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
removing reset, board on
Simple mixer control 'Analog',0
  Capabilities: cvolume penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 5
  Front Left: Capture 5 [100%] [30.00dB]
  Front Right: Capture 5 [100%] [30.00dB]
Simple mixer control 'Analog Left Main Mic',0
  Capabilities: cswitch cswitch-joined penum
  Capture channels: Mono
  Mono: Capture [on]

Ubuntu 13.04 arm ttyO2
root@arm:~# insmod /lib/modules/3.9.6-x3/kernel/drivers/bluetooth/btwilink.ko 
root@arm:~# (stk) :ldisc installation timeout(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc installation timeout(stk) : timed out waiting 
for ldisc to be un-installed(stk) :ldisc installation timeout(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc installation timeout(stk) : ti
med out waiting for ldisc to be un-installed(stk) :ldisc installation timeout(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc installation t
imeout(stk) : timed out waiting for ldisc to be un-installedBluetooth: st_register failed -22

root@arm:~# 

Also Find the attached boot logs for more info.

  • Hi Ravikiran,

    As I read the description of the issue I think there are some interference between WiFi and Bluetooth. Could you check whether the linked below patch is applicable for your sources and is ti solving the issue:

    http://lwn.net/Articles/410214/

    BR

    Tsvetolin Shulev

  • HI Cvetolin Shulev-XID,

    Thanks for your inputs. 

    I will try this and let you know asap.

  • HI Cvetolin Shulev-XID,

    I checked this patch. But it throws build errors with headers mismatch and structure element mismatch. There seems to be few header files or corresponding other files which are also updated.


    I have couple of questions on ldisc timeout. Please can you brief?

    1. wait_for_completion_interruptible_timeout( &kim_gdata->ldisc_installed, msecs_to_jiffies(LDISC_TIME));
      I am waiting on above wait callBut who kim_gdata->ldisc_installed? 

    2.  I added few prints in hci_ldisc.c  Ldisc init is done and function pointers (open/close etc...) are initialized. But I don't see anybody who can call this module.

      My procedure is as follows, Please validate the same.

      modprobe  st_drv
      ./uim

      mode_probe
      btwilink

     

    Thanks in advance.

  • HI Cvetolin Shulev-XID,

    Thanks for your inputs. I am able to move little ahead from where I was Yesterday.

    my wait_for_completion_interruptible_timeout() ws waiting for some tty device to be open. This call was failing mostly dues to No of jitter I have provided in the wait() call.
    Instead waiting for 1000msec I increased it to 10000msec. SO my wait() call is success now.
    Even though my wait is as big as 10Sec. I don't mind about it at this point  of time.

    But, unfortunately I am stuck at next point were, it reads local version from the chip.
    Before downloading firmware it reads chip version, and fails.

    Please find the logs below:
    root@arm:/media/uim# (stk) : waiting for ver info- timed out (stk) :kim: failed to read local ver
    (stk) :download firmware faileduim:poll broke due to event 10(PRI:2/ERR:8)
    uim: Inside st_uart_configuim:Un-Installed N_TI_WL Line displine

    root@arm:/media/uim# (stk) : waiting for ver info- timed out (stk) :kim: failed to read local ver
    (stk) :download firmware faileduim:poll broke due to event 10(PRI:2/ERR:8)
    uim: Inside st_uart_configuim:Un-Installed N_TI_WL Line displine

    root@arm:/media/uim# (stk) : waiting for ver info- timed out (stk) :kim: failed to read local ver
    (stk) :download firmware faileduim:poll broke due to event 10(PRI:2/ERR:8)
    uim: Inside st_uart_configuim:Un-Installed N_TI_WL Line displine

     

    Any suggestions?

     

  • Hi sudeep,

    Any inputs for me?

  • Hi Ravikiran,

    Even I'm facing the same issue that you have posted. Did you solve the issue?

    Hw: DM814x EVM with IO Expansion daughter card

    Sw: ti-ezsdk_dm814x-evm_5_05_02_00 (linux-2.6.37-psp04.04.00.01),

    I'm using Wl1835 wifi module. I'm compat-wireless and compat-bluetooth drivers for WLAN and BT.

    WLAN is working fine for me. But BT is not UP. Facing the same error as you posted. If you have solved, please suggest the solution that you used.


    Hi Cvetolin Shulev-XID,

    Could you also take a look and give some inputs? What should be the baud rate input for wl1835 from board file?

    Thanks and Regards

    Vaishnavi

  • Vaishnavi Raman,

    I am debugging the issue, its not resolved yet .

    -Ravikiran