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 can't scan using wl1273 chip

Other Parts Discussed in Thread: WL1283

HI,

 

We are porting the wl1273 chip into our board (OMAP4430). The WI-FI works well, but Bluetooth can't scan any results even the chip up (BT_EN High). I can see the HCI message from HCIdump, as follows (always no results):

 

# hcidump

HCI sniffer - Bluetooth packet analyzer ver 1.42

device: hci0 snap_len: 1028 filter: 0xffffffff

bluetoothd[2020]: Discovery session 0xf418 with :1.0 activated

< HCI Command: Periodic Inquiry Mode (0x01|0x0003) plen 9

> HCI Event: Command Complete (0x0e) plen 4

> HCI Event: Inquiry Complete (0 cmd 1x01) plen 1

< HCI Command: Exit Periodic Inquiry Mode (0x01|0x0004) plen 0

bluetoothd[2020]: Stopping discovery

> HCI Event: Command Complete (0x0e) plen 4

---

My SW Env:

TI release package: 27.12.1-P1

Kernel Version: 2.6.35.7

---

# lsmod

btwilink 3332 2 - Live 0xbf00a000

st_drv 14997 2 btwilink, Live 0xbf000000

# cat /sys/kernel/debug/ti-st/version 

1D1F 7.2.31

# cat /sys/kernel/debug/ti-st/protocols 

[3]

BT=R

FM=U

GPS=U

# cat /sys/devices/platform/kim/dev_name 

/dev/ttyO1

# cat /sys/devices/platform/kim/baud_rate            (I already try the 3M and get the same)

115200

# cat /sys/devices/platform/kim/flow_cntrl 

1

---

# hciconfig -a

hci0:   Type: BR/EDR  Bus: UART

        BD Address: 00:23:D4:85:DB:75  ACL MTU: 1021:4  SCO MTU: 180:4

        UP RUNNING PSCAN 

        RX bytes:1126 acl:0 sco:0 events:57 errors:0

        TX bytes:1752 acl:0 sco:0 commands:51 errors:0

        Features: 0xff 0xff 0x2d 0xfe 0x9b 0xff 0x79 0x83

        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 

        Link policy: RSWITCH HOLD SNIFF 

        Link mode: SLAVE ACCEPT 

        Name: 'Full Android on Blaze or SDP'

        Class: 0x58020c

        Service Classes: Capturing, Object Transfer, Telephony

        Device Class: Phone, Smart phone

        HCI Version: 2.1 (0x4)  Revision: 0x0

        LMP Version: 2.1 (0x4)  Subversion: 0x1d1f

        Manufacturer: Texas Instruments Inc. (13)

---
# cat tiwlan.ini
BThWlanCoexistEnable = 1         #0 - SG disable, 1 - SG protective
---
# cat /proc/tty/driver/OMAP-SERIAL 
serinfo:1.0 driver revision:
0: uart:OMAP UART0 mmio:0x4806A000 irq:104 tx:0 rx:0
1: uart:OMAP UART1 mmio:0x4806C000 irq:105 tx:1779 rx:1492 RTS|CTS|DTR
2: uart:OMAP UART2 mmio:0x48020000 irq:106 tx:0 rx:1123 RTS|DTR
3: uart:OMAP UART3 mmio:0x4806E000 irq:102 tx:32988 rx:700 RTS|DTR
---
I have no idea now, please give me a direction.
Thank You ...

  • Hi,

    We got the question and forward it to the relevant engineer

    Regards,

    Eyal

  • Thank you for your reply.

    Update our chip information.

    wl1273 PG 2.0 board.

  • HI,

    update my information, I do some experiment on our device with wl1273 chip (SW: 27.12.1-P1) .

    Now it can scan using cmd line with ‘hcitool scan’. My procedure as follows:

    --

    stop                                         #stop android system and its service (including bluetoothd, uim...)

    rmmod btwilink

    rmmod st_drv

    insmod /st_drv.ko

    insmod /btwilink.ko                           #It will show the driver version 1.0 when insmod.

    start bluetoothd                                  #It will try to install line disc but timed out, due to no UIMd in background. (BT_EN get high)

    hciattach /dev/ttyO1 texas 230400  # device setup complete

    hcitool scan                                        # work well !

    --

    Is the line disc of btwilink&st_drv module differs with original hciattch tool (TI’s line disc)? Or the btwilink&st_drv module (the new version of shard transport module) just for wl1283? Or something?

    From my experimental procedure, you can see the btwilink & st_drv module only for BT_EN getting high.

    Then using the hciattach tool for loading bts script. (install hci_ll ?)

    please help me to clarification, Thank you.

     

  • Hi,

    I'm using a similar platform and I expect to see bt_drv.ko as well when I type lsmod. Any reason I do not see it?

    Also, only scan/inquiry is not working or other more basic "local" command like read BD ADDRESS? Can you try to read the BD ADDRESS and report?

    Are you sure the init script (*.bts file) is loaded to the chip?

     

    In general, I suggest openning the debug level in the Shared Transport level. Please look into st_core.c, bt_drv.c and st_kim.c and see there are many printings (e.g. pr_err). Please make sure you have it opened.

    Shlomi

  • HI,

    In TI L27.12.P1 release (Blaze + com6), the document say uses the btwilink.ko (path in $kernel/driver/bluetooth) instead of bt_drv.ko.  Should I restore to bt_drv.ko module?

     

    Yes, I can see the BD ADDR from hciconfig cmd and the log about init script download complete from st_kim.c.

     

    In my previous post, using hciattach tool work well! I will try the st_drv.ko + bt_drv.ko in Kernel 2.6.35 instead of btwilink.ko.

    What is the btwilink.ko module? For wl1283 chips?

     

    Thank You.

    YF.

  • I found the description about the btwilink.ko from this link, http://kerneltrap.org/mailarchive/linux-kernel/2010/12/23/4663056/thread

    This patch also delete the bt_drv.ko.

    --

     

    From: Pavan Savoy <pavan_savoy@ti.com>
    
    -- patch description --
    
    This is the bluetooth protocol driver for the TI WiLink7 chipsets.
    Texas Instrument's WiLink chipsets combine wireless technologies
    like BT, FM, GPS and WLAN onto a single chip.
    
    This Bluetooth driver works on top of the TI_ST shared transport
    line discipline driver which also allows other drivers like
    FM V4L2 and GPS character driver to make use of the same UART interface.
    
    Kconfig and Makefile modifications to enable the Bluetooth
    driver for Texas Instrument's WiLink 7 chipset.