Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth: hci0: Frame reassembly failed (-84) #1150

Open
risa2000 opened this issue Jun 5, 2019 · 138 comments
Open

Bluetooth: hci0: Frame reassembly failed (-84) #1150

risa2000 opened this issue Jun 5, 2019 · 138 comments

Comments

@risa2000
Copy link

risa2000 commented Jun 5, 2019

After the last system upgrade of Raspbian to:

pi@hass:~ $ uname -a
Linux hass 4.19.42-v7+ #1219 SMP Tue May 14 21:20:58 BST 2019 armv7l GNU/Linux

I am observing a problem with bluetooth, which, after some time, stops working. The kernel log shows repeating message

Bluetooth: hci0: Frame reassembly failed (-84)

or sometimes also a stack dump (I do not have one right now).

The RPi is 3B the dmesg log is here: dmesg.log

The HCI configuration is:

pi@hass:~ $ hciconfig -a
hci0:   Type: Primary  Bus: UART
        BD Address: B8:27:EB:A1:A8:DE  ACL MTU: 1021:8  SCO MTU: 64:1
        UP RUNNING
        RX bytes:1733551 acl:20475 sco:1 events:67235 errors:0
        TX bytes:387061 acl:5214 sco:0 commands:27972 errors:0
        Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH SNIFF
        Link mode: SLAVE ACCEPT
        Name: 'hass'
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous,
        HCI Version: 4.1 (0x7)  Revision: 0x168
        LMP Version: 4.1 (0x7)  Subversion: 0x2209
        Manufacturer: Broadcom Corporation (15)

Now my BT usage is a bit specific. The main role for this RPi is running homeassistant, which means (among others) having: USB flash stick (with f2fs for logging), Z-Wave USB stick for home automation, Zigbee USB stick for home automation, and also using built-in BT for tracking BT hygrothermo devices.

Apart from that, I also (ab)use the built-in BT for controlling Valve's lighthouses. Both the hygrothermo devices and the lighthouses use BTLE protocol. HT devices are read-out every 2 minutes, the lighthouses (when running) are talked to every 20 seconds.

When I do not run the lighthouses there is no communication with them and the error seems far less likely to happen. When I run a VR session, and run the lighthouse control, after some time, the BT becomes unresponsive, the errors are logged in the kernel log and the only resolution is a reboot.

Before the last system (and I assume also the firmware) upgrade, the system worked, in the exactly same configuration, fine, for several months.

@pelwell
Copy link
Contributor

pelwell commented Jun 5, 2019

The 3B doesn't have the flow control signals hooked up to the BT modem - we were short of pins - so it is possible for characters to get lost under load (especially interrupt load). What sort of data rate is typical for your application? If the rate is low, you may find that reducing the baud rate by editing /usr/bin/btuart gets a more stable connection.

@risa2000
Copy link
Author

risa2000 commented Jun 9, 2019

@pelwell I believe I can go with lower rate, my use is light and also nothing happens if one packet is lost.

What however bothers me (and I am not sure it is actually evident from the message as I am not familiar with BT) is not the intermittent corruption of the data, but the fact that BT becomes completely unresponsive.

This is what started to happen (I believe) with the latest update. I had some missed comms before, but then, the comm recovered the next time the connection was retried and it never led to the state where I need to reboot the RPi to get BT working again.

@J-Luc16
Copy link

J-Luc16 commented Jul 2, 2019

built-in BT for tracking BT hygrothermo devices.

Same sort of application (temp+hygro for a plant dryer), same issue since the last kernel update (may ?) on my PI3,

I have put an USB dongle and it works, but I am not happy with this solution, the integrated BTLE of PI3 was stable for months before, now it crashes within one day or 2.

@GorkaMM
Copy link

GorkaMM commented Jul 4, 2019

It stopped working for me too on my Raspberry Pi 3 after the update.

@codyc1515
Copy link

I am having this issue as well and it's just continuous of the following.

[98613.228402] Bluetooth: hci0: SCO packet for unknown connection handle 23967
[98659.629015] Bluetooth: hci0: Frame reassembly failed (-84)
[98659.629051] Bluetooth: hci0: hardware error 0xc5

