-
Notifications
You must be signed in to change notification settings - Fork 11
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
BLE problems with latest(master) bluez-firmware in RPi-3B+ and compute modules #6
Comments
I just tried it and can see a disconnect. It will take a bit longer to identify this as a regression and gather evidence for Cypress. |
Thanks for the interest in looking at this issue. |
Thanks for the detailed report - it's easily reproducible, and the immediately previous version of the firmware suffers from the same problem. A ticket is open with Cypress. |
Thanks for the effort Phill. We would really appreciate if we could somehow follow the progress of that ticket or get informed about the outcome. |
I'll report back the major findings. |
A quick update: Cypress have sent us a number of test firmware to establish when the problem appeared to help them track down the root cause, and they're working through the results. |
@pelwell any updates on this? |
By coincidence I chased Cypress yesterday, who confessed overnight to issuing a test firmware in an internal-only reply. I now have that firmware to try, so hopefully we can make some progress. |
One of the two trial firmwares issued yesterday worked when I tested it. You can download it from here: https://drive.google.com/file/d/1RJnhkV_IBjb1Lz2gsGKeF6YAcfa69IaK/view?usp=sharing I have a feeling you'll know how to install it, but just in case:
To revert to the previous firmware:
Please confirm that this trial firmware solves the problem for you and seems to be generally functional, then we can see about getting a proper release made. |
I tried [EDIT: see below] The test program communicates with a BLE pulse oximeter. Referencing hbldh/bleak#332 for your interest. |
That's a bit vague - can you narrow down the failure any further? Has it ever worked for you? You could try running "sudo btmon -w bluez.bts" in the background while running your test - twice, ideally - then upload "bluez.bts" somewhere I can download (or if it might contain sensitive information, email it to [email protected]). |
OK, I retested, and after some confusion, I got the new version to work! I had just been rebooting between changing the Does that make sense? Under what conditions is the firmware reloaded? Why would simply rebooting after replacing the (I had tried swapping back to the working |
Rebooting ought to be enough to cause the firmware to be reloaded - the firmware holds the BT modem in reset for quite some time - so I can't explain why it didn't appear to be reloaded for you, but I'm happy to hear that it's working now. |
Cypress have identified the root cause and provided an official release version of the firmware including the fix: https://drive.google.com/file/d/1DVOtBjrsoR2NhwEBVn3ei0sv-xTIBCxR/view?usp=sharing |
This version works for me as well with the pulse oximeter example. |
Thanks for the feedback. @gjorgjipetkovski @bojanpotocnik Are you going to get a chance to try it in the next few days? If not, I'll get it into our BlueZ firmware repo sooner rather than later. |
Hi @pelwell. I already tried the basic procedure, which is described in this topic, with bluetoothctl and nRF, and that is working ok.
|
If there is such a dependency on BlueZ versions, Cypress didn't mention it. Provided this version isn't a regression on the previous broken version and it fixes the known bug (which it seems to) then I'll release it. |
Is this firmware supposed to work on the pi 4 too? I just tried it and the only thing I seem to be able to do is turn discovery on and off. Connecting to a device fails (using bluetoothctl here):
output from btmon:
I reverted back to the 1.2-4+rpt2 version, everything works again, I can connect fine. |
I tested successfully on the Pi 4. |
The failure you're seeing might be similar to what I had. Try power-cycling completely between swapping the firmware versions. |
I tried this, but didn't work |
Is this change incorporated into the |
1.2-4+rpt7 contains the fix to this problem, and 1.2-4+rpt8 is a security patch for a vulnerability. |
@dhalbert @pelwell I'm getting same error with Bleak library (Python one), I'm currently on Do you know if it has been released on any repository since then? Otherwise do you have some notes/articles showing how to manually upgrade Thank you, |
I don't follow you - 1.2-4+rpt8 is the released version. To update:
|
@pelwell I'm really sorry, thought I did the |
I confirmed that |
Yes, let's be optimistic. |
Hi, I already post this topic on RPi forums, since we noticed the problem on those devices. So here it is again:
Hi,
When August 2020 (same with earlier Buster Lite images) Buster Lite image is used on RPi-3B+ and compute module based on 3B+, and when RPi is configured to work as BLE peripheral, there are significant problems to Connect and Pair+Bond to RPi from central device (Android or iOS based) using test application like nRF-Connect. The connection is usually timed-out and Pairing+Bonding is either timed-out or rejected.
steps to reproduce:
pi@raspberrypi-gj:~ $ bluetoothctl
Agent registered
[bluetooth]# agent off
Agent unregistered
[bluetooth]# agent NoInputNoOutput
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# discoverable on
Changing discoverable on succeeded
[bluetooth]# advertise on
[CHG] Controller B8:27:EB:5C:1F:9B SupportedInstances: 0x04
[CHG] Controller B8:27:EB:5C:1F:9B ActiveInstances: 0x01
Advertising object registered
Tx Power: off
Name: off
Apperance: off
Discoverable: off
[bluetooth]# show
Controller B8:27:EB:5C:1F:9B (public)
Name: raspberrypi-gj
Alias: raspberrypi-gj
Class: 0x00000000
Powered: yes
Discoverable: yes
Pairable: yes
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
Modalias: usb:v1D6Bp0246d0532
Discovering: no
After some investigation, the problem seemed like is gone if rollback of bluez-firmware is done (replace /lib/firmware/brcm/BCM4345C0.hcd)
Default version that comes with Buster Lite OS is either 1.2-4+rpt4, or 1.2-4+rpt5 (from bluez-firmware "master" branch) and working version is from bluez-firmware "buster" branch. We used latest commit: 1.2-4+rpt2 release ( https://github.com/RPi-Distro/bluez-firmware/tree/buster/broadcom)
Can someone please check this and advise us, if it is ok to use bluez-firmware from "buster" branch on our RPi devices?
We cannot see change log or detailed release notes between bluez-firmware releases, to realize why this problem is present on master commits.
Also to check whether something need to be changed in Buster OS Lite image for future releases, to support this BLE mode for 3B+ based devices.
Note. No problems what so ever on RPi 3B, but they use different Bluetooth chipset than 3B+
Thanks!
The text was updated successfully, but these errors were encountered: