LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 01-31-2021, 08:43 AM   #16
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 635

Original Poster
Blog Entries: 20

Rep: Reputation: 81

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.
Attached Files
File Type: txt raspbian.config.txt (188.2 KB, 12 views)
File Type: txt raspbian.lsmod.txt (2.7 KB, 9 views)
File Type: txt slackwarearm.config.txt (198.2 KB, 12 views)
File Type: txt slackwarearm.lsmod.txt (1.5 KB, 30 views)

Last edited by louigi600; 01-31-2021 at 08:53 AM.
 
Old 01-31-2021, 11:07 AM   #17
TheTKS
Member
 
Registered: Sep 2017
Location: Ontario, Canada
Distribution: Slackware, X/ubuntu, OpenBSD, OpenWRT
Posts: 361

Rep: Reputation: 243Reputation: 243Reputation: 243
Quote:
Originally Posted by louigi600 View Post
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.

Good luck getting your BT problem solved soon.

TKS
 
Old 01-31-2021, 03:40 PM   #18
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by louigi600 View Post
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.
 
Old 01-31-2021, 03:45 PM   #19
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by rsamurti View Post
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:
Attached Files
File Type: txt dmesg.txt (22.5 KB, 14 views)
 
Old 02-01-2021, 12:27 AM   #20
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 635

Original Poster
Blog Entries: 20

Rep: Reputation: 81
@Exaga
I noticed this in your dmesg:
Code:
[    4.292244] brcmfmac: F1 signature read @0x18000000=0x15264345
[    4.301032] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    4.301483] usbcore: registered new interface driver brcmfmac
[    4.375641] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2
If you get rid of that by copying brcmfmac43455-sdio.txt to what the firmware loader is looking for
Code:
cd /lib/firmware/brcm
cp brcmfmac43455-sdio.txt brcmfmac43455-sdio.raspberrypi,4-model-b.txt
The content of that file seems to have important details maybe that will help once the needed modules are all there.

Will that make any difference to your newer kernel builds ?
Can you share the kernel config where you fixed the missing modules ?

Last edited by louigi600; 02-02-2021 at 12:48 AM.
 
Old 02-02-2021, 08:46 AM   #21
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,124

Rep: Reputation: Disabled
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!

I also found an interesting script which resets bluetooth and reloads the firmware here: https://github.com/agungpambudi55/bl...n-init-running

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!

See my post here for all the gory details: https://www.linuxquestions.org/quest...-a-4175689669/

Hope this helps!

--
Pete
 
1 members found this post helpful.
Old 02-02-2021, 12:57 PM   #22
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 635

Original Poster
Blog Entries: 20

Rep: Reputation: 81
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
On anything but the RPi0 it would just do:
Code:
killall hciattach
/opt/vc/bin/vcmailbox 0x38041 8 8 128 0
sleep 1
/opt/vc/bin/vcmailbox 0x38041 8 8 128 1
btuart
/opt/vc is not on my system: is it in some SARPi packages ?
Oooops raspbian is hardfloat and 14.2 is softfloat
Code:
root@rpi4:/opt/vc/bin# file vcmailbox 
vcmailbox: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, not stripped
root@rpi4:/opt/vc/bin#
This will not work on SlackwareARM 14.2

Not sure how you came to have ap6256 in the first place but i cant find it in /lib/firmware (both SlackwareARM and raspbian )

Last edited by louigi600; 02-02-2021 at 02:42 PM.
 
Old 02-02-2021, 02:30 PM   #23
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by louigi600 View Post
Will that make any difference to your newer kernel builds ?
Can you share the kernel config where you fixed the missing modules ?
I'm still testing this... but here you are:
Attached Files
File Type: txt BT.config.txt (205.9 KB, 22 views)
 
Old 02-02-2021, 02:45 PM   #24
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
@Louigi and here's the dmesg from the latest boot with that kernel...
Attached Files
File Type: txt dmesg.txt (22.1 KB, 18 views)
 
Old 02-02-2021, 03:22 PM   #25
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 635

Original Poster
Blog Entries: 20

Rep: Reputation: 81
@EXAGA did the BT device work any better with the renaming of brcmfmac43455-sdio.txt ?
 
Old 02-02-2021, 04:14 PM   #26
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,124

Rep: Reputation: Disabled
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.

--
Pete
 
Old 02-03-2021, 12:01 AM   #27
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 635

Original Poster
Blog Entries: 20

Rep: Reputation: 81
I compiled with Exaga's config and i noticed that I have the btsdio module loaded:
Code:
bnep                   20480  2
fuse                  126976  1
btsdio                 16384  0
bluetooth             409600  8 btsdio,bnep
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.
Code:
root@rpi4:~# rmmod btsdio
root@rpi4:~# modprobe  hci_uart
root@rpi4:~# modprobe btsdio
root@rpi4:~# hciattach ttyS0 bcm43xx 921600
bcm43xx_init
Initialization timed out.
root@rpi4:~# hcitool dev
Devices:
root@rpi4:~#
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

