0

Problem

Looking in /var/log/syslog, I see a lot of messages like this:

Bluetooth: hci0: Frame reassembly failed (-84)

Here's a recent segment from the logs:

Jul  9 02:23:34 apple-pi kernel: [ 3268.950722] Bluetooth: hci0: Frame reassembly failed (-84)
Jul  9 02:23:34 apple-pi kernel: [ 3268.950757] Bluetooth: hci0: Frame reassembly failed (-84)
Jul  9 02:23:34 apple-pi kernel: [ 3268.950880] Bluetooth: hci0: Frame reassembly failed (-84)
Jul  9 02:23:34 apple-pi kernel: [ 3268.950969] Bluetooth: hci0: Frame reassembly failed (-84)
Jul  9 02:23:34 apple-pi kernel: [ 3268.951036] Bluetooth: hci0: Frame reassembly failed (-84)
Jul  9 02:29:49 apple-pi kernel: [ 3644.611839] Bluetooth: hci0: Frame reassembly failed (-84)
Jul  9 02:29:49 apple-pi kernel: [ 3644.611897] Bluetooth: hci0: Frame reassembly failed (-84)
Jul  9 02:33:37 apple-pi kernel: [ 3872.489074] Bluetooth: hci0: Frame reassembly failed (-84)
Jul  9 02:33:37 apple-pi kernel: [ 3872.489105] Bluetooth: hci0: Frame reassembly failed (-84)
Jul  9 06:31:43 apple-pi kernel: [18157.805679] Bluetooth: hci0: Frame reassembly failed (-84)
Jul  9 06:31:43 apple-pi kernel: [18157.805712] Bluetooth: hci0: Frame reassembly failed (-84)
Jul  9 06:31:43 apple-pi kernel: [18157.805829] Bluetooth: hci0: Frame reassembly failed (-84)

It appears they're in pairs of two.

Info

I'm running fliclib-linux-hci on my box and noticed that after updating Stretch packages recently, these messages show up after some time and cause fliclib to crash on this box. Even upgrading to Buster, nothing changed.

This is a Raspberry Pi 3 Model B and the OS was originally Jessie before being upgraded over time. This unit worked fine until just last week when I ran these updates.

I have 3 other Raspberry Pi Zero Ws, also now on Buster and upgraded in the same way since Jessie. They are not showing these errors or having any issues.

How fliclib Works

Each Raspberry Pi (of the 4) have their own fliclib service running. The binary file comes in this package.

fliclib-linux-hci/bin/armv6l/flicd -f ~/flic-db.sqlite3 -w -s 0.0.0.0 -d

It listens for Bluetooth commands and allows a client application to connect. It will not listen for Bluetooth commands until there is a connected client.

I'm running the fliclib client in Node.js, and it can connect to multiple servers at the same time. I run a single application which listens to all 4 fliclib servers for Bluetooth commands.

I've been running this software for years. Only my Pi 3 is experiencing the issue and only after updating the apt packages while it was still Stretch.

Manual Temp Fixes

By restarting the Pi 3, I can "fix" the issue.

Without a restart, there's another way to correct the issue:

  1. sudo htop
  2. If the fliclib service doesn't show up, run steps 4 and 5, and then come back to 3 (yes, it's dumb).
  3. Kill the fliclib process: [F9][9][F10].
  4. sudo service bluetooth restart
  5. fliclib-linux-hci/bin/armv6l/flicd -f ~/flic-db.sqlite3 -w -s 0.0.0.0 -d
  6. Restart client application.

After doing these commands, this is what I'm seeing in syslog:

Jul  9 16:03:18 apple-pi kernel: [52452.774969] Bluetooth: hci0: command 0x1003 tx timeout
Jul  9 16:03:18 apple-pi bluetoothd[457]: Loading LTKs timed out for hci0
Jul  9 16:03:20 apple-pi kernel: [52454.854976] Bluetooth: hci0: command 0x1001 tx timeout
Jul  9 16:03:22 apple-pi kernel: [52456.934969] Bluetooth: hci0: command 0x1009 tx timeout
Jul  9 16:03:26 apple-pi bluetoothd[457]: Failed to set mode: Failed (0x03)
Jul  9 16:04:21 apple-pi bluetoothd[457]: Terminating
Jul  9 16:04:21 apple-pi bluetoothd[457]: Stopping SDP server
Jul  9 16:04:21 apple-pi bluetoothd[457]: Exit
Jul  9 16:04:21 apple-pi systemd[1]: Stopping Bluetooth service...
Jul  9 16:04:21 apple-pi systemd[1]: bluetooth.service: Succeeded.
Jul  9 16:04:21 apple-pi systemd[1]: Stopped Bluetooth service.
Jul  9 16:04:21 apple-pi systemd[1]: Starting Bluetooth service...
Jul  9 16:04:21 apple-pi bluetoothd[4267]: Bluetooth daemon 5.50
Jul  9 16:04:21 apple-pi systemd[1]: Started Bluetooth service.
Jul  9 16:04:21 apple-pi bluetoothd[4267]: Starting SDP server
Jul  9 16:04:21 apple-pi bluetoothd[4267]: Excluding (cli) sap
Jul  9 16:04:21 apple-pi bluetoothd[4267]: Bluetooth management interface 1.14 initialized
Jul  9 16:04:21 apple-pi kernel: [52516.634675] Bluetooth: hci0: Frame reassembly failed (-84)
Jul  9 16:04:21 apple-pi dbus-daemon[324]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.64' (uid=0 pid=4267 comm="/usr/lib/bluetooth/bluetoothd --noplugin=sap ")
Jul  9 16:04:24 apple-pi kernel: [52518.694784] Bluetooth: hci0: command 0x1003 tx timeout

Everything works until a bunch of Frame reassembly failed (-84) messages appear. They usually appear within an hour or two, and I don't need to touch any Flic buttons.

Question

How do I figure out what's wrong with my Pi so I can stop these errors from showing up and crashing fliclib?

I don't think I need separate Bluetooth adapter because this worked for 2 years until a week ago.

I also don't think it's specifically fliclib or my Node.js client application because those were also working fine until the OS update; plus, my other units are running fliclib just fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.