linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Realtek USB bluetooth: no scan results when wifi is connected
@ 2015-05-09 20:32 Daniel Drake
  2015-05-09 21:46 ` Larry Finger
  0 siblings, 1 reply; 17+ messages in thread
From: Daniel Drake @ 2015-05-09 20:32 UTC (permalink / raw)
  To: 陈艳萍
  Cc: Carlo Caione, Linux Bluetooth mailing list, Larry Finger

Hi Champion,

I have a card here which has RTL8723BE wifi and bluetooth combined. 2 antennas.

In linux-next (Linux 4.2) the bluetooth and wifi work fine separately,
but when using them together, I can sometimes see a problem. This is
using the btusb driver based on your code (now included in Linux 4.2),
and the RTL8723B rtlwifi driver, all using the latest firmware in the
linux-firmware git repo.

To reproduce:
 - Boot with no wifi connection active
 - "hcitool scan" and verify that my laptop and phone can be seen
 - Connect to wifi
 - Run "hcitool scan" again a few times a minute, within 2-5 minutes
normally my phone and laptop can no longer be seen
 - Disconnect from wifi and immediately run "hcitool scan" again, my
phone and laptop can be seen

3 interesting observations when the scan results are coming back empty:
 1. I can still get the names of the remote devices by running
"hcitool name <addr>"
 2. I can still query the remote devices by running "hcitool info
<addr>". After this, the scan suddenly starts working again!
 3. Even though both of my local bluetooth devices no longer appear in
scan results, I can sometimes see my neighbour's phone coming up as a
scan result at this time.

Anyway, disabling btcoexist avoids the issue, so I dug through that
code, and found the exact line of code that seems to (sometimes) make
us enter this strange mode.

Call chain inside drivers/net/wireless/rtlwifi/btcoexist/halbtc8723b2ant.c:
ex_btc8723b2ant_bt_info_notify (called when starting and finishing a BT scan)
btc8723b2ant_run_coexist_mechanism
btc8723b2ant_action_bt_inquiry

As wifi is connected, we now call:
        btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3);

This is the function call that sometimes puts us into the mode where
there are no scan results. Inside this function, if I comment out
these lines in the turn_on section, the bug is avoided:

        case 3:
            //btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c,
            //                0x3, 0xf1, 0x90);
            break;

Any idea what is happening here? Can you help me find a better fix?

Thanks
Daniel

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-06-06  5:08 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-09 20:32 Realtek USB bluetooth: no scan results when wifi is connected Daniel Drake
2015-05-09 21:46 ` Larry Finger
2015-05-11 13:36   ` Daniel Drake
2015-05-11 15:38     ` Larry Finger
2015-05-12  2:54   ` 答复: " 陈艳萍
2015-05-12 12:53     ` Daniel Drake
2015-05-13  2:36       ` 答复: " 陈艳萍
2015-05-21 13:29         ` Daniel Drake
2015-05-28 10:02           ` 答复: " 陈艳萍
2015-05-28 14:23             ` Marcel Holtmann
2015-05-28 14:48               ` Daniel Drake
2015-05-28 15:13                 ` Marcel Holtmann
2015-05-28 15:58                   ` Larry Finger
2015-05-29  8:17                     ` Shaofu
2015-06-06  5:07                       ` Marcel Holtmann
2015-06-06  5:08                     ` Marcel Holtmann
2015-05-13  7:51       ` 答复: 答复: " 陈艳萍

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).