Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on ARM
  • Search

Bluetooth not working, PI 4 *SOLVED*

Gentoo on all things ARM. Both 32 bit and 64 bit.
Tell about your hardware and CHOST.
Problems with crossdev targeting ARM hardware go here too.
Post Reply
  • Print view
Advanced search
8 posts • Page 1 of 1
Author
Message
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

Bluetooth not working, PI 4 *SOLVED*

  • Quote

Post by JumboAg » Fri Oct 28, 2022 4:50 pm

I've got a raspberry pi 4B successfully running Gentoo using raspberrpi-firmware, raspberrypi-image and raspberrypi-sources. Btattach threw no errors, ttyAMA0 is present, nothing jumping out at me in any logs. Bluetooth *seems* to be running but it cant find anything.

Code: Select all

pi@gentoopi /etc/init.d $ ls -la /dev/ttyAMA0
crw--w---- 1 root tty 204, 64 Oct 28 11:27 /dev/ttyAMA0

Code: Select all

pi@gentoopi /etc/init.d $ dmesg|grep -i bluetooth
[  945.781584] Bluetooth: Core ver 2.22
[  945.781682] NET: Registered PF_BLUETOOTH protocol family
[  945.781690] Bluetooth: HCI device and connection manager initialized
[  945.781708] Bluetooth: HCI socket layer initialized
[  945.781725] Bluetooth: L2CAP socket layer initialized
[  945.781744] Bluetooth: SCO socket layer initialized
[  974.304445] Bluetooth: HCI UART driver ver 2.3
[  974.304471] Bluetooth: HCI UART protocol H4 registered
[  974.304551] Bluetooth: HCI UART protocol Three-wire (H5) registered
[  974.304824] Bluetooth: HCI UART protocol Broadcom registered
[  974.422932] Bluetooth: hci0: BCM: chip id 107
[  974.425176] Bluetooth: hci0: BCM: features 0x2f
[  974.448330] Bluetooth: hci0: BCM4345C0
[  974.448351] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000
[  974.455423] Bluetooth: hci0: BCM4345C0 'brcm/BCM4345C0.hcd' Patch
[  980.860246] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+-0187
[  980.860280] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0370
Does the 4 use a different Chip? Am I missing a required firmware?

Possibly related: I segfault when I run bluetoothctl:

Code: Select all

pi@gentoopi /etc/init.d $ sudo bluetoothctl
Waiting to connect to bluetoothd...Segmentation fault
Last edited by JumboAg on Sat Oct 29, 2022 3:51 pm, edited 1 time in total.
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Fri Oct 28, 2022 7:01 pm

Hi
What is your

Code: Select all

uname -r
?
:)
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56106
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Fri Oct 28, 2022 8:11 pm

JumboAg,

Does the wifi work?

Wifi and Bluetooth are in the same chip and share some firmware files.
They both use the same antenna, Tx and Rx too.

They do have different data interfaces. Wifi is on mmc1 and bluetooth on the serial part.
Bluetooth also requires that firmware be loaded over the serial port.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

  • Quote

Post by JumboAg » Fri Oct 28, 2022 8:49 pm

yep, the wifi is working just fine. Bluetooth just isn't finding any BT devices
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56106
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Fri Oct 28, 2022 9:02 pm

JumboAg,

What firmware file do you load over the serial port and how do you load it?
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

  • Quote

Post by JumboAg » Fri Oct 28, 2022 9:07 pm

This is the firmware I'm using: BCM4345C0.hcd

I'm letting the firmware itself autoload

I created a btattach script and put it in init.d and the default runlevel.

Code: Select all

pi@gentoopi /etc/init.d $ cat btattach
#!/sbin/openrc-run

command="/usr/bin/btattach"
command_args="-B /dev/ttyAMA0 -P bcm -S 3000000"
command_background=true
pidfile="/run/btattach.pid"

depend() {
        after coldplug hotplug modules
        need localmount
}
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56106
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Oct 29, 2022 2:07 pm

JumboAg,

This is going back a bit. Its probably Pi3 but the method my be useful.
It might not too, things keep changing.

My

Code: Select all

/mnt/cdrom/etc/local.d/bluetooth.start
contains

Code: Select all

 #!/bin/bash

# Having openrc start the bluetooth service is required
# but not sufficient to have Raspberry Pi bluetooth working
# bluez needs some patches they are in /etc/portage/patches
# so if you want to rebuild bluez, you can :) 

# Bluetooth is attached to /dev/ttyAMA0 so attach it and 
# load the firmware 
/usr/bin/hciattach /dev/ttyAMA0 bcm43xx 921600 noflow - 

# thats enough to have it work for some things.

# for sound we need bluealsa or pulseaudio
# pulseaudio reminds me of systemd - its not tested.
bluealsa &
That /usr/bin/hciattach looks very Pi3. The bcm43xx firmware and the 921600 baud rate, in particular.

My Pi4s are all in metal (Faraday cage) enclosures, for passive cooling, so I can't use WiFi or Bluetooth.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

  • Quote

Post by JumboAg » Sat Oct 29, 2022 3:51 pm

#@%@#% #$@#%@%#@$ % #!@$%%#$@% !!!

Sigh... found it. Typo in my config.txt file. Didnt throw any errors but wouldnt start BT correctly until I fixed.


Wrong line: dtparm=krnbt=on
right line: dtparam=krnbt=on


The hciattach/btattach is not required with the 4b. Just starting the bluetooth service is sufficient.
Top
Post Reply
  • Print view

8 posts • Page 1 of 1

Return to “Gentoo on ARM”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic