Bluetooth support for Librem 5

There is no “firmware used in byzantium”, the firmware is read from flash on the WiFi module (unless you put it manually into /lib/firmware).

The fw is written into the the flash if the CRC of the flash doesn’t match with the file in /lib/firmware. This was meant by the “firmware used in byzantium”. See also: https://source.puri.sm/Librem5/linux-next/-/issues/358#note_174200

Yes, but there’s no such file anywhere in byzantium (or any other part of PureOS).

See https://source.puri.sm/Librem5/redpine-firmware-nonfree
This is what I’m told to flash with byzantium; see also
https://source.puri.sm/Librem5/linux-next/-/issues/358#note_174200

I’m perfectly aware of what we have written there :wink:

What I meant is that there’s no such thing as “firmware in byzantium”, since used firmware will depend on when the phone was shipped and whether the module was reflashed by the user afterwards. Which means that it’s not true that everyone will have this problem, or that it’s an issue specific to byzantium. In fact, the same reflash instructions will work on amber-phone as well, since the latest kernels are still being regularly backported there.

When it comes to Bluetooth on Redpine cards, it generally works on both amber-phone and byzantium, but there are several distinct issues at play that can affect different sets of people, with bad firmware being one of them.

1 Like

Getting back to the original post, I will report to you my experience with customer service. I don’t know if my starting issue was exactly the same as yours, but it’s probably worth checking out the solution they gave me.

  1. When I start my L5 for the first time I checked BT, and it says to “No Bluetooth Found Plug in a dongle to use Bluetooth” implying that there was no BT hardware detected. I actually attached the USB A BT dongle I use on my Librem 13, but it didn’t work on the L5 with a USB A to C adapter.

  2. I wrote tech support, and within a few hours, @mladen got back to me with some command lines to implement a patch by @angus.ainslie. After running the commands, I rebooted the phone, and I had bluetooth. Maybe Mladen and/or Angus could comment on this and let us know if it’s a general fix? Like @irvinewade, I can use my BT keyboard to browse the internet, install applications from the store, install applications from command line, so there doesn’t seem to be any WiFi interference.

  3. Like mentioned here, if I turn off BT with the hardware switch, it comes back when I turn it back on, but if I toggle it off in System, it won’t come back on. I have found that just restarting phosh (as opposed to a full reboot) restores it. That can be done in command line with “sudo systemctl restart phosh”

1 Like

@dos can you paste here the syntax to burn the firm into redpine card please… just for the record for peoples not understanding…

You just place the firmware file in /lib/firmware and reboot. When the driver detects that the firmware on flash differs from the provided file, it reflashes it.

2 Likes

Wow. But there is a script to burn the firm into redpine manually, just for to know it??
I remember i saw a script somewhere to programing the redpine card with a new firm…manually…

These scripts are from before the regular kernel driver worked this way.

1 Like

Thank you.
So this means that this script maybe still work to flash manually a new firm to redpine card but this way is not needed anymore because the driver auto reflash the firm into the chipset when detecting a new fimware on /lib/firmware folder.
I hope that Silicon Labs give us a newer firmware…with much features and bugfixes.

On my Amber L5 USA, I’ve been continually updating the system and although I have never created the firmware directory, nor followed your instructions above, /lib/firmware is on my phone and it contains RS9116_NLINK_WLAN_BT_IMAGE.rps

Nevertheless, Bluetooth has never worked on my phone, despite HKS toggling and the presence of the RS9116 firmware in /lib/firmware

1 Like

I’ve loaded the firmware from git clone https://source.puri.sm/Librem5/redpine-firmware-nonfree and changed also in /etc/modprobe.d/librem5-devkit.conf

dev_oper_mode from 5 to 13

With this Wifi and BT do work now in parallel, but with some hick-ups from time to time. I run in a SSH session a top and use in a L5 terminal a BT keyboard.

2 Likes

I did a fresh flash (byzantium) maybe 3 or 4 days ago and Bluetooth wasn’t working. Updated this morning and BT is working again. I am also getting the occasional hick-ups aswell. Maybe once per song. Happy to have it back :slight_smile: (No conf file updates needed. Everything stock)

It seems bluetooth is a bit of “hit and miss” on the L5 with Byzantium. I copied the firmware mentioned above to /lib/firmware as well as changed the /etc/modprobe.d/librem5-devkit.conf with dev_oper_mode from 5 to 13 and got it to work a couple of days ago. A few days later, it is not working and greyed out in the indicator panel. Toggling the wifi/BT kill switch brings it back though.

