Manual Updates for Librem5

Hi,

As far as I understood there are some parts which need to be manually updated for the Librem5:
Modem Firmware (???)
WLan Firmware (???)
uBoot (Status of Suspend for Librem 5)
SmartCardReader Firmware (https://puri.sm/posts/openpgp-in-your-pocket/)

This leaves me with some questions:
1.) Is there anything else which should be manually updated?
2.) Does anyone have a link to the How to update for the Modem & WLan?
3.) Is it safe to do this updates or where to find the latest suggested version?

Thx!

7 Likes

I think there are large gaps in the documentation for this at the moment.

This one is easy and yet not.

Create the directory /lib/firmware if it does not already exist
Download firmware
Plonk it in that directory
Reboot
New firmware should be transferred to WiFi card automatically during boot

Well, I would say that regression is possible. So before doing this, you should get hold of your existing firmware version (and that, for a start, means knowing how to check what version that is).

I won’t say “should be” but for “can be” … yes, the USB-C PD firmware. That may be the only one that I have actually done (so I could in theory write it up).

2 Likes

I received instructions from support@puri.sm for updating the modem firmware when I let them know that my device wasn’t un-suspending on phone calls. I can share those instructions here but that’s missing the point, because as @irvinwade said,

there are large gaps in the documentation for this at the moment.

I also assume there might be a slight risk to updating the modem firmware (which is maybe why it’s limited to support cases).

1 Like

Thx for the input.
So it would be good to have basically the following for the manual update parts:
a.) How to see the version which is currently in place on the personal device?
b.) Where can we get the latest (and hopefully also historic) version of the update?
c.) Where can we see which is the suggested version by Purism?
d.) Instructions how to do the update.

And that for all five detected parts:
1.) Modem Firmware (???)
2.) WLan Firmware (???)
3.) uBoot (Status of Suspend for Librem 5 )
4.) SmartCardReader Firmware (https://puri.sm/posts/openpgp-in-your-pocket
5.) USB-C PD firmware

I will try to collect some of the information and put into this thread.
If you find information please share it here. May be this can be moved to a documentation?

I think for the point c) “Which is the suggested version by Purism” we would need somebody from Purism to comment on this.

I have not tested yet all described instructions. Please be aware that you should not update the firmware if you are not sure what you are doing!

For now we have:
1a) How to see the Modem Firmware Version of your device [currently not working]:
sudo mmcli -m any --command=“AT+GMR”
based on Librem 5 BroadMobi modem reports wrong (?) manufacturer/model info -- bug in firmware? Where to find documentation for the modem?

1b) Where can we get the latest Modem firmware Version [not tested]:
???

1c) How can we see which Modem Firmware version is suggested by Purism [not tested]:
???

1d) How to install an Modem Firmware Version [not tested]:
???

2a) How to see the WLan Firmware Version of your device [tested]:
sudo dmesg | grep redpine | grep Version

2b) Where can we get the latest WLan firmware Version [tested]:
May be not the latest but at least some versions:


There seems to be a newer version which I haven’t tested yet:

2c) How can we see which WLan Firmware version is suggested by Purism [not tested]:
???

2d) How to install an WLan Firmware Version [tested]:
Create the directory /lib/firmware if it does not already exist
Download firmware
copy it in that directory
Reboot
New firmware should be transferred to WiFi card automatically during boot
The firmware file should be deleted after the successfull installation

3a) How to see the uBoot Version of your device [tested]:
cat /proc/cmdline

3b) Where can we get the latest uBoot Version [not working]:
From the PureOS APT Repository with the package name “u-boot-librem5”.

3c) How can we see which uBoot version is suggested by Purism [not working]:
I assume that the version in the PureOS APT Repository with the package name “u-boot-librem5” is declared as stable by Purism.

3d) How to install an uBoot Version [not working]:
Run sudo apt update && sudo apt install u-boot-librem5 to install a package that can update the bootloader.
Run sudo u-boot-install-librem5 /dev/mmcblk0 to update the bootloader.
Reboot the phone via the GUI or run sudo reboot to start the phone using the newly updated bootloader.

4a) How to see the SmartCard Reader Version of your device [not tested]:
???

4b) Where can we get the latest SmartCard Reader Version [not tested]:

4c) How can we see which SmartCard Reader Firmware version is suggested by Purism [not tested]:
???

4d) How to install an SmartCard Reader Firmware Version [not tested]:
sudo apt install stm32flash git
git clone https://source.puri.sm/firmware/ttxs-firmware
cd ttxs-firmware
./scripts/stm_reflash.sh

5a) How to see the USB-C PD Firmware Version of your device [unclear if this is the version]:
sudo cat /sys/kernel/debug/tps6598x/0-003f/customer_use

