Page 2 of 3

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Fri Jan 27, 2017 4:23 pm
by Douglas6
dukla2000 wrote:I got a cheap (GBP2.00) CSR4.0 Asian knockoff (on fleabay) that works fine for me.
What does 'hciconfig -a' say about that adapter? I've seen some that report they are made by CSR and manufactured by Broadcom. Apparently having stolen firmware from both makers.

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Fri Jan 27, 2017 8:23 pm
by DougieLawson
Douglas6 wrote:
dukla2000 wrote:I got a cheap (GBP2.00) CSR4.0 Asian knockoff (on fleabay) that works fine for me.
What does 'hciconfig -a' say about that adapter? I've seen some that report they are made by CSR and manufactured by Broadcom. Apparently having stolen firmware from both makers.
The biggest problem I found with the two cheapo (£1.00) BT CSR 4.0 knockoffs is that they both have the same MAC address, which makes it possible to run one or the other and impossible to run both at once.

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Fri Jan 27, 2017 9:53 pm
by Xarathos

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Sat Jan 28, 2017 1:18 am
by Douglas6
Based on the price and favorable reviews, that looks to be a legitimate CSR adapter. I start to worry when the price is under $5 or so, in that case, you are taking a chance.

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Sat Jan 28, 2017 1:22 am
by Xarathos
Cool, thanks. I'll give it a try and post how it went.

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Sat Jan 28, 2017 11:04 am
by dukla2000
Douglas6 wrote:
dukla2000 wrote:I got a cheap (GBP2.00) CSR4.0 Asian knockoff (on fleabay) that works fine for me.
What does 'hciconfig -a' say about that adapter? I've seen some that report they are made by CSR and manufactured by Broadcom. Apparently having stolen firmware from both makers.

Code: Select all

[email protected]:~ $ hciconfig -a
hci0:	Type: BR/EDR  Bus: USB
	BD Address: 00:1A:7D:DA:71:13  ACL MTU: 310:10  SCO MTU: 64:8
	UP RUNNING PSCAN 
	RX bytes:70566804 acl:4405957 sco:0 events:2829 errors:0
	TX bytes:19889 acl:771 sco:0 commands:569 errors:0
	Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: RSWITCH HOLD SNIFF PARK 
	Link mode: SLAVE ACCEPT 
	Name: 'dukla'
	Class: 0x000000
	Service Classes: Unspecified
	Device Class: Miscellaneous, 
	HCI Version: 4.0 (0x6)  Revision: 0x22bb
	LMP Version: 4.0 (0x6)  Subversion: 0x22bb
	Manufacturer: Cambridge Silicon Radio (10)
Pretty much Greek to me, would be bemused if the MAC is the same constant as you have seen? Or if in fact it looks genuine?

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Sat Jan 28, 2017 11:45 am
by Douglas6
Nah, looks OK to me.

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Sat Jan 28, 2017 11:53 am
by DougieLawson
Looks OK to me. The non-unique MAC address for my fake BT dongles is 00:15:83:0C:BF:EB.

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Mon Jan 30, 2017 4:15 pm
by ab1jx
Interesting, on my Pi3 hciconfig -a shows me
BD Address: B8:27:EB:82:98:CC (bluetooth)
and ifconfig wlan0 shows
HWaddr b8:27:eb:7d:67:33 (wifi)

So the 1st 3 bytes are the manufacturer code. Maybe I knew that but I didn't know it applied to Bluetooth.

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Tue Jan 31, 2017 12:24 am
by Xarathos
First thanks to everyone for their suggestions. I've received the device today. I'm trying to connect a Raspberry Pi 3 to a Bluetooth speaker. It appears to be the same one that DougieLawson is using. Can anyone point me to a tutorial on how to finish this process?

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Tue Jan 31, 2017 12:32 am
by Douglas6

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Tue Jan 31, 2017 12:50 am
by Xarathos
Thanks, I've tried that one numerous times. And failed. My goal now is to not use the on board Bluetooth. And to use the USB adapter instead. What I am trying to find is a how to on how to do that. How do I disable (?) the on board Bluetooth? And then use the adapter to connect the Bluetooth speaker.

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Tue Jan 31, 2017 1:20 am
by Douglas6
Ah, a different question. Still no relation to this topic, and deserving of a new topic, or better yet, a search for the many topics that answer this question. Still, I'll try to help.

Edit /boot/config.txt, and add the following:

Code: Select all

