Re: Realtek USB bluetooth: no scan results when wifi is connected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/09/2015 03:32 PM, Daniel Drake wrote:
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?

Daniel,

Do you see any adverse side effects when you comment out the "case 3" code?

As there has not been a lot of testing of wifi and BT with Realtek devices in the field, I expect to see a number of bugs like this.

I added Shao Fu (aka Rock) to the Cc list. He is the Realtek engineer responsible for the wifi driver.

Larry

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux