Bluetooth support for Librem 5

  1. First here, my SOLUTION for Byzantium (and Amber) to the problem with BT
    (tested on 3 different Librem 5 with different out of the box BT problems):
    The file RS9116_NLINK_WLAN_BT_IMAGE.rps we find indicated in the forum is the
    newest firmware version of the repo (now the 2.3.2.003), but does not
    really fit the Librem 5. I had to find the working version, for me the
    1.2.20. So :
    It is a bit like Bluetooth support for Librem 5 but I give here more details about how to and why it should work.
  • download the repository
    https://source.puri.sm/Librem5/redpine-firmware-nonfree/-/tree/master/files/firmware OR https://source.puri.sm/guido.gunther/firmware-rs9116-nonfree/-/tree/debian/master/
  • copy and rename the chosen version (for me the 1.2.20) to
    RS9116_NLINK_WLAN_BT_IMAGE.rps in the folder /lib/firmware (should
    exist)
    Note that https://source.puri.sm/guido.gunther/firmware-rs9116-nonfree/-/tree/debian/master/ has only this version in the repository…
  • check with sudo vi /etc/modprobe.d/librem5-devkit.conf
  • For firmware below version 2.x., then for our “1.2.20”, you have to
    find twice dev_oper_mod= 13, not 5. 5 only fits firmware version
    from 2.x.
  • reboot and test. It should work immediately or not. If not, try another
    file (do not forget to change the dev_oper_mod according to the
    firmware version! you’ve chosen)
  • on reboot and BT initialization, the file gets flashed to hardware, and deleted
    from /lib/firmware. This looks to be normal.
  • Controlling the firmware install with sudo dmesg | grep redpine, we
    must read only once ''FW Version : 1.2.20.0 version " and “operating mod : 13 (WI-FI STA + BT DUAL”, and no errors (except “Failed to open file RS9116…rps”, that is normal because it is only done on manual firmware change)
  1. Second, HOW I PROCEEDED, except the hours/days of searching a solutioon:
    I own 3 librem 5 Evergreen, bought at purism, and received in two deliveries: 2 end of June 2021, and one more in October 2021) with 3 different out of the box BT problems, so I could verify the solution here, which I did not find complete on this forum:

I encountered following problems :

With pre-installed Amber on 2 different L5, named as L5-1 and L5-2 here; received together in June 2021) :

  • state 1: out of the box, everything was fine for connecting a BT mouse and a
    keyboard (L5-1), OR not working (L5-2 : bluetooth icon could be set on or off, but that was all)
  • state 2, after a certain update : not working any more (L5-1) : Phone crashes (shutdown) after bluetooth connection to device, OR still not working (L5-2)
  • state 3, through manual staged amber update : solved L5-1 OR still not working (L5-2).
  • state 4: through normal later amber update : L5-1 is still working, the L5-2 still not.

With Byzantium (the BT nightmare), 3 errors cases :

  1. L5-3 (received in October 2021 had pre-installed Byzantium on it) : BT icon was not responding to click, always turned off position in the notification panel, and in the menu : grey switch off not reacting to click. (!!!)
  2. L5-1 and L5-2 : after flashing Byzantium, BT icon is switchable, but not searching., not starting.
    searching wheel in BT settings, it turns without finding my mouse/keyoard not
    working any more (with my mouse and keyboard). Did all things from forums without success (Bluetooth : no keyboard, no mouse recognized) and gave up.
  3. After reflashing firmware with the indicated file in the forum (i.e the latest firmware version) or full reinstalling the driver (see below) : L5-2 got a change : : BT was starting but not finding mouse/keyboard (searching turning wheel), but connecting my android phone and other desktop computer without problem (!).
  • What did not work:
    • reflashing Amber or Byzantium, Back to Amber, the BT did not work any more
    • copying the firmwarre file in /lib/firmware, as described in the
      forum
    • changing dev_oper_mod to 5 or 13, and reverse
    • reinstalling redpine firmware as described in
      https://source.puri.sm/Librem5/redpine-firmware-nonfree/-/tree/master
    • Controlling the firmware with sudo dmesg | grep redpine gave me a bit understanding till i found the solution with the good file (the 1.2.20 firmware version), after trying all versions.
  1. CONCLUSION :
  • with firmware 1.2.20 + dev_oper_mod=13, all my devices are connected perfectly

  • with a later firmware + dev_oper_mod=5, can only connect devices like phones or computer

  • depending on the mix between;

    • the preinstalled or flashed pureos image version (brings the file /etc/modprobe.d/librem5-devkit.conf, so the dev_oper_mod to 5 (Byzantium) or 13 (Amber),
    • AND the firmware file .rps that was first flashed by the production of the device through the repo /lib/firmware (depends on the batch of your device and is changed only by a manuall procedure),
    • we get different levels of errors, that we can see with sudo dmesg | grep redpine (see upper the good log)
  • I wonder why purism does not deliver the pureos image with the right file /etc/modprobe.d/librem5-devkit.conf, AND the right file in /lib/firmware that could be flashed on the first restart after flashing or someway else.

I hope that this will work for many of you. I will modify my post if it is needed. Good luck !!!

PS: Wifi was almost always ok from the begiining, but during my tests, I had different bugs with the wifi too like not connecting to network, or not restarting/reconnecting after reboot, or disconnecting after some minutes needing wifi reboot but disconnected again…, but once I solved the BT problems, wifi worked worked like a charm too.

8 Likes