My version is Linux hoobs 4.19.42-v7+ #1219 SMP Tue May 14 21:20:58 BST 2019 armv7l GNU/Linux.

@codyc1515
Copy link

This worked for me:

sudo rpi-update c50c65e52bad69e8fa7d6576d9e2399eade7faf6

@J-Luc16
Copy link

J-Luc16 commented Jul 10, 2019

Cool, is this workaround a regression to the previous version of the firmware ?

@pelwell
Copy link
Contributor

pelwell commented Jul 10, 2019

There may be a related issue - #1017. I've found a driver/hardware bug with a simple workaround which I'm prepared to merge if the real fix doesn't appear soon.

@pelwell
Copy link
Contributor

pelwell commented Jul 11, 2019

A real fix has been found and pushed to rpi-4.19.y - see raspberrypi/linux@9bf5cd2

Hopefully a firmware with the fix will be released in the next few days.

@milou161185
Copy link

hi, i have the same problem and the fix "sudo rpi-update c50c65e52bad69e8fa7d6576d9e2399eade7faf6" don't worked for me. Is the new firmware corrected available? If no, is there any other workaround?

@bieniu
Copy link

bieniu commented Aug 2, 2019

@milou161185 I had to downgrade kernel to version 4.14.98 to fix this issue.

@pelwell
Copy link
Contributor

pelwell commented Aug 2, 2019

I don't know where you got that commit hash, but it's wrong. Try sudo rpi-update 43fa687c, which at least includes the patch.

@milou161185
Copy link

thanks @pelwell but i try "sudo rpi-update 43fa687c" and i have the same error in the log

@pelwell
Copy link
Contributor

pelwell commented Aug 2, 2019

  1. Which platform are you on?

  2. Which distribution are you running?

  3. What are you doing when the error appears?

  4. How long does the error take to occur?

@milou161185
Copy link

1 : Linux raspberrypi 4.19.58-v7+ #1245 SMP Fri Jul 12 17:25:51 BST 2019 armv7l GNU/Linux
2 : Raspbian GNU/Linux 9 \n \l
3 : nothing, just after booting
4 : these errors appeared after an update

@pelwell
Copy link
Contributor

pelwell commented Aug 2, 2019

  1. Which model of Raspberry Pi?

  2. And they happen after every reboot?

Please paste the output of dmesg after booting.

@milou161185
Copy link

milou161185 commented Aug 5, 2019

5 : Pi model 3B
6 : yes after every reboot

dmesg :

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.19.58-v7+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1245 SMP Fri Jul 12 17:25:51 BST 2019
[ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Rev 1.2
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] cma: Reserved 8 MiB at 0x36800000
[ 0.000000] On node 0 totalpages: 225280
[ 0.000000] Normal zone: 1980 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 225280 pages, LIFO batch:63
[ 0.000000] random: get_random_bytes called from start_kernel+0xac/0x4b4 with crng_init=0
[ 0.000000] percpu: Embedded 17 pages/cpu s39488 r8192 d21952 u69632
[ 0.000000] pcpu-alloc: s39488 r8192 d21952 u69632 alloc=17*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 223300
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 bcm2708_fb.fbwidth=800 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 870068K/901120K available (8192K kernel code, 629K rwdata, 2176K rodata, 1024K init, 821K bss, 22860K reserved, 8192K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xb7800000 - 0xff800000 (1152 MB)
lowmem : 0x80000000 - 0xb7000000 ( 880 MB)
modules : 0x7f000000 - 0x80000000 ( 16 MB)
.text : 0x(ptrval) - 0x(ptrval) (9184 kB)
.init : 0x(ptrval) - 0x(ptrval) (1024 kB)
.data : 0x(ptrval) - 0x(ptrval) ( 630 kB)
.bss : 0x(ptrval) - 0x(ptrval) ( 822 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] ftrace: allocating 26351 entries in 78 pages
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[ 0.000007] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[ 0.000023] Switching to timer-based delay loop, resolution 52ns
[ 0.000286] Console: colour dummy device 80x30
[ 0.000906] console [tty1] enabled
[ 0.000962] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[ 0.001008] pid_max: default: 32768 minimum: 301
[ 0.001365] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.001401] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.002343] CPU: Testing write buffer coherency: ok
[ 0.002826] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.003500] Setting up static identity map for 0x100000 - 0x10003c
[ 0.003667] rcu: Hierarchical SRCU implementation.
[ 0.004484] smp: Bringing up secondary CPUs ...
[ 0.005345] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.006269] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[ 0.007131] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[ 0.007251] smp: Brought up 1 node, 4 CPUs
[ 0.007334] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[ 0.007358] CPU: All CPU(s) started in HYP mode.
[ 0.007378] CPU: Virtualization extensions available.
[ 0.008361] devtmpfs: initialized
[ 0.021351] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[ 0.021626] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.021674] futex hash table entries: 1024 (order: 4, 65536 bytes)
[ 0.022283] pinctrl core: initialized pinctrl subsystem
[ 0.023158] NET: Registered protocol family 16
[ 0.026120] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[ 0.031782] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.031818] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.032039] Serial: AMBA PL011 UART driver
[ 0.034583] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[ 0.069412] bcm2835-dma 3f007000.dma: DMA legacy API manager at (ptrval), dmachans=0x1
[ 0.071345] SCSI subsystem initialized
[ 0.071582] usbcore: registered new interface driver usbfs
[ 0.071664] usbcore: registered new interface driver hub
[ 0.071776] usbcore: registered new device driver usb
[ 0.090289] raspberrypi-firmware soc:firmware: Attached to firmware from 2019-07-12 17:39, variant start_x
[ 0.100122] raspberrypi-firmware soc:firmware: Firmware hash is 578479b20dbfea64cd822278fb70eee7a56c97e4
[ 0.111802] clocksource: Switched to clocksource arch_sys_counter
[ 0.201721] VFS: Disk quotas dquot_6.6.0
[ 0.201853] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.202064] FS-Cache: Loaded
[ 0.202290] CacheFiles: Loaded
[ 0.212301] NET: Registered protocol family 2
[ 0.213088] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[ 0.213153] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.213285] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.213490] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.213643] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 0.213709] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 0.214036] NET: Registered protocol family 1
[ 0.214636] RPC: Registered named UNIX socket transport module.
[ 0.214663] RPC: Registered udp transport module.
[ 0.214685] RPC: Registered tcp transport module.
[ 0.214706] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.216361] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
[ 0.219396] Initialise system trusted keyrings
[ 0.219605] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[ 0.229338] FS-Cache: Netfs 'nfs' registered for caching
[ 0.229917] NFS: Registering the id_resolver key type
[ 0.229961] Key type id_resolver registered
[ 0.229984] Key type id_legacy registered
[ 0.230015] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.232374] Key type asymmetric registered
[ 0.232406] Asymmetric key parser 'x509' registered
[ 0.232474] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[ 0.232660] io scheduler noop registered
[ 0.232685] io scheduler deadline registered (default)
[ 0.232893] io scheduler cfq registered
[ 0.232917] io scheduler mq-deadline registered (default)
[ 0.232942] io scheduler kyber registered
[ 0.236164] bcm2708_fb soc:fb: FB found 1 display(s)
[ 0.248117] Console: switching to colour frame buffer device 100x30
[ 0.256924] bcm2708_fb soc:fb: Registered framebuffer for display 0, size 800x480
[ 0.261910] bcm2835-rng 3f104000.rng: hwrng registered
[ 0.265029] vc-mem: phys_addr:0x00000000 mem_base=0x3dc00000 mem_size:0x3f000000(1008 MiB)
[ 0.268583] vc-sm: Videocore shared memory driver
[ 0.272015] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[ 0.285893] brd: module loaded
[ 0.298948] loop: module loaded
[ 0.302593] Loading iSCSI transport class v2.0-870.
[ 0.306237] libphy: Fixed MDIO Bus: probed
[ 0.309241] usbcore: registered new interface driver lan78xx
[ 0.312305] usbcore: registered new interface driver smsc95xx
[ 0.315210] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[ 0.346028] dwc_otg 3f980000.usb: base=(ptrval)
[ 0.549149] Core Release: 2.80a
[ 0.552002] Setting default values for core params
[ 0.554881] Finished setting default values for core params
[ 0.758005] Using Buffer DMA mode
[ 0.760749] Periodic Transfer Interrupt Enhancement - disabled
[ 0.763597] Multiprocessor Interrupt Enhancement - disabled
[ 0.766471] OTG VER PARAM: 0, OTG VER FLAG: 0
[ 0.769360] Dedicated Tx FIFOs mode
[ 0.772682] WARN::dwc_otg_hcd_init:1045: FIQ DMA bounce buffers: virt = b6904000 dma = 0xf6904000 len=9024
[ 0.778803] FIQ FSM acceleration enabled for :
Non-periodic Split Transactions
Periodic Split Transactions
High-Speed Isochronous Endpoints
Interrupt/Control Split Transaction hack enabled
[ 0.793368] dwc_otg: Microframe scheduler enabled
[ 0.793425] WARN::hcd_init_fiq:457: FIQ on core 1
[ 0.796170] WARN::hcd_init_fiq:458: FIQ ASM at 80650e04 length 36
[ 0.798850] WARN::hcd_init_fiq:497: MPHI regs_base at b7810000
[ 0.801548] dwc_otg 3f980000.usb: DWC OTG Controller
[ 0.804299] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[ 0.807087] dwc_otg 3f980000.usb: irq 56, io mem 0x00000000
[ 0.809838] Init: Port Power? op_state=1
[ 0.812599] Init: Power Port (0)
[ 0.815521] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[ 0.818398] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.821276] usb usb1: Product: DWC OTG Controller
[ 0.824148] usb usb1: Manufacturer: Linux 4.19.58-v7+ dwc_otg_hcd
[ 0.827028] usb usb1: SerialNumber: 3f980000.usb
[ 0.830466] hub 1-0:1.0: USB hub found
[ 0.833307] hub 1-0:1.0: 1 port detected
[ 0.836598] dwc_otg: FIQ enabled
[ 0.836604] dwc_otg: NAK holdoff enabled
[ 0.836610] dwc_otg: FIQ split-transaction FSM enabled
[ 0.836621] Module dwc_common_port init
[ 0.836896] usbcore: registered new interface driver usb-storage
[ 0.839845] mousedev: PS/2 mouse device common for all mice
[ 0.843544] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[ 0.846540] bcm2835-cpufreq: min=600000 max=1200000
[ 0.849640] sdhci: Secure Digital Host Controller Interface driver
[ 0.852344] sdhci: Copyright(c) Pierre Ossman
[ 0.855391] mmc-bcm2835 3f300000.mmcnr: could not get clk, deferring probe
[ 0.858582] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe
[ 0.861580] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.866011] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.869095] hidraw: raw HID events driver (C) Jiri Kosina
[ 0.872251] usbcore: registered new interface driver usbhid
[ 0.875215] usbhid: USB HID core driver
[ 0.878891] vchiq: vchiq_init_state: slot_zero = (ptrval), is_master = 0
[ 0.883480] [vc_sm_connected_init]: start
[ 0.893215] [vc_sm_connected_init]: end - returning 0
[ 0.897271] Initializing XFRM netlink socket
[ 0.900250] NET: Registered protocol family 17
[ 0.903271] Key type dns_resolver registered
[ 0.906558] Registering SWP/SWPB emulation handler
[ 0.910017] registered taskstats version 1
[ 0.912830] Loading compiled-in X.509 certificates
[ 0.922774] uart-pl011 3f201000.serial: cts_event_workaround enabled
[ 0.925749] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 81, base_baud = 0) is a PL011 rev2
[ 0.930728] mmc-bcm2835 3f300000.mmcnr: mmc_debug:0 mmc_debug2:0
[ 0.933859] mmc-bcm2835 3f300000.mmcnr: DMA channel allocated
[ 0.963072] sdhost: log_buf @ (ptrval) (f6907000)
[ 1.000930] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[ 1.005537] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1.009997] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1.015636] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[ 1.018341] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[ 1.022291] of_cfs_init
[ 1.024962] of_cfs_init: OK
[ 1.028062] Waiting for root device /dev/mmcblk0p7...
[ 1.052013] Indeed it is in host mode hprt0 = 00021501
[ 1.126003] random: fast init done
[ 1.172861] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.179146] mmc0: new high speed SDHC card at address aaaa
[ 1.182932] mmcblk0: mmc0:aaaa SC16G 14.8 GiB
[ 1.193802] mmcblk0: p1 p2 < p5 p6 p7 >
[ 1.210440] mmc1: new high speed SDIO card at address 0001
[ 1.216584] EXT4-fs (mmcblk0p7): mounted filesystem with ordered data mode. Opts: (null)
[ 1.219398] VFS: Mounted root (ext4 filesystem) readonly on device 179:7.
[ 1.230383] devtmpfs: mounted
[ 1.238509] Freeing unused kernel memory: 1024K
[ 1.261846] usb 1-1: new high-speed USB device number 2 using dwc_otg
[ 1.264793] Indeed it is in host mode hprt0 = 00001101
[ 1.327902] Run /sbin/init as init process
[ 1.502159] usb 1-1: New USB device found, idVendor=0424, idProduct=9514, bcdDevice= 2.00
[ 1.505044] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.508528] hub 1-1:1.0: USB hub found
[ 1.511379] hub 1-1:1.0: 5 ports detected
[ 1.769938] systemd[1]: System time before build time, advancing clock.
[ 1.831851] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[ 1.930580] NET: Registered protocol family 10
[ 1.934971] Segment Routing with IPv6
[ 1.962201] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00, bcdDevice= 2.00
[ 1.965534] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.971513] smsc95xx v1.0.6
[ 1.973676] random: systemd: uninitialized urandom read (16 bytes read)
[ 1.980660] random: systemd: uninitialized urandom read (16 bytes read)
[ 1.989789] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[ 2.000343] systemd[1]: Detected architecture arm.
[ 2.036138] systemd[1]: Set hostname to .
[ 2.086266] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:8f:1e:89
[ 2.093298] random: systemd-cryptse: uninitialized urandom read (16 bytes read)
[ 3.029459] systemd[1]: nfs-blkmap.service: Cannot add dependency job, ignoring: Unit nfs-blkmap.service is masked.
[ 3.045456] systemd[1]: Created slice User and Session Slice.
[ 3.074945] systemd[1]: Listening on udev Control Socket.
[ 3.083071] systemd[1]: Listening on udev Kernel Socket.
[ 3.091677] systemd[1]: Created slice System Slice.
[ 3.100337] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[ 3.108833] systemd[1]: Listening on fsck to fsckd communication Socket.
[ 3.231623] i2c /dev entries driver
[ 3.589514] EXT4-fs (mmcblk0p7): re-mounted. Opts: (null)
[ 3.675895] systemd-journald[119]: Received request to flush runtime journal from PID 1
[ 4.112311] rpi-ft5406 rpi_ft5406: Probing device
[ 4.113385] input: FT5406 memory based driver as /devices/virtual/input/input0
[ 4.160677] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[ 4.163409] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[ 4.163425] [vc_sm_connected_init]: start
[ 4.172485] [vc_sm_connected_init]: installed successfully
[ 4.212879] media: Linux media interface: v0.10
[ 4.279266] videodev: Linux video capture interface: v2.00
[ 4.340172] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ 4.340185] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ 4.366773] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[ 4.366802] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[ 4.383317] bcm2835_audio soc:audio: card created with 8 channels
[ 4.385850] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[ 4.518427] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 4.627349] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 4.697764] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
[ 4.712437] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[ 4.712713] usbcore: registered new interface driver brcmfmac
[ 5.004898] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[ 5.005479] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[ 5.005605] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[ 5.006387] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f
[ 5.006524] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[ 5.016741] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[ 5.016832] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[ 5.020735] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[ 5.020748] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[ 5.026775] bcm2835-v4l2: scene mode selected 0, was 0
[ 5.034818] bcm2835-v4l2: V4L2 device registered as video0 - stills mode > 1280x720
[ 5.051676] bcm2835-v4l2: Broadcom 2835 MMAL video capture ver 0.0.2 loaded.
[ 5.787592] uart-pl011 3f201000.serial: no DMA platform data
[ 6.526206] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 6.526241] brcmfmac: power management disabled
[ 7.244336] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[ 7.244613] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 8.333443] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 8.391995] Under-voltage detected! (0x00050005)
[ 10.410110] Bluetooth: Core ver 2.22
[ 10.410164] NET: Registered protocol family 31
[ 10.410168] Bluetooth: HCI device and connection manager initialized
[ 10.410181] Bluetooth: HCI socket layer initialized
[ 10.410188] Bluetooth: L2CAP socket layer initialized
[ 10.410212] Bluetooth: SCO socket layer initialized
[ 10.453707] Bluetooth: HCI UART driver ver 2.3
[ 10.453722] Bluetooth: HCI UART protocol H4 registered
[ 10.453813] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 10.454033] Bluetooth: HCI UART protocol Broadcom registered
[ 11.124429] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 11.124447] Bluetooth: BNEP filters: protocol multicast
[ 11.124477] Bluetooth: BNEP socket layer initialized
[ 11.257837] Bluetooth: RFCOMM TTY layer initialized
[ 11.257876] Bluetooth: RFCOMM socket layer initialized
[ 11.257913] Bluetooth: RFCOMM ver 1.11
[ 18.066574] fuse init (API version 7.27)
[ 23.541260] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Opts: (null)
[ 27.111915] Voltage normalised (0x00000000)
[ 31.272096] Under-voltage detected! (0x00050005)
[ 35.432013] Voltage normalised (0x00000000)
[ 36.405459] Adding 102396k swap on /var/swap. Priority:-2 extents:1 across:102396k SSFS
[ 52.072461] Under-voltage detected! (0x00050005)
[ 64.551979] Voltage normalised (0x00000000)
[ 90.323059] random: crng init done
[ 90.323075] random: 7 urandom warning(s) missed due to ratelimiting
[ 104.174398] Bluetooth: hci0: Frame reassembly failed (-84)
[ 104.174453] Bluetooth: hci0: Frame reassembly failed (-84)
[ 104.178473] Bluetooth: hci0: Frame reassembly failed (-84)

