RPi-Distro / bluez-firmware

Source for bluez-firmware package
GNU General Public License v2.0
43 stars 11 forks source link

Updated broadcom/BCM4345C0.hcd firmware doesn't load. #3

Closed satmandu closed 6 years ago

satmandu commented 6 years ago

Does this new firmware work in existing systems or does it need new userspace code?

On 3b+ running on arm64 I see the following with the earlier firmware from here: https://github.com/RPi-Distro/bluez-firmware/commit/09eeca34619a1691ad2983d355a9301db75f0456

sudo systemctl status pi-bluetooth.hciuart
● pi-bluetooth.hciuart.service - Configure Bluetooth Modems connected by UART
   Loaded: loaded (/etc/systemd/system/pi-bluetooth.hciuart.service; enabled; ve
   Active: active (running) since Fri 2018-06-29 14:21:49 EDT; 12s ago
  Process: 394 ExecStart=/usr/bin/btuart (code=exited, status=0/SUCCESS)
 Main PID: 441 (hciattach)
   CGroup: /system.slice/pi-bluetooth.hciuart.service
           └─441 /usr/bin/hciattach /dev/serial1 bcm43xx 3000000 flow - b8:27:eb

Jun 29 14:21:48 bridge systemd[1]: Starting Configure Bluetooth Modems connected
Jun 29 14:21:49 bridge btuart[394]: bcm43xx_init
Jun 29 14:21:49 bridge btuart[394]: Set Controller UART speed to 3000000 bit/s
Jun 29 14:21:49 bridge btuart[394]: Flash firmware /etc/firmware/BCM4345C0.hcd
Jun 29 14:21:49 bridge btuart[394]: Set BDADDR UART: *******
Jun 29 14:21:49 bridge btuart[394]: Set Controller UART speed to 3000000 bit/s
Jun 29 14:21:49 bridge btuart[394]: Device setup complete
Jun 29 14:21:49 bridge systemd[1]: Started Configure Bluetooth Modems connected 
hciconfig -a
hci0:   Type: Primary  Bus: UART
    BD Address: ******  ACL MTU: 1021:8  SCO MTU: 64:1
    UP RUNNING 
    RX bytes:780 acl:0 sco:0 events:50 errors:0
    TX bytes:2753 acl:0 sco:0 commands:50 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: 'bridge'
    Class: 0x00010c
    Service Classes: Unspecified
    Device Class: Computer, Laptop
    HCI Version: 4.1 (0x7)  Revision: 0x8b
    LMP Version: 4.1 (0x7)  Subversion: 0x6119
    Manufacturer: Broadcom Corporation (15)

In contrast with this newer firmware from here https://github.com/RPi-Distro/bluez-firmware/commit/ade2bae1aaaebede09abb8fb546f767a0e4c7804 bluetooth just never comes up (loading the firmware leads to an initialization timeout):

● pi-bluetooth.hciuart.service - Configure Bluetooth Modems connected by UART
   Loaded: loaded (/etc/systemd/system/pi-bluetooth.hciuart.service; enabled; ve
   Active: failed (Result: exit-code) since Fri 2018-06-29 14:11:52 EDT; 1min 17
  Process: 385 ExecStart=/usr/bin/btuart (code=exited, status=1/FAILURE)

Jun 29 14:11:42 bridge systemd[1]: Starting Configure Bluetooth Modems connected
Jun 29 14:11:52 bridge btuart[385]: Initialization timed out.
Jun 29 14:11:52 bridge btuart[385]: bcm43xx_init
Jun 29 14:11:52 bridge btuart[385]: Set Controller UART speed to 3000000 bit/s
Jun 29 14:11:52 bridge btuart[385]: Flash firmware /etc/firmware/brcm/BCM4345C0.
Jun 29 14:11:52 bridge systemd[1]: pi-bluetooth.hciuart.service: Control process
Jun 29 14:11:52 bridge systemd[1]: pi-bluetooth.hciuart.service: Failed with res
Jun 29 14:11:52 bridge systemd[1]: Failed to start Configure Bluetooth Modems co
XECDesign commented 6 years ago

We use a patched version of hciattach on Raspbian and I've read that hciattach has been superseded by another tool and also that the newer versions of the kernel can load the firmware directly. I'm afraid I can't give any specifics on the alternative approaches.

XECDesign commented 6 years ago

Closing due to inactivity