ddmitry1973
Posts: 12
Joined: Thu Apr 20, 2017 6:57 am

Pi 3 bluetooth not working when usb webcam is accessed

Mon May 29, 2017 3:15 pm

Hi everyone, got mysterious problem.
Can anyone help?

In brief: onboard BT adapter works very poor when external USB webcam is being used to capture video.

In details: when I try to capture video from webcam, connected via usb to my Pi 3, bluetooth transmission hangs due errors in kernel. When I stop capture, everything is fine again.

syslog output:

Code: Select all

May 29 10:33:24 raspberrypi kernel: [  180.866013] Bluetooth: hci0 SCO packet for unknown connection handle 2
May 29 10:33:24 raspberrypi kernel: [  180.866080] Bluetooth: hci0: Frame reassembly failed (-84)
May 29 10:33:24 raspberrypi kernel: [  180.866142] Bluetooth: hci0: Frame reassembly failed (-84)
May 29 10:33:31 raspberrypi kernel: [  187.890840] Bluetooth: hci0: Frame reassembly failed (-84)
May 29 10:33:33 raspberrypi kernel: [  189.890289] Bluetooth: hci0 command 0x0411 tx timeout
May 29 10:33:33 raspberrypi kernel: [  190.132443] Bluetooth: hci0: Frame reassembly failed (-84)
May 29 10:33:33 raspberrypi kernel: [  190.338437] Bluetooth: hci0: Frame reassembly failed (-84)
May 29 10:33:38 raspberrypi bluetoothd[613]: HUP or ERR on socket: Connection timed out (110)
This "Frame reassembly failed (-84)" message could be repeated literally hundreds of times as long as capture goes on.

environment details:
- raspbian image 2017-01-11-raspbian-jessie-lite
- 'uname -a' => Linux raspberrypi 4.4.34-v7+ #930 SMP Wed Nov 23 15:20:41 GMT 2016 armv7l GNU/Linux
- bluez 5.23-2+rpi2
- I'm using Pi in console mode, no gui installed. Error happens with either ffmpeg or gstreamer being used to capture - I tried both.
- Stream captured: 640x480x10fps

I suppose this bug is not related to capture software. I'm not so familiar with gstreamer, but when I launch ffmpeg to encode some test video in parallel with BT transmission , all works fine. So, It's somehow connected to camera access.
First thought was may be camera is taking all usb bandwidth, so almost nothing left for bluetooth, but I can do capture from TWO cameras in parallel with no errors in output videos. Very strange...

regarding possible proposals:
- yes, I tried to upgrade system 'sudo apt-get upgrade' - it changes nothing
- and, yes, I tried different webcam (three, actually)
- more, I tried another Pi 3 box with same results
- and tried on 'fresh' system
- and with different capture settings

Ready to provide further details if needed.

Please, advice
Thanks in advance
BR, D.

User avatar
B.Goode
Posts: 8864
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Pi 3 bluetooth not working when usb webcam is accessed

Mon May 29, 2017 3:20 pm

Possibly power starvation when the external camera is active?

What arrangements do you have for powering your RPi and its attached devices?

ddmitry1973
Posts: 12
Joined: Thu Apr 20, 2017 6:57 am

Re: Pi 3 bluetooth not working when usb webcam is accessed

Mon May 29, 2017 3:23 pm

Hi, I'm using Official Raspberry Pi 3 Universal Power Supply,
camera receives supply through usb port

User avatar
B.Goode
Posts: 8864
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Pi 3 bluetooth not working when usb webcam is accessed

Mon May 29, 2017 3:30 pm

Hopefully not power then.

Some sort of radiated interference from the usb cable to the camera? Does re-routing the camera cable make any difference?

You have tried more than one camera: have you also tried more than one usb cable?

ddmitry1973
Posts: 12
Joined: Thu Apr 20, 2017 6:57 am

Re: Pi 3 bluetooth not working when usb webcam is accessed

Mon May 29, 2017 3:39 pm

Some sort of radiated interference from the usb cable to the camera? Does re-routing the camera cable make any difference?

You have tried more than one camera: have you also tried more than one usb cable?
Three cams - three cables, as each camera has own cable which is not changeable.
I don't think it anyhow related to camera/cable position vs pi.

User avatar
B.Goode
Posts: 8864
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Pi 3 bluetooth not working when usb webcam is accessed

Mon May 29, 2017 3:41 pm

I have no further suggestions. Good luck with getting this resolved.

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

Re: Pi 3 bluetooth not working when usb webcam is accessed

Mon May 29, 2017 5:06 pm

Are you capturing the video locally, or are you perhaps streaming it over WiFi?


ddmitry1973
Posts: 12
Joined: Thu Apr 20, 2017 6:57 am

Re: Pi 3 bluetooth not working when usb webcam is accessed

Wed May 31, 2017 1:27 pm

Sorry for 'up'ing' may be anyone can advice, at least direction, to dig in?

fury
Posts: 15
Joined: Thu Sep 20, 2012 4:37 pm

Re: Pi 3 bluetooth not working when usb webcam is accessed

Fri Jul 07, 2017 3:00 pm

Probably a hardware design problem. Either that, or nobody has figured out how to fix the driver for the UART that it's using so that it doesn't have so many errors. I have to use a USB Bluetooth dongle to get acceptable Bluetooth performance. In my case it's audio streaming that doesn't work. I've tried on Raspbian and on Automotive Grade Linux. There are a few threads every now and then about this, here's a couple.

viewtopic.php?f=28&t=151633

viewtopic.php?f=35&t=172362

If you stumble upon a solution for the built-in Bluetooth, please follow up, cause I'd like to conserve my Bluetooth dongles for boards that don't have it built in. :)

ddmitry1973
Posts: 12
Joined: Thu Apr 20, 2017 6:57 am

Re: Pi 3 bluetooth not working when usb webcam is accessed

Sat Feb 03, 2018 4:15 pm

Update: with external usb BT adapter all is fine. Conclusion: something wrong with h/w or drivers of internal one. Consider topic is closed.

Return to “Troubleshooting”