dukla2000
Posts: 190
Joined: Tue Jan 10, 2012 12:02 am
Location: Reading.UK.EU

RPi3 Bluetooth and Wifi don't play well together

Wed Mar 16, 2016 8:18 pm

Being fairly new to Bluetooth this may be an idiot newb problem, but in short I cannot get my new mouse and keyboard to play nicely together. Without doing any Bluetooth changes I can get either
Bluetooth mouse and USB keyboard happy OR
Bluetooth keyboard and USB mouse

RPi3

Code: Select all

[email protected]:~ $ uname -a
Linux dukla 4.1.19-v7+ #853 SMP Wed Mar 9 18:09:16 GMT 2016 armv7l GNU/Linux
The following copy of bluetoothctl is fresh after a reboot starting with both Bluetooth devices powered on. Right after the info requests you can see the keyboard gets disconnected. And reconnected and ... In parallel bluetoothd (the daemon) kicks off 100% of 1 CPU. Towards the end of the log I switch off the mouse, the keyboard recovers and is still working fine approx 10 mins later for me to type this!

Code: Select all

[email protected]:~ $ sudo bluetoothctl -a
[NEW] Controller B8:27:EB:E2:94:7D dukla [default]
[NEW] Device 0C:FC:86:90:03:DF Bluetooth 3.0 Keyboard
[NEW] Device 01:AC:78:E6:53:B0 Bluetooth Mouse
Agent registered
[bluetooth]# paired-devices
Device 0C:FC:86:90:03:DF Bluetooth 3.0 Keyboard
Device 01:AC:78:E6:53:B0 Bluetooth Mouse
[bluetooth]# info 0C:FC:86:90:03:DF 
Device 0C:FC:86:90:03:DF
	Name: Bluetooth 3.0 Keyboard
	Alias: Bluetooth 3.0 Keyboard
	Class: 0x002540
	Icon: input-keyboard
	Paired: yes
	Trusted: yes
	Blocked: no
	Connected: yes
	LegacyPairing: no
	UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	Modalias: usb:v04E8p7021d011B
[bluetooth]# info 01:AC:78:E6:53:B0 
Device 01:AC:78:E6:53:B0
	Name: Bluetooth Mouse
	Alias: Bluetooth Mouse
	Class: 0x000580
	Icon: input-mouse
	Paired: yes
	Trusted: yes
	Blocked: no
	Connected: yes
	LegacyPairing: no
	UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	Modalias: usb:v05ACp3232d0001
[CHG] Device 0C:FC:86:90:03:DF Connected: no
[CHG] Device 0C:FC:86:90:03:DF Connected: yes
[CHG] Device 0C:FC:86:90:03:DF Connected: no
[CHG] Device 0C:FC:86:90:03:DF Connected: yes
[CHG] Device 0C:FC:86:90:03:DF Connected: no
[CHG] Device 0C:FC:86:90:03:DF Connected: yes
[bluetooth]# paired-devices
Device 0C:FC:86:90:03:DF Bluetooth 3.0 Keyboard
Device 01:AC:78:E6:53:B0 Bluetooth Mouse
[CHG] Device 0C:FC:86:90:03:DF Connected: no
[CHG] Device 0C:FC:86:90:03:DF Connected: yes
[CHG] Device 0C:FC:86:90:03:DF Connected: no
[CHG] Device 0C:FC:86:90:03:DF Connected: yes
[CHG] Device 0C:FC:86:90:03:DF Connected: no
[CHG] Device 01:AC:78:E6:53:B0 Connected: no
[CHG] Device 0C:FC:86:90:03:DF Connected: yes
[bluetooth]# quit
Agent unregistered
[DEL] Controller B8:27:EB:E2:94:7D dukla [default]
Any suggestions welcome!

It does seem there are some related bits in the system log when the keyboard disconnects:

Code: Select all

[   35.965171] hid-generic 0005:05AC:3232.0001: unknown main item tag 0x0
[   35.965593] input: Bluetooth Mouse as /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:05AC:3232.0001/input/input1
[   35.966167] hid-generic 0005:05AC:3232.0001: input,hidraw0: BLUETOOTH HID v0.01 Mouse [Bluetooth Mouse] on b8:27:eb:e2:94:7d
[   70.522327] hid-generic 0005:04E8:7021.0002: unknown main item tag 0x0
[   70.522890] input: Bluetooth 3.0 Keyboard as /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:13/0005:04E8:7021.0002/input/input2
[   70.524234] hid-generic 0005:04E8:7021.0002: input,hidraw1: BLUETOOTH HID v1.1b Keyboard [Bluetooth 3.0 Keyboard] on b8:27:eb:e2:94:7d
Last edited by dukla2000 on Wed Apr 27, 2016 6:46 pm, edited 1 time in total.
Daily driver: Pi3B, 64GB Samsung Evo+ @100MHz, DVB-T, onboard WiFi for internet, BT/USB dongle for KB/mouse, 250GB HDD via USB for media, Raspbian Jessie Lite with Openbox desktop.
Museum: Pi B