5b) Where can we get the latest USB-C PD firmware Version [not tested]:
May be not the latest but at least some versions:

5c) How can we see which USB-C PD Firmware version is suggested by Purism [not tested]:
???

5d) How to install an USB-C PD Firmware Version [not tested]:

8 Likes

I searched the forum and found for all things descriptions how to see which version is currently installed on a Librem5.
And for everything expect the modem firmware also a description how to update it.

Based on this the following things are open:
-) Validation of the descriptions
-) Description How to update the Modem Firmware
-) Which are versions which are suggested by Purism

For the case we don’t get suggested versions from Purism we can at least have a look what is installed on current Librem5 when they are sent to customers.

Can may be someone who received a Librem5 last year try to extract which versions are running on his device? (Basically all steps with the a)
And then post the Versions and the information in which month when the Librem5 was sent by Purism?
Please only do this if you are an experienced user and know what you are doing!

I will try the ways how to see my current versions on my device in the next days and post if my device is still working afterwards. :slight_smile:
But I am pretty sure that I already did at least an update on the WLan Firmware.
And my device is already some years old so I would assume that Purism is already delivering newer versions (then I have) to customers.

1 Like

I now tested the commands to identify the installed version.
My Librem5 still works as before the commands. So they seem to be save so far.

1a) How to see the Modem Firmware Version of your device:
sudo mmcli -m any --command=“AT+GMR”

returns:
error: command failed: ‘GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Unauthorized: Cannot send AT command to modem: operation only allowed in debug mode’

So there are steps missing.

2a) How to see the WLan Firmware Version of your device:
sudo dmesg | grep redpine | grep Version

returns:
[ 70.658088] redpine_91x: Received Board Version Number: 10
[ 75.749120] redpine_91x: ================ RSI Version Info ==============
[ 75.749127] redpine_91x: FW Version : 0.2.0.16
[ 75.749132] redpine_91x: RSI FW Version : 1610.0.2.0.0024
[ 75.749138] redpine_91x: Driver Version : RS9116.NB0.NL.GNU.LNX.OSD.2.0.0.0024

3a) How to see the uBoot Version of your device:
cat /proc/cmdline

returns:
u_boot_version=2019.04-g17a6c2261c console=ttymxc0,115200 quiet fsck.repair=yes security=apparmor splash plymouth.ignore-serial-consoles vt.global_cursor_default=0

5a) How to see the USB-C PD Firmware Version of your device:
sudo cat /sys/kernel/debug/tps6598x/0-003f/customer_use

returns:
0x4c35445000000200

I am not sure if this is really helpful.

I also did an update to the WLan Firmware so I successfully tested the following points:
2a, 2b, 2d, 3a & 4a

I didn’t have success with:
1a…Just returns an error
3b & 3d…The package “u-boot-librem5” doesn’t exist on my device.

1 Like

This is not or will not be the standard way how this is handled. To not have the proprietary firmware in the distribution while still being able to deliver it to customers Purism put the firmware in a NAND flash on the Librem5.

This flash is mounted during boot of the Librem5 and then integrated into the (managed by deb packages) OS filesystem via overlay-fs.

If one does put firmware in that directory it will probably overrule the firmware from the NAND flash if that flash is already used on that Librem5.

It might lead sometimes to incompatibilities with some process Purism might design to activate and update the NAND flash.

1 Like

Thx for the hint!

Based on the hash the jail contains another version of the RS9116 Firmware.
But it also contains other WLan Firmware.
So this is only related to “2.) WLan Firmware”.

The firmware files in this jail seem to be stored here:


Based on the description it should be a newer version of the RS9116 Firmware.
I will add this to “2b) Where can we get the latest WLan firmware Version”

The RS9116 WLan card has a (updateable) firmware stored on the M.2 card (as far as I know). May be the other cards from this repository don’t have it stored and need to side load it every time.
So this jail enables Purism to switch the WLan Card without having a closed source binary in the normal filesystem. I think this is then a similar solution like they used for the DDR Training data.

As they didn’t automatically deliver closed source binaries in the past I fear that will not help to keep this firmware up-to-date. But hopefully I am wrong here and they can/will provide updates with it.

1 Like

See https://source.puri.sm/Librem5/community-wiki/-/wikis/Tips%20&%20Tricks#executing-an-at-command-on-the-modem

Yes, it is. :wink: Reads as: L5DP 0x00 0x00 0x02 0x00, which I take as version 0.2.0

I guess that illustrates why Purism needs to provide official documentation on what the “correct” way is.

1 Like

I bet they will. But these are all things very young and maybe still subject to changes.