I noticed these differences in the config.txt :
Code:
root@rpi4:/boot# grep -vE '^#|^ *$' config.txt
dtoverlay=pi3-miniuart-bt
enable_uart=1
[pi4]
[all]
root@rpi4:/boot#

root@nuc8i5:/mnt/tmp/boot# grep -vE '^#|^ *$' config.txt 
dtparam=audio=on
[pi4]
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
[all]
root@nuc8i5:/mnt/tmp/boot#
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 !)

Last edited by louigi600; 02-03-2021 at 01:54 AM.
 
Old 02-03-2021, 03:39 AM   #28
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by louigi600 View Post
@EXAGA did the BT device work any better with the renaming of brcmfmac43455-sdio.txt ?
Same results after renaming this file to 'brcmfmac43455-sdio.raspberrypi,4-model-b.txt'
 
Old 02-03-2021, 04:57 AM   #29
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,124

Rep: Reputation: Disabled
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.

--
Pete
 
Old 02-03-2021, 07:07 AM   #30
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 635

Original Poster
Blog Entries: 20

Rep: Reputation: 81
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

Found this intresting subfolder:
Code:
root@nuc8i5:/mnt/tmp/lib/firmware# tar cpvzf /tmp/rpi.tgz raspberrypi
raspberrypi/
raspberrypi/bootloader/
raspberrypi/bootloader/critical/
raspberrypi/bootloader/critical/vl805-000138a1.bin
raspberrypi/bootloader/critical/pieeprom-2020-04-16.bin
raspberrypi/bootloader/critical/vl805-000137ad.bin
raspberrypi/bootloader/critical/recovery.bin
raspberrypi/bootloader/critical/pieeprom-2020-09-03.bin
raspberrypi/bootloader/beta/
raspberrypi/bootloader/beta/pieeprom-2020-10-02.bin
raspberrypi/bootloader/beta/pieeprom-2020-10-28.bin
raspberrypi/bootloader/beta/pieeprom-2020-11-24.bin
raspberrypi/bootloader/beta/vl805-000138a1.bin
raspberrypi/bootloader/beta/pieeprom-2020-07-16.bin
raspberrypi/bootloader/beta/pieeprom-2020-12-11.bin
raspberrypi/bootloader/beta/pieeprom-2021-01-05.bin
raspberrypi/bootloader/beta/pieeprom-2021-01-11.bin
raspberrypi/bootloader/beta/pieeprom-2020-07-31.bin
raspberrypi/bootloader/beta/recovery.bin
raspberrypi/bootloader/beta/pieeprom-2021-01-16.bin
raspberrypi/bootloader/beta/pieeprom-2020-09-03.bin
raspberrypi/bootloader/latest
raspberrypi/bootloader/default
raspberrypi/bootloader/stable/
raspberrypi/bootloader/stable/vl805-000138a1.bin
raspberrypi/bootloader/stable/pieeprom-2020-06-15.bin
raspberrypi/bootloader/stable/pieeprom-2020-07-16.bin
raspberrypi/bootloader/stable/pieeprom-2020-04-16.bin
raspberrypi/bootloader/stable/pieeprom-2020-12-11.bin
raspberrypi/bootloader/stable/vl805-000137ad.bin
raspberrypi/bootloader/stable/pieeprom-2021-01-11.bin
raspberrypi/bootloader/stable/pieeprom-2020-07-31.bin
raspberrypi/bootloader/stable/recovery.bin
raspberrypi/bootloader/stable/pieeprom-2021-01-16.bin
raspberrypi/bootloader/stable/pieeprom-2020-09-03.bin
raspberrypi/bootloader/release-notes.md
root@nuc8i5:/mnt/tmp/lib/firmware#
I copied it over along with the regulatory.db but still no BT device.

Ok one last try with the firmware: I will copy the entire /lib/firmware from raspbian to slackware : damn it still no go

If it is a firmware issue raspbian is loading firmware trough fallback from somewhere else.

Last edited by louigi600; 02-03-2021 at 11:41 AM.
 
  


Reply

Tags
bluetooth, firmware, sarpi, slackware arm



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] Create/add a 'Revision needed' Forum (like Intro) for Threads *needing revision/rewrite* (n00bs) !!! LQ Suggestions & Feedback 1 12-20-2017 03:26 PM
[SOLVED] bluetooth dongle + bluetooth speaker but no sound on the bluetooth speaker vonbiber Slackware 4 05-11-2017 09:53 AM
svn restore directory to a revision also removing files not part of revision Four Linux - Software 1 03-03-2009 04:18 PM
"make-kpkg --revision=foo.1.0 kernel_image" gives some errors (kernel 2.6.3) Duukkis Debian 14 05-23-2004 03:58 AM

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

All times are GMT -5. The time now is 11:56 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