@pelwell
Copy link
Contributor

pelwell commented Aug 5, 2019

When your Pi has a marginal power supply (or too much load) as yours seems to, all sorts of errors can happen that wouldn't normally.

@milou161185
Copy link

a screen is connected to the pi, I will try by unplugging it to see if the messages are disappearing

@milou161185
Copy link

the error " Under-voltage detected! " is gone but I still have error messages "Bluetooth: hci0: Frame reassembly failed (-84)" with no screen connected

@pelwell
Copy link
Contributor

pelwell commented Aug 5, 2019

Going back to your answer to question 3, an error like the one you are seeing is unlikely on an idle system. Which Bluetooth devices are connected?

@milou161185
Copy link

I use the bluetooth of pi as antenna for jeedom, so there is 2 nut connected

@milou161185
Copy link

by stopping the service making the connection between the pi and jeedom, no error ... I will therefore get closer to the forum jeedom, thank you for your help!

@pelwell
Copy link
Contributor

pelwell commented Aug 5, 2019

What is a "nut"? Do you mean the Nut Mini device tracker?

How large and CPU intensive is Jeedom? Unlike the later Bluetooth Pis, Pi 3B doesn't have flow control signals to the Bluetooth modem which means it can lose data under load. One option is to follow the suggestion I gave earlier to reduce the baud rate to the modem - edit /usr/bin/btuart and change the 921600 to 460800 (or 230400, 115200 etc.). Unless you are streaming audio it shouldn't be too restricting.