Nickcn
Posts: 200
Joined: Sat Mar 05, 2016 8:18 pm
Location: USA

Re: Bluetooth keyboard and Bluetooth mouse will not play nic

Wed Mar 16, 2016 10:18 pm

deleted
Last edited by Nickcn on Mon May 16, 2016 3:47 am, edited 2 times in total.

dukla2000
Posts: 190
Joined: Tue Jan 10, 2012 12:02 am
Location: Reading.UK.EU

Re: Bluetooth keyboard and Bluetooth mouse will not play nic

Thu Mar 17, 2016 12:08 am

Nickcn wrote:And easily paired/connected a bt mouse and bt keyboard, and both functioned properly.

I then paired a windows tablet to the pi3, and sent files to it.
Good to know it is not a RPi3 issue, or even Raspian. For some reason my 2 bits just will not place nicely - will trust, pair & connect but if both are powered on then keyboard loses connection.

BTW presume you mean blueman (not blues) - have it installed and still prefer cli. Have removed (and rebuilt) all bluetooth setup a couple of times trying to debug my squabbling sibblings and have yet to get blueman to do anything predictable.
Daily driver: Pi3B, 64GB Samsung Evo+ @100MHz, DVB-T, onboard WiFi for internet, BT/USB dongle for KB/mouse, 250GB HDD via USB for media, Raspbian Jessie Lite with Openbox desktop.
Museum: Pi B

User avatar
Douglas6
Posts: 4472
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Bluetooth keyboard and Bluetooth mouse will not play nic

Thu Mar 17, 2016 12:29 am

At least one forum member has reported success only after uninstalling blueman. You might give it a try if you're not using it.

dukla2000
Posts: 190
Joined: Tue Jan 10, 2012 12:02 am
Location: Reading.UK.EU

Re: Bluetooth keyboard and Bluetooth mouse will not play nic

Thu Mar 17, 2016 12:55 am

Douglas6 wrote:At least one forum member has reported success only after uninstalling blueman. You might give it a try if you're not using it.
Its gone (again) but no change. At start of extract below was running Bluetooth keyboard with USB mouse. Right after paired-devices query you can see I switch on Bluetooth mouse, and withing 30 seconds keyboard loses connection. Then regains, loses ... And bluetoothd kicks off 100% of 1 CPU!

Code: Select all

[email protected]:~ $ sudo bluetoothctl -a
[NEW] Controller B8:27:EB:E2:94:7D dukla [default]
[NEW] Device 0C:FC:86:90:03:DF Bluetooth 3.0 Keyboard
[NEW] Device 01:AC:78:E6:53:B0 Bluetooth Mouse
Agent registered
[bluetooth]# paired-devices
Device 0C:FC:86:90:03:DF Bluetooth 3.0 Keyboard
Device 01:AC:78:E6:53:B0 Bluetooth Mouse
[CHG] Device 01:AC:78:E6:53:B0 Connected: yes
[bluetooth]# list
Controller B8:27:EB:E2:94:7D dukla [default]
[CHG] Device 0C:FC:86:90:03:DF Connected: no
[CHG] Device 0C:FC:86:90:03:DF Connected: yes
[CHG] Device 0C:FC:86:90:03:DF Connected: no
[CHG] Device 0C:FC:86:90:03:DF Connected: yes
[CHG] Device 0C:FC:86:90:03:DF Connected: no
[CHG] Device 01:AC:78:E6:53:B0 Connected: no
[CHG] Device 0C:FC:86:90:03:DF Connected: yes
[bluetooth]# list
Controller B8:27:EB:E2:94:7D dukla [default]
[CHG] Device 01:AC:78:E6:53:B0 Connected: yes
Agent unregistered
[DEL] Controller B8:27:EB:E2:94:7D dukla [default]
[bluetooth]# list
[bluetooth]# quit
[email protected]:~ $
Daily driver: Pi3B, 64GB Samsung Evo+ @100MHz, DVB-T, onboard WiFi for internet, BT/USB dongle for KB/mouse, 250GB HDD via USB for media, Raspbian Jessie Lite with Openbox desktop.
Museum: Pi B

