Bluetooth class

Hello,

I’m trying to turn my raspi3 into a bluetooth speaker.

But I have a problem, when I do

hciconfig hci0 name 'device name'

There is no problem he changes the name of my bluetooth and keeps it in memory while when I want to change the class.

hciconfig hci0 class 0x00041C

The class is changed only temporarily.

If I reboot the name does not change but the class becomes 0x000100

I try to modify the file /etc/bluetooth/main.conf by adding
Class = 0x00041C

and creating an audio.conf file containing

[General]:
Enable = Source, Sink, Media, Socket 

But that does not work either.

I do not understand why it does not work and I can not find anything on the internet that can help me

Sorry for my English, I use google trad

HI @cerynna,

We have a project called BoomBeastic which is a Raspberry Pi based connected speaker that can play music:

I see that there is a work-in-progress PR to add bluetooth support:

From the looks of it we are configuring bluetooth within the container – as well as installing related services here.

Could you take a look and replicate these in your application?

Hello @gelbal,

Thank you for the info

If I understand correctly, I have to modify brcmfmac43430-sdio.txt et brcmfmac43455-sdio.txt
who are in the folder /lib/firmware/brcm/

If I try to change them manually via the console, I have this error

[ Error writing /lib/firmware/brcm/brcmfmac43430-sdio.txt: Read-only file system ]

So I tried several things

First I added in my DockerFile

RUN echo "btc_mode=1" > /lib/firmware/brcm/brcmfmac43455-sido.txt \
  && echo "btc_params8=0x4e20" >> /lib/firmware/brcm/brcmfmac43455-sido.txt \
  && echo "btc_params1=0x7530" >> /lib/firmware/brcm/brcmfmac43455-sido.txt

RUN echo "btc_mode=1" > /lib/firmware/brcm/brcmfmac43430-sido.txt \
  && echo "btc_params8=0x4e20" >> /lib/firmware/brcm/brcmfmac43430-sido.txt \
  && echo "btc_params1=0x7530" >> /lib/firmware/brcm/brcmfmac43430-sido.txt

but that did not change anything

After I copied
https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm/brcmfmac43430-sdio.txt
https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm/brcmfmac43455-sdio.txt
in my app in folder misc

And I add this in my DockerFile

COPY ./app/misc/brcmfmac43455-sido.txt /lib/firmware/brcm/brcmfmac43455-sido.txt
COPY ./app/misc/brcmfmac43430-sido.txt /lib/firmware/brcm/brcmfmac43455-sido.txt

But that does not change the files do not change and remains as the origin

I do not understand how to edit these files

@cerynna /lib/firmware/brcm/brcmfmac43455-sido.txt is located on the host os. The Dockerfile builds the container that will be running on the device. This file is not present in the containers.
However, this change (taken from https://github.com/LibreELEC/brcmfmac_sdio-firmware-rpi/pull/9/files I guess) should not be necessary to turn your raspberry pi 3 into a bluetooth speaker.