@milou161185
Copy link

thanks, i try this

@milou161185
Copy link

same problem :(

@pelwell
Copy link
Contributor

pelwell commented Aug 5, 2019

I don't think this is an acceptable solution, but to help me understand the problem please try with 115200 if you haven't already.

@chrismyers81
Copy link

I'm in a similar boat with my 3B, using it to poll an airthings waveplus. I just applied the downgrade to 115200, and will see if that fixes the issue.

@pelwell
Copy link
Contributor

pelwell commented Sep 20, 2021

Pi 3B was the first BT-capable Pi, and the earlier revisions (<=1.2) lack the flow control signals needed for reliable UART communication. Lowering the baudrate increases the tolerance to scheduling delays, but there is still a chance that some data will be lost, leading to the reassembly error.

@azagramac
Copy link

azagramac commented Nov 24, 2021

Model: RaspberryPi 3
OS: Raspbian GNU/Linux 10 (buster)
Kernel: 5.10.81-v7+
Firmware: 99c5aad7da0d1e3b2c28669a3941db77734b9f2d
Power Supply model: Official for RaspberryPi, T5875DV

dmesg command output:
Captura de pantalla 2021-11-24 a las 7 54 30

@pelwell
Copy link
Contributor

pelwell commented Nov 24, 2021

Which revision of Pi 3 (tail -3 /proc/cpuinfo)? As stated above, earlier revisions lack the flow control signals required for reliable communication under load.

@azagramac
Copy link

azagramac commented Nov 24, 2021

Which revision of Pi 3 (tail -3 /proc/cpuinfo)? As stated above, earlier revisions lack the flow control signals required for reliable communication under load.

Revision	: a02082
Serial		: 00000000XXXXXXXX
Model		: Raspberry Pi 3 Model B Rev 1.2

Thanks

@pelwell
Copy link
Contributor

pelwell commented Nov 24, 2021

Unfortunately that's one of the pre-flow-control revisions. You can follow my earlier advice of editing /usr/bin/btuart (e.g. sudo nano /usr/bin/btuart) and changing:

                $HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR

to:

                $HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR

or even:

                $HCIATTACH /dev/serial1 bcm43xx 115200 noflow - $BDADDR

in order to see if the problem persists.

@azagramac
Copy link

Nothing, it continues, in the case of 115200, I can't even pair the device.

On Pi4, is this not the case?
The use I give to the Pi3, is with RetroPie (manual installation), and the devices connected by BT, are 2 official PS3 controllers.

Thanks

@drdadr
Copy link

drdadr commented Aug 17, 2022

I've got the exact same issue but on Pi4.
Essentially the same use case. I'm running HomeAssistant and I'm using BTLE thermometers around the apartment. After a while they stop receiving updates and my logs are full with with the message:

[ 1714.309343] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1714.309350] Bluetooth: hci0: Received unexpected HCI Event 00000000
[ 1714.309372] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1714.309406] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1714.309435] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1714.309460] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1714.309484] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1714.309507] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1714.309530] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1714.309553] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1714.309576] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1714.309598] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1714.309621] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1714.309644] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1714.309666] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1714.309689] Bluetooth: hci0: Frame reassembly failed (-84)
➜  ~ tail -3 /proc/cpuinfo
Revision	: b03111
Serial		: xxxx
Model		: Raspberry Pi 4 Model B Rev 1.1
➜  ~ uname -a
Linux a0d7b954-ssh 5.15.32-v8 #1 SMP PREEMPT Sat Jul 23 18:06:19 UTC 2022 aarch64 Linux

I'm using the official power supply and I don't see any voltage warnings.

@RuSPanzer
Copy link

RuSPanzer commented Oct 18, 2022

I have pi3b v1.2 with home assistant

I noticed that the Frame reassembly failed (-84) error if PI starts too quickly after a reboot, HA starts using the adapter until it is ready.

if i stop home assistant, restart device, and after a while start HA - there is no problem 🤔

@pelwell
Copy link
Contributor

pelwell commented Oct 18, 2022

Could you try add dtparam=krnbt to config.txt?

@RuSPanzer
Copy link

Could you try add dtparam=krnbt to config.txt?

looks like it worked

@pelwell
Copy link
Contributor

pelwell commented Oct 18, 2022

Cool. I'm on the brink of changing the way the RPi BT modems are initialised, asking the kernel to provide the firmware rather than getting hciattach to do it. There are so many different devices and usage modes that it will take a lot of testing (miniuart mode is the worst), but it should happen eventually.

@RuSPanzer
Copy link

RuSPanzer commented Oct 18, 2022

image

The effect is even greater than I expected. This temperature graph very clearly shows how more stable the BLE began to work. Yesterday, the temperature update intervals were uneven and reached more than an hour. After I lowered the baud rate from 921600 to 460800 and wrote dtparam=krnbt=on, the Bluetooth became MUCH more stable than the interval of about 10 minutes (as it should be)