dukla2000
Posts: 190
Joined: Tue Jan 10, 2012 12:02 am
Location: Reading.UK.EU

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

Wed Apr 27, 2016 6:55 pm

OK, tried all the permutations of 2 BT mice with 2 BT keyboards as well as a USB keyboard and USB mouse with the onboard BT. As long as I was using onboard WiFi there was no way I could get 2 BT devices to play nicely and in fact even when only using 1 BT device (with onboard WiFi) had occasional grief like solid hangs.

Since swapping to a BT dongle for all my BT needs haven't had a hiccup. The swap to the dongle was prompted by emw problems here and AlessandroFerri travails here. My conclusion is that RPi3 Bluetooth and Wifi don't play well together. Changed the title of this thread to reflect my conclusion.
Daily driver: Pi3B, 64GB Samsung Evo+ @100MHz, DVB-T, onboard WiFi for internet, BT/USB dongle for KB/mouse, 250GB HDD via USB for media, Raspbian Jessie Lite with Openbox desktop.
Museum: Pi B

jjblumenfeld
Posts: 3
Joined: Sat May 07, 2016 2:33 pm

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

Mon May 09, 2016 8:49 pm

Thanks.
I think I'll try getting an extra bluetooth dongle for it. I've also got a bluetooth speaker/microphone that I"d like to connect. It is pairing and connecting but the actual sound coming through is pretty flaky.

Is it pretty straightforward to disable the on-board bluetooth and enable the dongle?

/jeremy

dukla2000
Posts: 190
Joined: Tue Jan 10, 2012 12:02 am
Location: Reading.UK.EU

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

Mon May 09, 2016 8:56 pm

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).
Daily driver: Pi3B, 64GB Samsung Evo+ @100MHz, DVB-T, onboard WiFi for internet, BT/USB dongle for KB/mouse, 250GB HDD via USB for media, Raspbian Jessie Lite with Openbox desktop.
Museum: Pi B

User avatar
smigielski
Posts: 4
Joined: Tue Dec 11, 2012 8:01 pm
Location: Lodz, PL
Contact: Website

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

Wed Jun 01, 2016 6:40 pm

Very strange issue. I had the same and also connecting external BT receivers helps.

Do you know why we have this issue and if it can be solved somehow on the firmware level or operating system level? Is this connected to the power problems somehow?

igorrecio
Posts: 3
Joined: Wed Jun 29, 2016 8:50 am
Location: Vitoria-Gasteiz (Basque Country)

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

Thu Jun 30, 2016 7:54 pm

Hi everyone!

Same problem with RPi 3. I try to connect my Apple mouse and keyboard over BT but keyboard repeats keys or connect and disconnect suddenly...

It only works fine with a external BT dongle... Or connecting an USB mouse and my BT keyboard...

So strange everything. It is disgusting to buy a brand new RPi3 and use a dongle...

any solution?