dtoverlay=pi3-disable-bt-overlay
Reboot. That should disable the on-board adapter and allow the USB adapter to be recognized as hci0. Proceed normally.

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Mon Feb 06, 2017 10:23 pm
by Xarathos
dukla2000 wrote:
jjblumenfeld wrote:Is it pretty straightforward to disable the on-board bluetooth and enable the dongle?
Yup, just add

Code: Select all

dtoverlay=pi3-disable-bt
to /boot/config.txt to disable the onboard BT. You shouldn't need to do anything to enable a USB/BT dongle (I didn't).
I've tried this and the Youtube video plays thru. It didn't before. I still have to start pulseaudio in terminal. And still can't play audio thru a speaker that I know is working. Did I miss a step?

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Sun Apr 16, 2017 10:55 pm
by bobabbott
I know that this has now been extensively reported but here's my example:
With wifi turned on my new and updated RPi3b supports a logitech M535 bluetooth mouse just fine. Add a Logitech K380 bluetooth keyboard and while the mouse is OK the keyboard does not work. It repeats characters in long strings etc. making it useless.
Turn wifi off and all is well; Both mouse and keyboard work fine.
At the moment with the Raspberry 3 b:
bluetooth OR wifi work
bluetooth AND wifi does NOT work.

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Tue Jun 20, 2017 4:03 pm
by stefanv
I'm seeing exactly the same problem with a K380 keywboard and T630 mouse. Either one alone works fine, but if both are active, both work unreliably (such as forever repeating keys, etc.). It would be great to fix this without resorting to either a Bluetooth or WiFi dongle, since one of the nice things about the Pi3 is that these features are built-in.

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Thu Jun 29, 2017 9:13 am
by insanityideas
I have 2x RPI3 and recently bought bluetooth keyboard that allows multiple pairings which can be manually switched between, so I set it up with both Pi's. It worked fine, then I tried out a couple of bluetooth speakers on only 1 of the Pi's. It started getting the bluetooth and wifi dropout problems described here. If keyboard and speaker were both connected at same time then the audio would stutter and lag even if not actively using the keyboard. Speaker worked fine if the keyboard was off.

I also noted that neither device would automatically reconnect with the Pi, even if the other device was off, sometimes the bluetooth just stopped working until a reboot. At which point I tried out the other pi that only had the keyboard paired and it connected automatically every time. So there wasn't a problem with the keyboard.

Finally I deleted the speaker device from the bluetooth pairings, at which point the bluetooth started working as it should, automatically connecting and not having the wifi dropping out.

So from this limited test I conclude that even having multiple devices paired but not connected can cause the bluetooth and wifi problems described in this thread. Although the problems are worse if the devices are connected at the same time.

Devices tested (all work fine in isolation):
EC Technology folding bluetooth keyboard
Juice sound square (found going cheap in tescos).

I might try some other devices to see if there is always an incompatibility or only sometimes, although I get frustrated when things don't work!!!!

Hope this info helps, I havn't seen anyone else post about this behaviour yet.

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Thu Feb 22, 2018 12:21 am
by dukla2000
My 2018 update on this - still an issue despite the announcement here.

Still loads of hangs when connecting second device to Bluetooth, and bluetoothd running 100% on a CPU.
$ uname -a
Linux dukla 4.14.20-v7+ #1094 SMP Mon Feb 19 15:14:31 GMT 2018 armv7l GNU/Linux
[email protected]:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.3 (stretch)
Release: 9.3
Codename: stretch

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Thu Feb 22, 2018 12:35 am
by Douglas6
Sorry, no helpful response. But I am interested in what you are trying to do, and what makes you believe it should work (regardless of OS)?

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Thu Feb 22, 2018 1:03 am
by dukla2000
I am trying to use Pi3 onboard BT for a keyboard and a mouse. And onboard WiFi. All at the same time.

When making my post an hour ago the mouse was working fine, the WiFi was working fine, and the keyboard was up and down like the proverbial, alternating with bluetoothd running 100% of a CPU and absolutely no keyboard function.

Going back to start of thread I know the workaround is a BT dongle instead of the onboard BT but I was hoping James announcement may have been a fix.

PS - it works just fine on a Khadas VIM2

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Thu Feb 22, 2018 1:26 am
by insanityideas
Just wanted to add an update following some experimenting I did recently:

I have two RPI3's purchased at different times and running the version of Raspbian that was current at the time so one has Jessie and one has been upgraded from Jessie to Stretch. Both get apt-get dist-upgrade every so often and were updated for this test. They both run 24/7 without reboots and connect via wifi, I use a bluetooth keyboard to interact with them sometimes (SSH other times)

