Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] BCM20702A1-0a5c-21e6.hcd failed with error -2
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ranumm
n00b
n00b


Joined: 16 Aug 2019
Posts: 8

PostPosted: Fri Jan 24, 2020 11:18 am    Post subject: [Solved] BCM20702A1-0a5c-21e6.hcd failed with error -2 Reply with quote

Hi everyone,
I'm here again to a question.

A laptop uses a "Broadcom BCM20702" bluetooth chip, unfortunately the kernel (gentoo-sources-5.4.14) reports:
Code:
[    1.892211] bluetooth hci0: Direct firmware load for brcm/BCM20702A1-0a5c-21e6.hcd failed with error -2


I extracted the "BCM20702A1_001.002.014.0449.0462.hex" from the Lenovo[1] ".exe" file then I used hex2hcd to convert it in ".hcd" file; after I put this file in the "/lib/firmware/brcm/" directory as "BCM20702A1-0a5c-21e6.hcd". Same kernel problem!


Any suggestions?

__
[1] https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/g4wb12ww.exe


Last edited by ranumm on Mon Jan 27, 2020 4:09 pm; edited 3 times in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7645
Location: Saint Amant, Acadiana

PostPosted: Fri Jan 24, 2020 5:08 pm    Post subject: Reply with quote

I see two possible reasons.

1. Driver attempts to load firmware before the root filesystem is mounted.
2. The firmware file you have is broken or otherwise invalid.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
ranumm
n00b
n00b


Joined: 16 Aug 2019
Posts: 8

PostPosted: Sat Jan 25, 2020 12:19 pm    Post subject: Reply with quote

Jaglover wrote:
I see two possible reasons.

1. Driver attempts to load firmware before the root filesystem is mounted.
2. The firmware file you have is broken or otherwise invalid.


1. Interesting. How can I check?
2. I don't think so because I tried many time with different files also[1].

Anyway I have a bluetooth mouse connected, it works, but sometimes it freezes:
Code:
[   60.808701] Bluetooth: hci0: advertising data len corrected
[   60.813692] Bluetooth: hci0: advertising data len corrected


__
[1] https://wiki.gentoo.org/wiki/Lenovo_Thinkpad_T430#Bluetooth
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7645
Location: Saint Amant, Acadiana

PostPosted: Sat Jan 25, 2020 4:50 pm    Post subject: Reply with quote

Quote:
1. Interesting. How can I check?

You have to consult ranumm about this. Assuming ranumm was the individual who configured kernel. See, if (s)he built the bluetooth driver into kernel then it also loads with kernel. Kernel must be loaded before it can mount the root filesystem, unless you have some super secret time-travel kernel module ... OTOH, if the bluetooth driver was built as a module then it loads from root filesystem after it is mounted and has no problem accessing firmware.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15283

PostPosted: Sat Jan 25, 2020 4:57 pm    Post subject: Reply with quote

If the driver is built-in, it will almost certainly load before the root filesystem is available. If the driver is a module, and is in the initramfs, it will probably load before the root filesystem is available (depending on how the initramfs is designed). If the driver is a module and is not in the initramfs, then it will be on the root filesystem and cannot have been loaded too early.
Back to top
View user's profile Send private message
ranumm
n00b
n00b


Joined: 16 Aug 2019
Posts: 8

PostPosted: Sun Jan 26, 2020 11:11 am    Post subject: Reply with quote

Hu wrote:
If the driver is built-in, it will almost certainly load before the root filesystem is available. If the driver is a module, and is in the initramfs, it will probably load before the root filesystem is available (depending on how the initramfs is designed). If the driver is a module and is not in the initramfs, then it will be on the root filesystem and cannot have been loaded too early.


Really interesting.
Previously I had a kernel with all the modules built into the kernel (make localyesconfig) and no initramfs (like now); I have set the "Bluetooth" driver as a module then I re-build/install the kernel and modules. No problems now!

My question now is:
- How can I build a kernel with all integrated modules and working bluetooth firmware?

Thank you.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15283

PostPosted: Sun Jan 26, 2020 5:13 pm    Post subject: Reply with quote

The firmware must be available when the driver needs it. Usually, that is done by listing it in CONFIG_EXTRA_FIRMWARE during the kernel build. Note that this embeds the firmware in the kernel, which might cause licensing issues if you use non-free firmware and plan to redistribute the resulting kernel binary.
Back to top
View user's profile Send private message
ranumm
n00b
n00b


Joined: 16 Aug 2019
Posts: 8

PostPosted: Mon Jan 27, 2020 4:11 pm    Post subject: Reply with quote

Hu wrote:
The firmware must be available when the driver needs it. Usually, that is done by listing it in CONFIG_EXTRA_FIRMWARE during the kernel build. Note that this embeds the firmware in the kernel, which might cause licensing issues if you use non-free firmware and plan to redistribute the resulting kernel binary.

I understand, thank you so much.
Back to top
View user's profile Send private message
Azik
Apprentice
Apprentice


Joined: 03 Apr 2005
Posts: 151
Location: Russia, Ufa

PostPosted: Sat May 16, 2020 3:48 pm    Post subject: Reply with quote

Hello.

For anyone who can stuck with this problem: https://wiki.gentoo.org/wiki/Broadcom_Bluetooth
_________________
From Siberia with Love!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum