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 Scan not working with WL1835

Other Parts Discussed in Thread: WL1835MOD, WL1835

Hello Friends,


First, I would like to thank you for all your support and suggestions. I am using WL1835MOD with I.MX28 as host processor. I have ported the btwilink dirver and hci commands/responses seems to be working fine. BT is connected with UART ttyAPP4 and I have checked with scope the BT RX/TX and BT Enable pin toggles as expected.

Kernel Version: 3.10.32

BT Firmware: TIInit_11.8.32.bts

But still there is no output for hcitool scan --refresh command? Please find the below information.

Running UIM application:
root@imx28evk:~# /etc/init.d/uim-sysfs start
UIM SYSFS Node Found at /sys/devices/kim.13/install
Starting uim-sysfs daemon.
root@imx28evk:~# uim:@ main
uim:install = /sys/devices/kim.13/install
uim:dev_name = /sys/devices/kim.13/dev_name
uim:baud_rate = /sys/devices/kim.13/baud_rate
uim:flow_cntrl = /sys/devices/kim.13/flow_cntrl
uim:begin polling...

Inserting Bluetooth Module:
root@imx28evk:~# insmod btwilink.ko
[ 1479.402898] (stc):  chnl_id list empty :4
[ 1479.406866] (stk) : st_kim_start(stk) :ldisc_install = 1uim:poll broke due to event 10(PRI:2/ERR:8)
uim:read 1 from install
uim:@ st_uart_config
uim: signal received, opening /dev/ttyAPP4
uim:@ set_baud_rate
uim:set_baud_rate() done
uim:Setting speed to 3000000
uim:@ read_command_complete
uim: Command complete started
uim:@ read_hci_event
uim: read_hci_event
uim:Command complete done
uim:S
[ 1479.599726] (stc): st_tty_open peed changing to 3000000, 1
(stk) :line discipline installed
uim:Installed N_TI_WL Line displine
[ 1479.614705] (stk) :TIInit_11.8.32.btsuim:begin polling...
[ 1479.649638] (stc): add_channel_to_table: id 4
[ 1479.654296] (stc): add_channel_to_table: id 2
[ 1479.658721] (stc): add_channel_to_table: id 3
[ 1481.725954] (stc): remove_channel_from_table: id 3
[ 1481.730819] (stc): remove_channel_from_table: id 2
[ 1481.735883] (stc): remove_channel_from_table: id 4
[ 1481.740794] (stc):  all chnl_ids unregistered
[ 1481.745571] (stk) :ldisc_install = 0uim:poll broke due to event 10(PRI:2/ERR:8)
u(stc): st_tty_close im:read 0 from install
uim:@ st_uart_config
uim:Un-Installed N_TI_WL Line displine
uim:begin polling...

Executing Commands found in BT_Init.sh:
root@imx28evk:~# hciconfig hci0 up
[ 1553.530479] (stc):  chnl_id list empty :4 (stk) : st_kim_start
[ 1553.642406] (stk) :ldisc_install = 1uim:poll broke due to event 10(PRI:2/ERR:8)
uim:read 1 from install
uim:@ st_uart_config
uim: signal received, opening /dev/ttyAPP4
uim:@ set_baud_rate
uim:set_baud_rate() done
uim:Setting speed to 3000000
uim:@ read_command_complete
uim: Command complete started
uim:@ read_hci_event
uim: read_hci_event
uim:Command complete done
uim:S(stc): st_tty_open peed changing to 3000000
[ 1553.722930] (stk) :line discipline installed, 1
(stk) :TIInit_11.8.32.btse
uim:Installed N_TI_WL Line displine
uim:begin polling...
[ 1553.743081] (stc): add_channel_to_table: id 4
[ 1553.747707] (stc): add_channel_to_table: id 2
[ 1553.752395] (stc): add_channel_to_table: id 3
root@imx28evk:~# hciconfig hci0 piscan &
root@imx28evk:~# dbus-launch --auto-syntax > /tmp/bt-demo-env
[1]+  Done                       hciconfig hci0 piscan
root@imx28evk:~# . /tmp/bt-demo-env

Executing BT_Inquiry.sh to scan:
root@imx28evk:~# hcitool scan --refresh
Scanning ...   // It returns without ANY result
root@imx28evk:~#

Command output for Debugging (after above commands):
root@imx28evk:~# hciconfig -a
hci0:   Type: BR/EDR  Bus: UART
        BD Address: 84:DD:20:98:7E:7B  ACL MTU: 1021:6  SCO MTU: 180:4
        UP RUNNING PSCAN ISCAN
        RX bytes:1109 acl:0 sco:0 events:57 errors:0
        TX bytes:836 acl:0 sco:0 commands:56 errors:0
        Features: 0xff 0xfe 0x2d 0xfe 0xdb 0xff 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF
        Link mode: SLAVE ACCEPT
        Name: ''
        Class: 0x001f00
        Service Classes: Unspecified
        Device Class: Invalid Device Class!
        HCI Version: 4.0 (0x6)  Revision: 0x0
        LMP Version: 4.0 (0x6)  Subversion: 0xac20
        Manufacturer: Texas Instruments Inc. (13)

root@imx28evk:~# cat /sys/kernel/debug/ti-st/version
AC20 11.8.32
root@imx28evk:~#  cat /sys/kernel/debug/ti-st/protocols
[3]
BT=R
FM=U
GPS=U

Ran HCIdump with Scan as below:
root@imx28evk:~# hcidump -X &
root@imx28evk:~# HCI sniffer - Bluetooth packet analyzer ver 5.19
device: hci0 snap_len: 1500 filter: 0xffffffff
root@imx28evk:~# hcitool scan --refresh
Scanning ...
< HCI Command: Inquiry (0x01|0x0001) plen 5
    lap 0x9e8b33 len 8 num 0
> HCI Event: Command Status (0x0f) plen 4
    Inquiry (0x01|0x0001) status 0x00 ncmd 1
> HCI Event: Inquiry Complete (0x01) plen 1
    status 0x00
root@imx28evk:~#

Find the attached kernel.config file at http://pastebin.com/keMjYYZE and kernel_boot.log with the post.


Feel free to share if you need further information to debug. Any pointers will be helpful on getting the scan results?


Regards,

Ankur