Edit: When I disable WIFI connection, BT works perfectly with both keyboard and mouse. There is something wrong between Wifi and BT... I hope a quick update solves it :(

User avatar
Douglas6
Posts: 4472
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

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

Thu Jun 30, 2016 9:52 pm

igorrecio wrote:There is something wrong between Wifi and BT... I hope a quick update solves it
I have not seen an official acknowledgement of this issue. I wouldn't expect a quick fix.

igorrecio
Posts: 3
Joined: Wed Jun 29, 2016 8:50 am
Location: Vitoria-Gasteiz (Basque Country)

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

Fri Jul 01, 2016 9:17 am

smigielski wrote:Very strange issue. I had the same and also connecting external BT receivers helps.

Do you know why we have this issue and if it can be solved somehow on the firmware level or operating system level? Is this connected to the power problems somehow?
It must be firmware or hardware problem I suppose... But no idea...

I think there is no link with the power problems. I have tried with 1.2A/5V power supply and now I have the official 2.5A/5.1V power supply and the issue is still there...

User avatar
with ice cream
Posts: 144
Joined: Mon Jul 30, 2012 7:25 am

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

Fri Jul 01, 2016 4:55 pm

A few days ago I started putting my Pi 3s bluetooth to use and noticed a serious decrease in wifi performance. Whenever I resolve a bluetooth device's name (to check for its presence) wifi ping times to the router go up from millseconds to full seconds. ssh sessions get dropped.

Test it yourself: in one session run

Code: Select all

ping 192.168.1.1
in another session try to look up a BT name:

Code: Select all

hcitool name 11:11:11:11:11:11
.

Molodax
Posts: 1
Joined: Wed Jan 25, 2017 6:34 pm

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

Wed Jan 25, 2017 6:42 pm

is there any update regarding the issue?

Xarathos
Posts: 12
Joined: Sat Jan 07, 2017 11:59 pm

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

Thu Jan 26, 2017 12:10 am

Hello 1st time poster. I've just received a Raspberry Pi 3. And I'm trying to use a Bluetooth speaker that i know to be in good working order. I'm not using a USB adapter. I've followed the instructions posted here. http://youness.net/raspberry-pi/bluetoo ... spberry-pi
And it doesn't work after multiple attempts. It disconnects right away. When I go to Sound & Video PulseAudio I see "Fatal Error: Unable to connect to PulseAudio:OK". Any suggestions?

sleepermjs
Posts: 1
Joined: Thu Jan 26, 2017 12:15 am

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

Thu Jan 26, 2017 12:33 am

Seems like this has been an issue for a long time. Any movement on the matter? I would be willing to help troubleshoot with someone who knows better then I.
RetroPie 4.1.X - Rpi3 Overclocked 64 GB Samsung Evo+ - 8bitdo NES 30 Pro

User avatar
Douglas6
Posts: 4472
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

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

Thu Jan 26, 2017 1:15 am

"This issue" is actually at least two very separate issues.
1. The Pi3's on board Bluetooth and WiFi seem to conflict with each other, causing stuttering and unstable Bluetooth streaming, and/or decreased WiFi performance. This issue is widely reported but unacknowledged, as far as I can tell, by the RPF. That may well be because the Bluetooth/WiFi firmware is supported by Broadcom, not the RPF. Or, it could be a design problem of the Pi3 board design, which probably will not be redesigned.
2. Many people have problems pairing and connecting the Pi3, and some devices seem to have problems re-connecting.

Issue one has no solution apart from using a Bluetooth or WiFi dongle on the Pi3. Issue two can usually be solved with information or work-arounds.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1909
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

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

Thu Jan 26, 2017 5:41 pm

Cypress (Broadcom as was) are now investigating a number of BT+WiFi issues.

User avatar
Douglas6
Posts: 4472
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

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

Thu Jan 26, 2017 5:50 pm

Thank you! That's very good to hear.

Xarathos
Posts: 12
Joined: Sat Jan 07, 2017 11:59 pm

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

Thu Jan 26, 2017 10:08 pm

Can anyone recommend a USB Bluetooth adapter for the Pi 3?

User avatar
Douglas6
Posts: 4472
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

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

Thu Jan 26, 2017 10:34 pm

I've had success with Bluetooth dongles based on the CSR and Broadcom (now Cypress) chipsets. Avoid cheap Asian knock-offs.

Xarathos
Posts: 12
Joined: Sat Jan 07, 2017 11:59 pm

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

Thu Jan 26, 2017 10:36 pm

Thanks. Any specific make/model? I've seen CSR 4.0, but not any 4.1 yet.

User avatar
Douglas6
Posts: 4472
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

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

Thu Jan 26, 2017 10:51 pm

No. I get most of my electronics from Adafruit, but you can probably find cheaper.

Xarathos
Posts: 12
Joined: Sat Jan 07, 2017 11:59 pm

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

Thu Jan 26, 2017 10:54 pm

Thanks. I usually use Amazon. I may try this one. https://www.amazon.com/Plugable-Bluetoo ... ess2016-20

dukla2000
Posts: 190
Joined: Tue Jan 10, 2012 12:02 am
Location: Reading.UK.EU

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

Fri Jan 27, 2017 4:12 pm

PhilE wrote:Cypress (Broadcom as was) are now investigating a number of BT+WiFi issues.
Ditto Douglas6 - good to hear.
Xarathos wrote:Any specific make/model? I've seen CSR 4.0, but not any 4.1 yet.
I got a cheap (GBP2.00) CSR4.0 Asian knockoff (on fleabay) that works fine for me. Dunnoh the chipset, presume CSR based on

Code: Select all

[email protected]:~ $ lsusb
Bus 001 Device 006: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Daily driver: Pi3B, 64GB Samsung Evo+ @100MHz, DVB-T, onboard WiFi for internet, BT/USB dongle for KB/mouse, 250GB HDD via USB for media, Raspbian Jessie Lite with Openbox desktop.
Museum: Pi B

Return to “Troubleshooting”