P.S. only change speed don't work for me

@pelwell
Copy link
Contributor

pelwell commented Oct 18, 2022

Are you running an early Pi 3B? Or have you switched to mini-UART mode (dtoverlay=miniuart-bt) in order to use the better UART for something else on GPIO 14 & 15?

@RuSPanzer
Copy link

RuSPanzer commented Oct 18, 2022

Are you running an early Pi 3B? Or have you switched to mini-UART mode (dtoverlay=miniuart-bt) in order to use the better UART for something else on GPIO 14 & 15?

Pi 3 B v1.2 on stock Raspbian Lite with latest rpi-update. but i manual make bluez from sources v 5.65. bluetooth service start with --experimental flag

ruspanzer@rp:~ $ bluetoothd -v
5.65

UART mode not changed

@pelwell
Copy link
Contributor

pelwell commented Oct 18, 2022

Much as I'd like to think the krnbt option had improved the reliability, it's much more likely to be the lowering of the baud rate. Once the firmware has been downloaded and the HCI connection is up, both options (with and without krnbt should behave the same).

@RuSPanzer
Copy link

most likely it is.
krnbt fixed the adapter startup problem, and baud rate fixed the stability. I did it at the same time and got such a striking effect. Thanks

@RuSPanzer
Copy link

@pelwell, I tested different boot options today (with and without krnbt and with different baud rate).
the problem reappeared, krnbt don't work