The older RPI3 has always had rock solid reliability for WiFi, the newer one has always dropped the WiFi connection and not automatically re-connected (or thinks it is connected but passes no data) at random intervals but usually a couple weeks apart. If the WiFi has been dropped then the bluetooth keyboard will also fail to connect, a reboot always fixes it nothing else seems to.

As an experiment I swapped the SD cards around to see (unscientifically) if there was a problem with the raspbian image on the troublesome Pi, or if it was hardware related. Both Pi's proceeded to work faultlessly for weeks (way beyond when an error would have occured). Then swapping the cards back to their original Pi's both have still continued to work faultlessly without dropped WiFi or unresponsive bluetooth. No changes to the wireless network configuration were made during this time.

I am not technical enough to understand the significance of these findings, but thought someone else might. The only thought I had was that the troublesome Pi didn't get or successfully apply the firmware update for the wireless chip released a while ago and swapping the cards around made that happen.

One (unreleated) thing I have noticed is that my older Kindle Fire which has bluetooth and wifi also has all the same problems with WiFi dropping out regularly when a bluetooth speaker is connected, but works fine if the bluetooth is disconnected. No idea if it shares any firmware hardware or driver similarities with the Pi, but clearly there is some lingering bugs in various implementations of bluetooth and WiFi combined chips. The newest kindle fire (different hardware) works fine.

I am happi-er as the annoying problem of wifi dropping out has been fixed for me, thought I would post the experience in-case it helped anyone else out or gave anyone chasing bugs some ideas. The bluetooth still remains a bit flaky, and I wouldn't really trust it for a keyboard/mouse solution in any environment where the Pi is going to be "installed" inside something permanent or given to non-techy users. One with a wire or its own non-bluetooth wireless adapter seems like a better bet.

Happy Raspberry-pi-ing and thanks to the Foundation for all the great work they have done getting the Pi platform as well supported fully featured and reliable as it is (I have Pi's running very reliably for years now, including some Pi3's maxed out on BOINC tasks all the time, without any human intervention required, which to me makes a very stable hardware/software combo).

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Sat Feb 24, 2018 10:04 pm
by PhatFil
I am now getting

Code: Select all

connect error: Function not implemented (38) python3
errors that kill Bluetooth and a daemon i kinda hoped would run indefinably polling BLE sensors regularly.

with the B/tooth polling ive attempted a wifi udp test that failed. But when connecting via lan - no issues..
am now off to sulk and ebay a usb b/tooth dongle and micro-usb2 adaptor hrmph!

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Sun Feb 25, 2018 10:52 am
by TRIROG
Any news on this topic?
I'm having a similar issue using rPi3 for BT presence detection and connected to WiFi, however this means the WiFI connection is very flaky, during BTLE scan.

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Sun Feb 25, 2018 4:32 pm
by PhatFil
FacePalm Doh! moment today when i realised my pi3 (development puter) had the scanning also enabled and 2 systems were polling the same devices within the same polling window when the schedules synced!! stopped the scanning on the pi3 system and the problems went away (for the last 12hours at least. previously the two scanners would sync up within 5-6 hours.. . oh well im sure i can loose another mini usb plug in at the back of a drawer somewhere!!
PhatFil wrote:
Sat Feb 24, 2018 10:04 pm
I am now getting

Code: Select all

connect error: Function not implemented (38) python3
errors that kill Bluetooth and a daemon i kinda hoped would run indefinably polling BLE sensors regularly.

with the B/tooth polling ive attempted a wifi udp test that failed. But when connecting via lan - no issues..
am now off to sulk and ebay a usb b/tooth dongle and micro-usb2 adaptor hrmph!

Re: RPi3 Bluetooth and Wifi don't play well together

Posted: Wed Feb 28, 2018 9:02 pm
by udo29
I also have problems with the keyboard when the Wifi is on. I unload the Wifi module with modprobe -r brcmfmac the keyboard works flawlessly. In my opinion, the problem is that Bluetooth and Wifi work in the same frequency band and have a common antenna. Perhaps one could solve the problem by the fact that the driver manufacturer uses for the Wifi driver, for example, only the frequency range of 2.412 - 2.459 GHz and for the Bluetooth driver the frequency range of 2.460 - 2.480 GHz. Maybe that reads someone who has a connection to the driver manufacturer and can pass on the idea?

RPi3 raspbian-stretch
Linux pc09 4.14.22-v7+ #1096 SMP Mon Feb 26 19:14:22 GMT 2018 armv7l GNU/Linux
Logitech Keyboard K480
Renkforce Bluetooth 3.0 Mouse