I’d suggest something else:

  • keep away from updating / changing things manually
  • do that only when support@puri.sm asks you to do it

If you want to tinker with your L5 and even maybe want to start developing for it: you’re welcome to dive into the subject and you’ll find an open community of developers, contributors and testers.

This community - like here in the forum, on https://source.puri.sm and on matrix will happily support you if you’re willing to learn and to give back:

  • if there’s something strange open issues on gitlab (Purism, gnome, upstream wherever)
  • take the time to add to the issues whatever information is needed and requested
  • try to share what you learn (writing here or even better in the community wiki or even better by creating merge request for the official documentation)
  • find your corner where you can contribute in exchange for the time people take to help you learn

I can only say it is a beautiful learning experience and there’s a lot of fun in it.

But making lists on what to update manually and how to maybe achieve that goal without breaking something for users in my opinion is not the right way. It’s better to invest that time in following the ways of the community to really improve things and to make these kinds of cookbooks obsolete.

Join the matrix channel, open git accounts, read into developer.puri.sm and the community wiki and get going! :partying_face:

1 Like

Well, OK, if that really were what Purism thinks then that’s what the official documentation can say i.e. discourage random updating.

From what I’ve seen though, there are enough problems with the WiFi firmware that customers really do need to be able to try out different versions in order to see whether any available version combines the nirvana of a) WiFi works, and b) all the Bluetooth devices that the customer actually wants to pair with the Librem 5 work.

Even if tinkering is discouraged, it still makes sense to document the correct way to get the firmware version - so that a customer approaching Purism support could proactively provide that information in the problem description.

My understanding is that updating the firmware on the modem card is actually discouraged because brickage is a possibility.

2 Likes

“download” what “firmware” from where?

and how does one become “knowing” how to check?

I doubt these updates would help me, but I’ll try anything right now if it will exorcise this phone!
~s

1 Like

Probably not a good idea. Better is start a new topic describing what WiFi problem you are having.

3 Likes

Very funny guys.
Now, how does one check for updates?

1 Like

I think we have established that there is no clean / simple / documented way to check for firmware updates (for any of the ancillary devices).

If you have only had your phone for a few days then I can only say again that I recommend against firmware updates unless directed to do so by Purism support. OK, I admit that you may have decades of Linux in embedded environments experience and know exactly what you are doing in which case go your hardest.

This is in stark contrast with vanilla software updates, which you generally should apply without delay and which should be being detected (checked for) automatically. Are they? But this may be better in a separate topic, since this topic is about firmware updates for the ancillary devices.

3 Likes

I now did the uBoot Update on my Librem5 and updated the description.
I could not update my previous post so I added it here.

3a) How to see the uBoot Version of your device [tested]:
cat /proc/cmdline

3b) Where can we get the latest uBoot Version [not working]:
Go to https://source.puri.sm/Librem5/uboot-imx/-/jobs/

3c) How can we see which uBoot version is suggested by Purism [not working]:
I assume that the version on the GIT Repository with the package name “u-boot-librem5” is declared as stable by Purism.

3d) How to install an uBoot Version [not working]:
Go to https://source.puri.sm/Librem5/uboot-imx/-/jobs/

find a recent job which passed
Download the “u-boot*_arm64.deb” for the recent job:
wget https://source.puri.sm/Librem5/uboot-imx/-/jobs/406070/artifacts/raw/debian/output/u-boot-librem5_2022.10-librem5.1_arm64.deb

Install the downloaded package with:
sudo apt install ./u-boot*_arm64.deb

Update the bootloader:
sudo u-boot-install-librem5 /dev/mmcblk0

Reboot the phone to start the phone using the newly updated bootloader.

1 Like

I just made a modem firmware update and made a new merge of the preivous descriptions.

For each manual update part there are the following subpoints:
a.) How to see the version which is currently in place on the personal device?
b.) Where can we get the latest (and hopefully also historic) version of the update?
c.) Where can we see which is the suggested version by Purism?
d.) Instructions how to do the update.

And that for all five detected parts:
1.) Modem Firmware
2.) WLan Firmware
3.) uBoot (Status of Suspend for Librem 5)
4.) SmartCardReader Firmware (https://puri.sm/posts/openpgp-in-your-pocket)
5.) USB-C PD firmware

I tried to collect some of the information and put into this thread.
If you find information please share it here. May be this can be moved to a documentation?

I think for the point c) “Which is the suggested version by Purism” we would need somebody from Purism to comment on this.

I have not tested yet all described instructions. Please be aware that you should not update the firmware if you are not sure what you are doing!

For now we have:
1a) How to see the Modem Firmware Version of your device [tested]:
sudo apt install bm818-tools

1b) Where can we get the latest Modem firmware Version [tested]:
Contact support@puri.sm

1c) How can we see which Modem Firmware version is suggested by Purism [tested]:
Based on the post of dos (Status of Suspend for Librem 5):
The first and second part of the firmware version string needs to have the timestamp of at least 2022-09-26. If it’s older than that, waking the system up on modem events may be unreliable.
Contact support@puri.sm for the suggested version for upgrade.

1d) How to install an Modem Firmware Version [tested]:
Contact support@puri.sm

2a) How to see the WLan RedPine Firmware Version [tested]:
sudo dmesg | grep redpine | grep Version

2b) Where can we get the latest WLan RedPine firmware Version [tested]:
May be not the latest but at least some versions:

There seems to be a newer version which I haven’t tested yet:

2c) How can we see which WLan Firmware version is suggested by Purism [not tested]:
???

2d) How to install an WLan Firmware Version [tested]:
Create the directory /lib/firmware if it does not already exist
Download firmware
copy it in that directory
Reboot
New firmware should be transferred to WiFi card automatically during boot
The firmware file should be deleted after the successfull installation

3a) How to see the uBoot Version of your device [tested]:
cat /proc/cmdline

3b) Where can we get the latest uBoot Version [tested]:
Go to https://source.puri.sm/Librem5/uboot-imx/-/jobs/

3c) How can we see which uBoot version is suggested by Purism [not working]:
I assume that the version in the PureOS Page with the package name “u-boot-librem5” is declared as stable by Purism.

3d) How to install an uBoot Version [tested]:
Go to https://source.puri.sm/Librem5/uboot-imx/-/jobs/

find a recent job which passed
Download the “u-boot*_arm64.deb” for the recent job:
wget https://source.puri.sm/Librem5/uboot-imx/-/jobs/406070/artifacts/raw/debian/output/u-boot-librem5_2022.10-librem5.1_arm64.deb

Install the downloaded package with:
sudo apt install ./u-boot*_arm64.deb

Update the bootloader:
sudo u-boot-install-librem5 /dev/mmcblk0

Reboot the phone to start the phone using the newly updated bootloader.

4a) How to see the SmartCard Reader Version of your device [not tested]:
???

4b) Where can we get the latest SmartCard Reader Version [not tested]:

4c) How can we see which SmartCard Reader Firmware version is suggested by Purism [not tested]:
???

4d) How to install an SmartCard Reader Firmware Version [not tested]:
sudo apt install stm32flash git
git clone https://source.puri.sm/firmware/ttxs-firmware
cd ttxs-firmware
./scripts/stm_reflash.sh

5a) How to see the USB-C PD Firmware Version of your device [not tested]:
based on https://source.puri.sm/Librem5/firmware-tps6598x-nonfree/-/blob/master/dp-alt-mode-adapters.org
sudo cat /sys/kernel/debug/tps6598x/0-003f/customer_use
sudo cat /sys/kernel/debug/tps6598x/0-003f/code_version

5b) Where can we get the latest USB-C PD firmware Version [not tested]:
May be not the latest but at least some versions:

5c) How can we see which USB-C PD Firmware version is suggested by Purism [not tested]:
???

5d) How to install an USB-C PD Firmware Version [not tested]:

11 Likes

Bear in mind that Purism is no longer shipping that WiFi card in new phones. Instead they are shipping the SparkLAN card - and the information definitely is different. New Post: Shipping new SparkLAN Wifi cards with Librem 5

In principle you will need both sets of information, as there are plenty of customers who still have the old Redpine card.

4 Likes

Hoi Everybody

Ordered my Librem5 august 2019 received may 2023 in the Netherlands
Very happy with the phone
The thickness doesnt botter me feels good in my hands
The overall speed is acceptable and all the apps can be used
The screen is very good and clear
The sound is great esspacielly with the earplugs
Yesterday i tried for the first time convergene it was not so easy but after some fiddeling i managed to get it on the big screen
The things i do have problems with are continues losing cellular internet connection
My APN settings are the same as on my Android
I have T-Mobile Netherland
I also have problems with receiving sms
I can send to everybody but people with also t-mobile cannot send me anything back people on other networks can send me sms without any problem
Overal i think this phone will be better and useful in time but for now i cannot use it daily because of the losing connections
Much greetings from Holland
I would like to send Kudus to Purism because after all the kept their promise and dileverd the phone build out of almost nothing in such a small company

4 Likes

I have T-Mobile, works well after some settings, one sec and I’ll link the URL here… https://forums.puri.sm/t/us-t-mobile-settings-for-data-and-mms/16810

2 Likes