the only way to fix the problem is to run HA (in docker) manually via ssh after the system has fully booted.

my HA runs in docker compose and start with system startup

@Lassska
Copy link

Lassska commented Dec 3, 2022

I've got the exact same issue but on Pi4. Essentially the same use case. I'm running HomeAssistant and I'm using BTLE thermometers around the apartment. After a while they stop receiving updates and my logs are full with with the message:
.........................
➜ ~ tail -3 /proc/cpuinfo
Revision : b03111
Serial : xxxx
Model : Raspberry Pi 4 Model B Rev 1.1
➜ ~ uname -a
Linux a0d7b954-ssh 5.15.32-v8 #1 SMP PREEMPT Sat Jul 23 18:06:19 UTC 2022 aarch64 Linux


**I'm using the official power supply and I don't see any voltage warnings.**

I have good news. I am an electronic engineer, it could be the power supply with problems or the plug... Or the mother plug from the PI. It is not relevant if you use the original power supply!

I had this problem (Pi3) and took all the phone and tablet chargers in the house... Surprise! With 3 of them the same BT errors...(-84) Two instead were OK after 24 hours but also only one cable was OK

@nutanraptee
Copy link

Aug 08 05:50:35 am62xx-evm BT_keyfob[453]: Sent character: F
Aug 08 05:50:35 am62xx-evm BT_keyfob[453]: Sent character: F
Aug 08 05:50:35 am62xx-evm BT_keyfob[453]: Sent character: F
[ 5026.914315] Bluetooth: hci0: Frame reassembly failed (-84)
[ 5114.974482] Bluetooth: hci0: Frame reassembly failed (-84)
[ 5157.150122] Bluetooth: hci0: Frame reassembly failed (-84)

even I have the same issues but my program works fine this isn't stopping my program it is running will this cause me an issue in long-term use?

@Dan1jel
Copy link

Dan1jel commented Aug 15, 2024

Aug 08 05:50:35 am62xx-evm BT_keyfob[453]: Sent character: F
Aug 08 05:50:35 am62xx-evm BT_keyfob[453]: Sent character: F
Aug 08 05:50:35 am62xx-evm BT_keyfob[453]: Sent character: F
[ 5026.914315] Bluetooth: hci0: Frame reassembly failed (-84)
[ 5114.974482] Bluetooth: hci0: Frame reassembly failed (-84)
[ 5157.150122] Bluetooth: hci0: Frame reassembly failed (-84)

even I have the same issues but my program works fine this isn't stopping my program it is running will this cause me an issue in long-term use?

I'm also curious if this might cause issues.

@doyajii1
Copy link

doyajii1 commented Sep 21, 2024

I am also seeing this when I plug monitor to raspberry pi 3 b+ "Bluetooth: hci0: Frame reassembly failed (-84)" HA version: 2024.9.2, and I saw the yale lock connection lost. However, I have fully shutdown the device(i.e. detach power) and cold restarted and saw everything working correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests