Danielya
Posts: 15
Joined: Thu May 04, 2017 12:25 pm

Tons of Bluetooth: hci0: Frame reassembly failed (-84) messa

Mon Jul 24, 2017 5:23 am

Sorry in advance if the explanation is too general, I can attach code if needed...

I'm working on a project where a python program is running in a device, and a Bluetooth socket is opened and listening to incoming connections and data which come from those connections. On the other side I have a mobile application that pairs with the device and sends data. The device can receive commands like recording video or doing some image processing using the camera it's attached to with OpenCV library. I tried to run this in different boards, and now I run it on Raspberry Pi 3.

Everything works ok, Bluetooth-wise, when the system is not "busy" (e.g. no recording or image processing is done), but once I activate one of those, and then exits the mobile application and re-run it, the app is unable to connect via Bluetooth to my raspberry again...in the raspberry's syslog I get a lot of error message as I mentioned in the title, and eventually the connection fails. The connection is able to be made only when I manually shut down the busy processes (image processing or recording)...

What can I do to make it more robust? What am I missing? I tried to update the Bluetooth and bluez, uninstall and reinstall, nothing helps...

EDIT 1:
I realized that it has something to do with the camera driver! I shut down my program running on the RPi, leaving only the bluetooth socket open and a shell command of "avconv" (RPi equivalent of ffmpeg) that takes frames from the camera into a file. Once I ran that, I kept getting those error messages. When I stopped the command, I could pair back again...

EDIT 2:
With the raspi camera module it works ok, but with USB camera, as I desire, it doesn't...

Thanks in advance

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24174
Joined: Sat Jul 30, 2011 7:41 pm

Re: Tons of Bluetooth: hci0: Frame reassembly failed (-84) messa

Thu Jul 27, 2017 2:25 pm

What resolution are you running the camera at? What are the specific commands you are using?

Is there some reason why you cannot use the Pi camera which would dramatically reduce the CPU load, and should improve USB response.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

Danielya
Posts: 15
Joined: Thu May 04, 2017 12:25 pm

Re: Tons of Bluetooth: hci0: Frame reassembly failed (-84) messa

Sun Jul 30, 2017 3:02 am

Here's the command:
ffmpeg -y -f video4linux2 -i /dev/video0 -s 640x480 -r 25 -f h264 output.avi
Tried with and without "sudo".

Danielya
Posts: 15
Joined: Thu May 04, 2017 12:25 pm

Re: Tons of Bluetooth: hci0: Frame reassembly failed (-84) messa

Wed Aug 16, 2017 5:38 am

Hello,
are there any updates?

whitelynx
Posts: 2
Joined: Thu Dec 20, 2012 7:23 am

Re: Tons of Bluetooth: hci0: Frame reassembly failed (-84) messa

Sun Apr 08, 2018 2:34 am

Sorry to necro a thread, but I'm having exactly this same behavior, just in a slightly different situation.

I'm trying to build a car radio replacement with support for Bluetooth audio, using a Raspberry Pi Model 3B+. I have it working, but every few seconds, I get a block of those

Code: Select all

Bluetooth: hci1: Frame reassembly failed (-84)
messages, and the audio skips slightly. Every once in a while, that block of messages is preceded by another message:

Code: Select all

Bluetooth: hci1 ACL packet for unknown connection handle 608
I'm going to keep digging into the Bluetooth system and figure out if there's something I can do to prevent these issues, but I was wondering if anyone here had any insight.

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

Re: Tons of Bluetooth: hci0: Frame reassembly failed (-84) messa

Mon Apr 23, 2018 8:45 pm

whitelynx wrote:
Sun Apr 08, 2018 2:34 am
Sorry to necro a thread, but I'm having exactly this same behavior, just in a slightly different situation.

I'm trying to build a car radio replacement with support for Bluetooth audio, using a Raspberry Pi Model 3B+. I have it working, but every few seconds, I get a block of those

Code: Select all

Bluetooth: hci1: Frame reassembly failed (-84)
messages, and the audio skips slightly. Every once in a while, that block of messages is preceded by another message:

Code: Select all

Bluetooth: hci1 ACL packet for unknown connection handle 608
I'm going to keep digging into the Bluetooth system and figure out if there's something I can do to prevent these issues, but I was wondering if anyone here had any insight.
I've had this very issue for a couple years and counting. From what I've been able to find, older versions of the 3B (rev 1.2) had no flow control hooked up to the Bluetooth chip (source: https://github.com/raspberrypi/linux/issues/2264). I wonder if the 3B+ has gone without hooking up this flow control again. I can only speculate. It just seems crazy to me that a 1.2ghz+ quad core processor could ever get too busy to suck data out of a FIFO for a peripheral going at 921600 bps.

Standard workaround is to use a USB Bluetooth dongle.

whitelynx
Posts: 2
Joined: Thu Dec 20, 2012 7:23 am

Re: Tons of Bluetooth: hci0: Frame reassembly failed (-84) messa

Mon Oct 01, 2018 12:49 am

fury wrote:
Mon Apr 23, 2018 8:45 pm
I've had this very issue for a couple years and counting. From what I've been able to find, older versions of the 3B (rev 1.2) had no flow control hooked up to the Bluetooth chip (source: https://github.com/raspberrypi/linux/issues/2264). I wonder if the 3B+ has gone without hooking up this flow control again. I can only speculate. It just seems crazy to me that a 1.2ghz+ quad core processor could ever get too busy to suck data out of a FIFO for a peripheral going at 921600 bps.

Standard workaround is to use a USB Bluetooth dongle.
Damn. I was really hoping to avoid having to use a USB BT dongle - I'm already running way too much over USB. I need to do jitter-free audio playback over a USB device (basically 4.1 surround audio) from a Bluetooth stream, as well as interface with a USB GPS and a USB tethered internet connection. I'll definitely need to look into using a powered hub, since there's no way this will all run off the Pi's power, but at this point I'm not even sure if the Pi's USB bandwidth will hold up to what I need it to do. At least I was able to use the on-board connectors for the camera and display.

Return to “Python”