Slackware - ARMThis forum is for the discussion of Slackware ARM.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
For me wifi is working ok (in fact I connect to my RPi4 via wifi)
I tried removing everything from /lib/firmware/brcm and then putting in there only the firmware from SARPi-hack but still bluetooth is not working.
@TheTKS this thread is about bluetooth
I've attached the kernel configs and output of lsmod should anyone want to do some more analysis there.
My considerations regarding the differences are in a previpus post on this thread.
For me wifi is working ok (in fact I connect to my RPi4 via wifi)
I tried removing everything from /lib/firmware/brcm and then putting in there only the firmware from SARPi-hack but still bluetooth is not working.
@TheTKS this thread is about bluetooth
I've attached the kernel configs and output of lsmod should anyone want to do some more analysis there.
My considerations regarding the differences are in a previpus post on this thread.
I understand this thread is about BT, but since some of the discussion involved firmware in the same directory, I was curious if there might be the same or similar origin that might point you to a solution.
It appears not, so I’ll stop with the wifi stuff now. Still curious about what’s causing your BT problems.
Exaga’s suggestion of a dongle sounding pretty good to me now.
I've attached the kernel configs and output of lsmod should anyone want to do some more analysis there.
My considerations regarding the differences are in a previpus post on this thread.
OK Louigi. I've spent most of the day looking into Bluetooth and I'm obviously missing something because I'm no nearer to a solution now than when I started.
I noticed that modules were missing from the kernel 5.10.11 so I fixed that and rebuilt it. This made no difference. In fact I've built approx. 5 kernels today, testing with various configs, and it's made no difference. I've also played around with Raspberry Pi OS /lib/firmware/brcm and it's made no difference. The strange thing is that Bluetooth is initialising and activating as expected but no device(s) are found with 'hcitool dev', or by any other means/commands.
All I get is this:
Code:
root@torq:~# hcitool dev
Devices:
root@torq:~# hciattach /dev/ttyS0 bcm43xx 921600 noflow
bcm43xx_init
Initialization timed out.
root@torq:~# hcidump
HCI sniffer - Bluetooth packet analyzer ver 5.55
Can't attach to device hci0. No such device(19)
root@torq:~# bluetoothctl
Agent registered
[bluetooth]# devices
No default controller available
[bluetooth]# info hci0
No default controller available
[bluetooth]#
Something somehere is stopping the hci0 device from being detected. What am I missing here?
Last edited by Exaga; 01-31-2021 at 04:02 PM.
Reason: code etc.
But bluetooth is not working. This has to be investigated.
Here's a 'dmesg' from my Slackware ARM current - RPi4 [4GB] system - and if you have any suggestions or results from your own investigations let's discuss it:
Not sure if it will help or not, but I've finally cracked the problem with the 400, and part of the solution may apply to your setup.
I discovered that there is another version of the BCM4345C5.hcd firmware required for bluetooth in the /lib/firmware/ap6256 directory. Being further up the "pecking order", this was being loaded in preference to the version in the brcm folder.
Removing the ap6256 folder enabled the correct firmware to load, and all my problems went away!
The file you want is called "bluetoothResetFirmware.sh"
It needs to be run twice for some reason, but when it reloads the firmware, it will tell you the location where it found it. That is what tipped me off as to the problem!
In my case these are the only firmwares that are loading:
Code:
root@rpi4:~# grep -i firmware: /var/log/dmesg
[ 0.080767] raspberrypi-firmware soc:firmware: Attached to firmware from 2021-01-27T22:19:57, variant start
[ 0.090781] raspberrypi-firmware soc:firmware: Firmware hash is 99d9a48302e4553cff3688692bb7e9ac760a03fa
[ 4.154561] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 4.169412] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar 2 2020 23:30:41 version 7.45.202 (r724630 CY) FWID 01-72f6ece2
root@rpi4:~#
But my kernel is missing modules so maybe this information is incomplete.
You got that bluetoothResetFirmware.sh script to run in SlackwareARM ?
Code:
# Created on Mar 2020
# Agung Pambudi <agung.pambudi5595@gmail.com>
sudo killall hciattach
if grep -a Zero /proc/device-tree/model; then
raspi-gpio set 45 op dl
sleep 1
raspi-gpio set 45 op dh
else
/opt/vc/bin/vcmailbox 0x38041 8 8 128 0
sleep 1
/opt/vc/bin/vcmailbox 0x38041 8 8 128 1
fi
sudo btuart
David: Just to clarify - I'm running slarm64-current, so there will be differences with slackwarearm-14.2. I have done a lot of messing around with firmware, but I thought I had only changed the contents of the brcm directory. And yes, my installation does have /opt/vc/bin/vcmailbox (no idea what it is or does, though!).
At a guess, it is setting the baud rate of the uart.
and like this still no difference.
But in the other thread I also remember reading somewhere that, in these conditions, the device showed up wrong in hciconfig ... it's not showing at all on my RPi4.
In this post Exaga is talking about this issue but here it's different there is no device showing up at all.
I tried once with raspbian kernel on slackwareARM 14.2 with SARPi boot firmware and SARPi /lib/firmware/brcm/* ... still no go
Also tried with raspbian lib/firmware/brcm/* ... still no go
Last try I will try with raspbian boot birmware
It was me that enabled the bluetooth LE the other stuff, I think, has nothing to do with bluetooth. I commented it again and borrowed the rest of the boot firmware from raspbian: still nothing.
I'm stuck ... I've no idea what else could make the difference (/etc/firmware is still linked to /lib/firmware).
Anyone have any other ideas ?
something in the userland ? (I mean I'm using raspbian kernel, modules, boot firmware and firmware and still no bt device detected !)
If the BT device is not detected, that implies that either the firmware is not being loaded, or it is the wrong firmware. At least, that is the conclusion I came to on my 400.
Once I got that sorted, it all leapt into life.
Can't help much further, because the 400 uses a slightly different chipset. I've lost track of all the things I tried on mine before I finally cracked it (might explain the ap6256 folder!), so I'm going to do a fresh install and start again from scratch - though keeping my currently working card, just in case!
One final thought - and it is clutching at straws - I see you are using 14.2. In the x86 world, this is well past its sell-by date, and most have switched to -current, which is actually very stable. I'm running 64-bit current on the 400, and now I've got the BT working, its almost indistinguishable from the x86_64 version.
So I will double check which firmware files are being loaded on raspbian ... because I've copied over the entire /lib/firmware/brcm directory from raspbian entirely replacing what was there before (except for the renaming thing on the txt file) ... if it is a firmware issue it's not for something in the brcm subfolder.
I don't get this on the raspbian dmesg
Code:
[ 3.966894] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 4.026166] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 4.036813] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 4.039409] cfg80211: failed to load regulatory.db
But this may be wifi related and not bluetooth ... could not spot anything else.
Unfortunately not all firmware loading operations get logged, it is up to the author of the driver.
It would be interesting to enable kernel dynamic debug buy raspbian kernel does not have it enabled
# CONFIG_DYNAMIC_DEBUG is not set
it would be interesting to log every firmware load operation where it is working
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.