1 Like

Could you please show where you saw this? Is it on a phone log or a link someone sent?

This post was very enlightening, and potentially money-saving for some (with choosing to purchase a dongle). Do you have a log or a link to the commands they gave you? It might not work for all, and we can post that as a caveat, but it might be good to see the approach he took.

In your screenshot with syntax: dpkg -l | grep -i blue
The bluetooth still not work confident at moment with the libre driver, but if you reboot the phone with Bluetooth enabled on setting it should be work when rebooting.

This is my result on Byzantium:

purism@pureos:~$ dpkg -l | grep -i blue
ii bluez 5.55-3.1 arm64 Bluetooth tools and daemons
ii bluez-obexd 5.55-3.1 arm64 bluez obex daemon
ii gnome-bluetooth 3.34.3-2 arm64 GNOME Bluetooth tools
ii libbluetooth3:arm64 5.55-3.1 arm64 Library to use the BlueZ Linux Bluetooth stack
ii libgnome-bluetooth13:arm64 3.34.3-2 arm64 GNOME Bluetooth tools - support library
ii pulseaudio-module-bluetooth 14.2-2pureos1 arm64 Bluetooth module for PulseAudio sound server

1 Like

Sure, I’ll post below

CAUTION: the following firmware worked on my Librem 5 Evergreen with Byzantium. The problem presented as the one described in my post above. I don’t know why it wouldn’t work with other phones, but it might not. Use at your own risk, or consult tech support yourself.

the instructions I was given from Purism tech support are as follows:

If you get “bluetooth not found” error, try these steps please:
Run these commands (one by one) in terminal:

  1. first command:
    wget https://source.puri.sm/angus.ainslie/firmware-rs9116-nonfree/-/raw/debian/master/Firmware/RS9116_NLINK_WLAN_BT_IMAGE.rps
  2. second command:
    sudo mv RS9116_NLINK_WLAN_BT_IMAGE.rps /lib/firmware
  3. reboot the phone.
    Let us know if that helped. If yes, you can later safely delete this firmware with this command:
    sudo rm /lib/firmware/RS9116_NLINK_WLAN_BT_IMAGE.rps

Here is a more comprehensive solution. A note: these steps might not solve all your problems, as they did not solve mine, but they are the steps so far that the support team have walked me through before the devs decided that they need to look at this closer.

For starters, let’s log the current behavior of the phone before we make edits:

  1. Make sure your phone is up to date. Either open the terminal and use sudo apt upgrade and sudo apt update, or go into the store and check for updates there.
  2. Confirm the kill switch is not set to disable the Bluetooth and wifi
  3. Restart the phone.
  4. Attempt to turn on the Bluetooth by going into its settings.
  5. Open a terminal and log the dmesg text. I just stored it in ~/Documents using sudo dmesg > dmseg_default_firmware.txt. This can be useful for when you contact support@puri.sm

After contacting the support team, they may ask you to do steps similar to the following:

  1. Get a more modern firmware from a repo. We have listed here on this forum to use https://source.puri.sm/Librem5/redpine-firmware-nonfree, but the support team pointed me to a fork using the command wget https://source.puri.sm/angus.ainslie/firmware-rs9116-nonfree/-/raw/debian/master/Firmware/RS9116_NLINK_WLAN_BT_IMAGE.rps. It might be beneficial to try one if the other doesn’t work.
  2. Create a firmware folder on your phone if it doesn’t exist already: sudo mkdir /lib/firmware.
  3. Move the newly downloaded firmware, using sudo mv -t /lib/firmware RS9116_NLINK_WLAN_BT_IMAGE.rps
  4. Reboot the phone.
  5. Attempt to turn on Bluetooth in the settings.
  6. If trouble occurs, open a terminal, and save the dmesg for he support team: for example, I did sudo dmesg > dmesg_new_firmware.txt.

Finally, some people had luck changing a setting in /etc/modprobe.d/librem5-devkit.conf. Look for all occurrences of dev_oper_mode. If they are set to 5, try changing to 13, and vice-versa. I’m not sure of the significance of these modes, so be sure to document this change for future debugging, if you make it. See the changes here:

3 Likes

Im in a similar boat…i was wondering if this is a hardware or software issue?

1 Like