LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 02-01-2021, 01:41 PM   #1
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,160

Rep: Reputation: Disabled
Bluetooth and the Pi-400


Yes! I think I've finally cracked the Pi-400 Bluetooth issues!

I'm starting a new thread for this subject, which was previously part this thread: https://www.linuxquestions.org/quest...-a-4175687719/

I thought it best to bring all the information into a dedicated thread as its taken me a while to figure out the problem!

The initial problem was that I could not get the Pi-400 bluetooth to bind to my headphones or BT Speaker. Since the 400 does not have a dedicated "audio out" jack, this was a problem!

If I inserted a USB dongle, bluetooth worked fine, but the internal chip refused to bind, although it worked fine under Raspbian. This told me it was a firmware / software issue, rather than a hardware issue.

Initially the system could not detect the on board bluetooth adapter at all, but after copying the brcm firmware folder from Raspbian, the adapter finally appeared. This turned out to be a sort of red-herring, of which more anon...

The next step turned out to be an issue with bluez, which had a number of issues with the specific chips used in the 400 - which are not the same as in the 4.

After a lot of searching, I found a series of patches for bluez, which fixed the problem. See post 75 at the bottom of the page:

https://www.linuxquestions.org/quest...719/page5.html

Finally, I got bluetooth working, but there was still an issue. It would only work for a short time - typically between 1 and 5 minutes - before dropping out. None of the usual bluetooth commands would re-instate the adapter, which had vanished again, and the only solution was a reboot!

Today I stumbled across another distro which was having similar issues a while back, and someone there had written a script to reload the firmware and restart bluetooth without the need of a reboot. You can find it here: https://github.com/agungpambudi55/bl...n-init-running

The file you need is "bluetoothResetFirmware.sh"

Despite being written for libelec, the script worked and revealed that the system was loading the wrong firmware!

Instead of loading BCM4345C5.hcd from /lib/firmware/brcm it was loading an identically named file from /lib/firmware/ap6256! This folder appears to have its origins with Manjaro-ARM. It is not part of a default Slackware install, and has presumably been copied over from Manjaro-ARM to provide functionality in other Pis. Unfortunately, it is not the right firmware for the 400, and gets found before the correct firmware in the brcm folder!

I think my copying the brcm folder over from Raspbian must have coincidentally coincided with an upgrade to this folder, which gave me partial functionality. This has caused me a lot of confusion!

I moved the ap6256 folder out of harms way, and now my Pi-400 loads its firmware from the correct brcm folder, and it WORKS! AT LAST!

Now, in the intervening period, I've done a lot of experimenting, and I've lost track of which version of the brcm folder I currently have! I think its the one from the latest Raspbian, but I could be wrong! Its also possible that something I have done whilst fiddling about has installed that ap6256 folder as it isn't part of the kernel firmware package. Whatever, it is NOT compatible with the 400!

So in summary, the solution to Bluetooth issues for the Pi-400 is:

1) Remove /lib/firmware/ap6256 (if it exists) and put it somewhere safe and out of the way!

2) Rebuild bluez with the patches mentioned above.

It should then all work!

Have fun!

--
Pete
 
Old 02-02-2021, 12:21 PM   #2
TheTKS
Member
 
Registered: Sep 2017
Location: Ontario, Canada
Distribution: Slackware, X/ubuntu, OpenBSD, OpenWRT
Posts: 379

Rep: Reputation: 253Reputation: 253Reputation: 253
To get this off zero post status - haven’t used BT yet on my RPi 4 4GB, but curious if this solves the BT problem some have been having about the same time I have been dealing with (and fixing) wifi problems.

Checked and BT is also not working on mine, not even visible, so will keep following these BT threads.

TKS
 
Old 02-02-2021, 01:38 PM   #3
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,160

Original Poster
Rep: Reputation: Disabled
TKS: The 4 is subtly different from the 400 and probably doesn't need the bluetooth patches - they might even make things worse! I would suggest starting by checking exactly which firmware is being loaded, and the "bluetoothResetFirmware.sh"script is your friend here!

You need to run it twice (on the 400, at least), and it will tell you from which folder it is loading the firmware. If it is not the brcm folder, then that is probably the problem!

Best of luck, and please post your findings! As, you say, information is hard to find on this topic!

--
Pete
 
  


Reply

Tags
bluetooth pi 400


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] bluetooth dongle + bluetooth speaker but no sound on the bluetooth speaker vonbiber Slackware 4 05-11-2017 10:53 AM
KDE and Bluetooth "Bluetooth is not completely enabled" herby1620 Linux - Desktop 1 10-25-2016 04:07 AM
why am I not able to Bluetooth with blue man and Bluetooth installed 82yrold Linux Mint 3 01-09-2015 12:45 AM
[VPS] 4 load page = 100 MB RAM loaded? do i need 100x 400 mb ram for next 400 page? vaporizel Linux - Server 1 03-14-2011 09:40 PM
Bluetooth Dongle and Bluetooth Mouse... Any ideas on this one? flipjarg Linux - Newbie 1 07-14-2010 08:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 04:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration