Problems detecting Redpine wifi/bluetooth card

I have always had issues with my Librem5 sometimes not recognising the wifi/bluetooth card. I just reflashed to Crimson, and I was hoping that that might sort things out, but no such luck. I came across this post: After flashing Crimson no Wifi/Bluetooth and tried leaving the battery out overnight as well. The following day the wifi card was found, but after operating the kill switch it didn’t come back. I have captured some output from journalctl, which looks odd to me. Can anyone help with understanding what is going on here, or finding a fix?

Sep 08 16:59:24 pureos kernel: redpine_91x: Packet Dropped as Key ID not matched with both current and previous Key ID
Sep 08 16:59:26 pureos kernel: redpine_91x: Packet Dropped as Key ID not matched with both current and previous Key ID
Sep 08 16:59:26 pureos kernel: redpine_91x: Packet Dropped as Key ID not matched with both current and previous Key ID
Sep 08 16:59:26 pureos kernel: redpine_91x: Packet Dropped as Key ID not matched with both current and previous Key ID
Sep 08 16:59:27 pureos kernel: redpine_91x: Packet Dropped as Key ID not matched with both current and previous Key ID
Sep 08 16:59:28 pureos kernel: redpine_91x: Packet Dropped as Key ID not matched with both current and previous Key ID
Sep 08 16:59:28 pureos kernel: redpine_91x: Packet Dropped as Key ID not matched with both current and previous Key ID
Sep 08 16:59:29 pureos kernel: redpine_91x: Packet Dropped as Key ID not matched with both current and previous Key ID
Sep 08 16:59:30 pureos kernel: redpine_91x: Packet Dropped as Key ID not matched with both current and previous Key ID
Sep 08 16:59:30 pureos kernel: redpine_91x: Packet Dropped as Key ID not matched with both current and previous Key ID
Sep 08 16:59:32 pureos kernel: redpine_91x: Packet Dropped as Key ID not matched with both current and previous Key ID
Sep 08 16:59:32 pureos kernel: redpine_91x: Packet Dropped as Key ID not matched with both current and previous Key ID
Sep 08 16:59:32 pureos kernel: redpine_91x: Packet Dropped as Key ID not matched with both current and previous Key ID
Sep 08 16:59:32 pureos systemd[1]: Starting systemd-rfkill.service - Load/Save RF Kill Switch Status…
Sep 08 16:59:32 pureos systemd[1]: Started systemd-rfkill.service - Load/Save RF Kill Switch Status.
Sep 08 16:59:32 pureos iio-sensor-prox[1100]: Accel read from IIO on ‘lsm9ds1-imu_accel’ failed
Sep 08 16:59:32 pureos iio-sensor-prox[1100]: Accel read from IIO on ‘lsm9ds1-imu_accel’ failed
Sep 08 16:59:33 pureos kernel: vcnl4000 1-0060: Failed to power down (-ENXIO)
Sep 08 16:59:33 pureos NetworkManager[975]: [1788883173.1132] manager: rfkill: Wi-Fi now disabled by radio killswitch
Sep 08 16:59:33 pureos NetworkManager[975]: [1788883173.1183] device (wlan0): state change: activated → unavailable (reason ‘none’, sys-iface-state: ‘managed’)
Sep 08 16:59:33 pureos systemd[1]: iio-sensor-proxy.service: Deactivated successfully.
Sep 08 16:59:33 pureos NetworkManager[975]: [1788883173.1380] dhcp4 (wlan0): canceled DHCP transaction
Sep 08 16:59:33 pureos NetworkManager[975]: [1788883173.1381] dhcp4 (wlan0): activation: beginning transaction (timeout in 45 seconds)
Sep 08 16:59:33 pureos NetworkManager[975]: [1788883173.1381] dhcp4 (wlan0): state changed no lease
Sep 08 16:59:33 pureos kernel: wlan0: deauthenticating from be:be:f4:af:33:43 by local choice (Reason: 3=DEAUTH_LEAVING)
Sep 08 16:59:33 pureos avahi-daemon[977]: Withdrawing address record for 192.168.178.44 on wlan0.
Sep 08 16:59:33 pureos avahi-daemon[977]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.178.44.
Sep 08 16:59:33 pureos systemd-resolved[932]: wlan0: Bus client reset search domain list.
Sep 08 16:59:33 pureos systemd-resolved[932]: wlan0: Bus client set default route setting: no
Sep 08 16:59:33 pureos systemd-resolved[932]: wlan0: Bus client reset DNS server list.
Sep 08 16:59:33 pureos avahi-daemon[977]: Interface wlan0.IPv4 no longer relevant for mDNS.
Sep 08 16:59:33 pureos wpa_supplicant[1040]: wlan0: CTRL-EVENT-DISCONNECTED bssid=be:be:f4:xx:yy:zz reason=3 locally_generated=1
Sep 08 16:59:33 pureos kernel: redpine_91x: rsi_mac80211_bss_info_changed: Change of ERP INFO: 0
Sep 08 16:59:33 pureos kernel: redpine_91x: rsi_mac80211_bss_info_changed: Sending vap updates…
Sep 08 16:59:33 pureos wpa_supplicant[1040]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
Sep 08 16:59:33 pureos avahi-daemon[977]: Withdrawing address record for fe80::2468:c8e3:xxxx:yyyy on wlan0.
Sep 08 16:59:33 pureos avahi-daemon[977]: Leaving mDNS multicast group on interface wlan0.IPv6 with address fe80::2468:c8e3:xxxx:yyyy.
Sep 08 16:59:33 pureos avahi-daemon[977]: Interface wlan0.IPv6 no longer relevant for mDNS.
Sep 08 16:59:33 pureos wpa_supplicant[1040]: wlan0: PMKSA-CACHE-REMOVED be:be:f4:xx:yy:zz 0
Sep 08 16:59:33 pureos wpa_supplicant[1040]: wlan0: PMKSA-CACHE-REMOVED be:be:f4:xx:yy:zz 0
Sep 08 16:59:33 pureos wpa_supplicant[1040]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Sep 08 16:59:33 pureos kernel: redpine_91x: <==== Interface DOWN ====>
Sep 08 16:59:33 pureos NetworkManager[975]: [1788883173.2650] device (wlan0): set-hw-addr: set MAC address to 0A:33:98:xx:yy:zz (scanning)
Sep 08 16:59:33 pureos wpa_supplicant[1040]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
Sep 08 16:59:33 pureos NetworkManager[975]: [1788883173.2823] device (p2p-dev-wlan0): state change: disconnected → unavailable (reason ‘supplicant-failed’, sys-iface-state: ‘managed’)
Sep 08 16:59:33 pureos systemd[1]: Starting NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service…
Sep 08 16:59:33 pureos wpa_supplicant[1040]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
Sep 08 16:59:33 pureos wpa_supplicant[1040]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Sep 08 16:59:33 pureos systemd[1]: Started NetworkManager-dispatcher.service - Network Manager Script Dispatcher Service.
Sep 08 16:59:34 pureos kernel: redpine_91x: rsi_sdio_write_register_multiple: Synch Cmd53 write failed -16
Sep 08 16:59:34 pureos kernel: redpine_91x: rsi_sdio_host_intf_write_pkt: Unable to write onto the card: -16
Sep 08 16:59:34 pureos kernel: redpine_91x: rsi_send_mgmt_pkt: Failed to write the packet
Sep 08 16:59:34 pureos kernel: redpine_91x: #####Interface is down#####
Sep 08 16:59:34 pureos kernel: redpine_91x: rsi_sdio_write_register_multiple: Stopping card writes
Sep 08 16:59:34 pureos kernel: redpine_91x: rsi_sdio_check_buffer_status: Failed to read status register
Sep 08 16:59:35 pureos kernel: redpine_91x: rsi_sdio_check_buffer_status: Failed to read status register
Sep 08 16:59:35 pureos NetworkManager[975]: [1788883175.3230] device (wlan0): state change: unavailable → unmanaged (reason ‘removed’, sys-iface-state: ‘removed’)
Sep 08 16:59:35 pureos NetworkManager[975]: [1788883175.3271] device (p2p-dev-wlan0): state change: unavailable → unmanaged (reason ‘removed’, sys-iface-state: ‘removed’)
Sep 08 16:59:35 pureos systemd[1172]: Stopped pulseaudio-redpine.service - Disable automatic switch to HSP/HFP in PulseAudio on Redpine cards.
Sep 08 16:59:35 pureos NetworkManager[975]: [1788883175.3611] radio killswitch /sys/devices/platform/soc@0/30800000.bus/30b50000.mmc/mmc_host/mmc1/mmc1:fffd/mmc1:fffd:1/ieee80211/phy0/rfkill5 disappeared
Sep 08 16:59:35 pureos bluetoothd[1343]: Endpoint unregistered: sender=:1.32 path=/MediaEndpoint/A2DPSource/ldac_hq
Sep 08 16:59:35 pureos bluetoothd[1343]: Endpoint unregistered: sender=:1.32 path=/MediaEndpoint/A2DPSource/ldac_sq
Sep 08 16:59:35 pureos bluetoothd[1343]: Endpoint unregistered: sender=:1.32 path=/MediaEndpoint/A2DPSource/ldac_mq
Sep 08 16:59:35 pureos bluetoothd[1343]: Endpoint unregistered: sender=:1.32 path=/MediaEndpoint/A2DPSink/aptx_hd
Sep 08 16:59:35 pureos bluetoothd[1343]: Endpoint unregistered: sender=:1.32 path=/MediaEndpoint/A2DPSource/aptx_hd
Sep 08 16:59:35 pureos bluetoothd[1343]: Endpoint unregistered: sender=:1.32 path=/MediaEndpoint/A2DPSink/aptx
Sep 08 16:59:35 pureos bluetoothd[1343]: Endpoint unregistered: sender=:1.32 path=/MediaEndpoint/A2DPSource/aptx
Sep 08 16:59:35 pureos bluetoothd[1343]: Endpoint unregistered: sender=:1.32 path=/MediaEndpoint/A2DPSink/sbc
Sep 08 16:59:35 pureos bluetoothd[1343]: Endpoint unregistered: sender=:1.32 path=/MediaEndpoint/A2DPSource/sbc
Sep 08 16:59:35 pureos bluetoothd[1343]: Endpoint unregistered: sender=:1.32 path=/MediaEndpoint/A2DPSink/sbc_xq_453
Sep 08 16:59:35 pureos bluetoothd[1343]: Endpoint unregistered: sender=:1.32 path=/MediaEndpoint/A2DPSource/sbc_xq_453
Sep 08 16:59:35 pureos bluetoothd[1343]: Endpoint unregistered: sender=:1.32 path=/MediaEndpoint/A2DPSink/sbc_xq_512
Sep 08 16:59:35 pureos bluetoothd[1343]: Endpoint unregistered: sender=:1.32 path=/MediaEndpoint/A2DPSource/sbc_xq_512
Sep 08 16:59:35 pureos bluetoothd[1343]: Endpoint unregistered: sender=:1.32 path=/MediaEndpoint/A2DPSink/sbc_xq_552
Sep 08 16:59:35 pureos bluetoothd[1343]: Endpoint unregistered: sender=:1.32 path=/MediaEndpoint/A2DPSource/sbc_xq_552
Sep 08 16:59:35 pureos systemd[1]: Stopped target bluetooth.target - Bluetooth Support.
Sep 08 16:59:35 pureos kernel: redpine_91x: rsi_reset_chip: Failed to Write SDIO WAKEUP REG
Sep 08 16:59:35 pureos systemd[1172]: Stopped target bluetooth.target - Bluetooth.
Sep 08 16:59:35 pureos kernel: sdhci-esdhc-imx 30b50000.mmc: card clock still not stable in 100us!.
Sep 08 16:59:35 pureos kernel: sdhci-esdhc-imx 30b50000.mmc: card clock still not stable in 100us!.
Sep 08 16:59:35 pureos kernel: sdhci-esdhc-imx 30b50000.mmc: esdhc_wait_for_card_clock_gate_off: card clock still not gate off in 100us!.
Sep 08 16:59:35 pureos kernel: sdhci-esdhc-imx 30b50000.mmc: esdhc_wait_for_card_clock_gate_off: card clock still not gate off in 100us!.
Sep 08 16:59:35 pureos kernel: redpine_91x: rsi_reset_card: CMD0 failed : -123
Sep 08 16:59:35 pureos kernel: redpine_91x: rsi_reset_card: CMD5 failed : -123
Sep 08 16:59:35 pureos kernel: redpine_91x: rsi_reset_card: CMD5 failed : -123
Sep 08 16:59:35 pureos kernel: redpine_91x: rsi_reset_card: card in not ready : 0 -123
Sep 08 16:59:35 pureos kernel: redpine_91x: rsi_sdio_check_buffer_status: Failed to read status register
Sep 08 16:59:35 pureos kernel: redpine_91x: ##### RSI SDIO device disconnected #####
Sep 08 16:59:35 pureos kernel: mmc1: card fffd removed
Sep 08 16:59:40 pureos systemd[1]: systemd-rfkill.service: Deactivated successfully.
Sep 08 16:59:40 pureos kernel: edt_ft5x06 2-0038: Unable to fetch data, error: -6
Sep 08 16:59:41 pureos systemd[1]: Starting systemd-rfkill.service - Load/Save RF Kill Switch Status…
Sep 08 16:59:41 pureos kernel: imx7-csi 30a90000.csi: Registered csi capture as /dev/video0
Sep 08 16:59:41 pureos kernel: imx7-csi 30b80000.csi: Registered csi capture as /dev/video1
Sep 08 16:59:41 pureos systemd[1]: Started systemd-rfkill.service - Load/Save RF Kill Switch Status.
Sep 08 16:59:41 pureos pipewire[1257]: spa.v4l2: ‘/dev/video0’ VIDIOC_ENUM_FRAMEINTERVALS: Inappropriate ioctl for device
Sep 08 16:59:41 pureos pipewire[1257]: spa.v4l2: ‘/dev/video0’ VIDIOC_ENUM_FRAMEINTERVALS: Inappropriate ioctl for device
Sep 08 16:59:41 pureos pipewire[1257]: spa.v4l2: ‘/dev/video1’ VIDIOC_ENUM_FRAMEINTERVALS: Inappropriate ioctl for device
Sep 08 16:59:41 pureos pipewire[1257]: spa.v4l2: ‘/dev/video1’ VIDIOC_ENUM_FRAMEINTERVALS: Inappropriate ioctl for device
Sep 08 16:59:41 pureos kernel: s5k3l6xx 3-002d: using DT ‘/soc@0/bus@30800000/i2c@30a50000/camera@2d’ for ‘rstn’ GPIO lookup
Sep 08 16:59:41 pureos kernel: of_get_named_gpiod_flags: parsed ‘rstn-gpios’ property of node ‘/soc@0/bus@30800000/i2c@30a50000/camera@2d[0]’ - status (0)
Sep 08 16:59:41 pureos kernel: gpio gpiochip0: Persistence not supported for GPIO 26
Sep 08 16:59:41 pureos kernel: s5k3l6xx 3-002d: probe i2c ffff0000046d2c00
Sep 08 16:59:41 pureos kernel: s5k3l6xx 3-002d: model low: 0x30
Sep 08 16:59:41 pureos kernel: s5k3l6xx 3-002d: model high: 0xC6
Sep 08 16:59:41 pureos kernel: s5k3l6xx 3-002d: revision number: 0xB0
Sep 08 16:59:41 pureos kernel: hi846 2-0020: using DT ‘/soc@0/bus@30800000/i2c@30a40000/camera@20’ for ‘reset’ GPIO lookup
Sep 08 16:59:41 pureos kernel: of_get_named_gpiod_flags: parsed ‘reset-gpios’ property of node ‘/soc@0/bus@30800000/i2c@30a40000/camera@20[0]’ - status (0)
Sep 08 16:59:41 pureos kernel: gpio gpiochip0: Persistence not supported for GPIO 25
Sep 08 16:59:41 pureos kernel: hi846 2-0020: using DT ‘/soc@0/bus@30800000/i2c@30a40000/camera@20’ for ‘shutdown’ GPIO lookup
Sep 08 16:59:41 pureos kernel: of_get_named_gpiod_flags: parsed ‘shutdown-gpios’ property of node ‘/soc@0/bus@30800000/i2c@30a40000/camera@20[0]’ - status (0)
Sep 08 16:59:41 pureos kernel: gpio gpiochip4: Persistence not supported for GPIO 4
Sep 08 16:59:41 pureos kernel: hi846 2-0020: chip id 08 46 using 2 mipi lanes
Sep 08 16:59:42 pureos kernel: st-magn-i2c 1-001e: DRDY on pin INT1 specified, but sensor does not support interrupts
Sep 08 16:59:42 pureos kernel: st-magn-i2c 1-001e: interrupts active high level
Sep 08 16:59:42 pureos systemd[1]: Starting iio-sensor-proxy.service - IIO Sensor Proxy service…
Sep 08 16:59:42 pureos kernel: irq: type mismatch, failed to map hwirq-7 for gpio@30220000!
Sep 08 16:59:42 pureos systemd[1]: Started iio-sensor-proxy.service - IIO Sensor Proxy service.
Sep 08 16:59:42 pureos iio-sensor-prox[2654]: Could not find trigger name associated with /sys/devices/platform/soc@0/30800000.bus/30a30000.i2c/i2c-1/1-006a/iio:device1
Sep 08 16:59:43 pureos systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
Sep 08 16:59:46 pureos systemd[1]: systemd-rfkill.service: Deactivated successfully.
Sep 08 16:59:49 pureos systemd-logind[1031]: Power key pressed short.
Sep 08 17:00:59 pureos kernel: edt_ft5x06 2-0038: Unable to fetch data, error: -6

After that, operating the kill switch just give me the following without reactivating the card:

Sep 08 17:02:59 pureos systemd[1]: Starting systemd-rfkill.service - Load/Save RF Kill Switch Status…
Sep 08 17:02:59 pureos systemd[1]: Started systemd-rfkill.service - Load/Save RF Kill Switch Status.
Sep 08 17:03:00 pureos NetworkManager[975]: [1788883380.0259] manager: rfkill: Wi-Fi now enabled by radio killswitch
Sep 08 17:03:04 pureos systemd[1]: systemd-rfkill.service: Deactivated successfully.
Sep 08 17:03:09 pureos systemd-logind[1031]: Power key pressed short.
Sep 08 17:03:26 pureos systemd[1]: Starting systemd-rfkill.service - Load/Save RF Kill Switch Status…
Sep 08 17:03:26 pureos systemd[1]: Started systemd-rfkill.service - Load/Save RF Kill Switch Status.
Sep 08 17:03:26 pureos NetworkManager[975]: [1788883406.2914] manager: rfkill: Wi-Fi now disabled by radio killswitch
Sep 08 17:03:31 pureos systemd[1]: systemd-rfkill.service: Deactivated successfully.

Things are getting wierder….

I left the battery out again for a few hours, then started the phone up with the wifi switch set to enabled. The wifi card was recognised, and connected to a network. I left the phone alone for a day, and the wifi connection seemed quite stable. I then tried operating the wifi kill switch again. The wifi/bluetooth card was disconnected, but again I couldn’t re-enable it. Instead, with the top pull-down visible, I could see that the wifi kill switch was instead turning screen rotation on and off. I powered it down, and restarted (with the wifi kill switch in the enabled position). The behaviour on startup was the faulty one: the wifi kill switch enabled/disabled screen rotation rather than the wifi card.

This phone is looking less and less like it could ever become a daily driver - it has been flashed from new and updates applied, but it looks to me that somehow this kill switch ends up controlling the wrong hardware component. This doesn’t look like a simple hardware fault to me, or the wifi card would never be enabled, or am I missing something?

The kill switches are operating exactly as expected. Engaging all three switches also disables motion sensors (among other things), so the UI reflects that.

It’s a known issue that some Redpine cards may take several switch cycles to be recognized.

I had forgotten about that, sorry for the noise.

Since flashing Crimson, I have not once managed to re-enable wifi or bluetooth after disabling them with the kill switch, without removing the battery for a substantial period (once about 30 minutes was enough, otherwise several hours). My early assessment is that the situation is worse now than before reflashing.

I found one of your posts about the known redpine issue (or a similar one) here: Redpine wireless gone after upgrade into 6.6.0-1 - #6 by dos

With the other two kill switches disabled, toggling the wifi/bluetooth one on then off just gives:

[ 1773.834838] st-magn-i2c 1-001e: DRDY on pin INT1 specified, but sensor does not support interrupts
[ 1773.841454] st-magn-i2c 1-001e: interrupts active high level
[ 1773.910178] irq: type mismatch, failed to map hwirq-7 for gpio@30220000!
[ 1776.215837] vcnl4000 1-0060: Failed to power down (-ENXIO)

I kept toggling on and off, but after repeated attempts, that’s all I saw.

I then tried enabling the cellular modem which was recognised after a few seconds (no SIM present). After that, toggling the wifi/bluetooth kill switch produced no dmesg output at all. I then disabled the cellular modem, and the behaviour of the wifi kill switch returned to the previous behaviour.

Since first posting, I applied updates, but the behaviour hasn’t changed. “uname -a” now gives:

Linux pureos 6.18.0-1-librem5 #2 SMP PREEMPT 6.18.49pureos1~cri1 2026-09-03 06:01:00 UTC aarch64 GNU/Linux

To clarify and elaborate:

  • No, it is quite impossible that the kill switch is controlling the wrong hardware component.
  • If all three switches are off then the phone goes into lockdown mode where the sensors and the GPS are also disabled. This is implemented in hardware (as is the function of each individual switch).
  • Consequently, if doing testing in relation to this problem, I would recommend having the camera and microphone on so that lockdown mode is not activated regardless of the state of the WiFi switch - unless your threat model precludes enabling the camera and microphone.
  • This issue with detecting the WiFi card is not a hardware problem as far as I can tell but in any case certainly not a problem with the switch itself, which just controls power to the card.
  • Nor is it unique to you. I occasionally experience it myself.

Unfortunately I can’t give you an explanation of what the actual problem is because I don’t know why it happens.

However if it is really bugging you, it may be an option to upgrade the WiFi card from the Redpine card to the SparkLAN card.

With either or both of the modem and camera/microphone enabled, operating the wifi kill switch produces no dmesg output, which means that the testing possibilities are rather limited :wink: Since I reflashed, the only constant factor that I have found is that once the wifi card has been disabled, reenabling it requires removing the power from the whole device. This happened this morning because the battery was completely discharged, otherwise I need to remove the battery for a substantial period of time.

Yes, I’m starting to think that that is the only solution as well, although it looks like a more delicate procedure than the occasional minor laptop component replacements that I have done up to now.

Keep switching, and do it fast. Stop as soon as something shows up. It can take a while.

I’m not as convinced. This (mis)behavior of Redpine cards seems unit-specific. I have phones where it’s virtually not an issue and ones where it often takes many switch cycles for the card to show up.

However, I do have some ideas on what could be done in software to at least paper over the issue. It actually used to be (accidentally) papered over in the past, but fixing other things broke the mechanism that happened to hide this, and we can’t just go back to how it worked before without regressing in other areas.

So is replacing the WiFi card with a SparkLAN card likely to resolve the problem?

I’ve never seen or heard about it occurring with SparkLAN cards.

OK - I have given it a go, and after a few tries I do get dmesg output (this is with both of the other two switches enabled). Still no luck with actually enabling the card though. I do wonder about whether doing this routinely would wear the switch out eventually, and replacing that is more fiddly than fitting the SparkLAN card :wink: Also, when switching rapidly, I find it quite hard to stop as soon as I see a response, and I might not be stopping quickly enough.

I’m no expert, but it does feel like this to me, maybe my card is slightly outside spec in some way. This can vary between batches or even individual units.

Anyway, FWIW here is the dmesg ouput, which IIUC shows that the system is attempting to load the firmware, but doesn’t succeed:

[15757.023640] mmc1: card fffd removed
[15757.339630] mmc1: new high speed SDIO card at address fffd
[15757.342259] redpine_91x: rsi_probe: ***** 9116 Module *****
[15757.342490] redpine_91x: redpine_hal_device_init: oper_mode = 5, coex_mode = 2
[15757.343864] redpine_91x: Received Board Version Number: 10
[15757.344981] redpine_91x: rsi_load_firmware: Loading file RS9116_NLINK_WLAN_BT_IMAGE.rps
[15757.345712] redpine_91x:  FW Length = 329216 bytes
[15757.345756] redpine_91x: ================================================
[15757.345771] redpine_91x: ================ RSI Version Info ==============
[15757.345781] redpine_91x: ================================================
[15757.345794] redpine_91x: FW Version	: 2.1.0.0
[15757.345803] redpine_91x: RSI FW Version	:  1610.2.1.ab.ffbf
[15757.346632] redpine_91x: Driver Version	: RS9116.NB0.NL.GNU.LNX.OSD.2.0.0.0024
[15757.346667] redpine_91x: Operating mode	: 5 [Wi-Fi STA + BT EDR]
[15757.346684] redpine_91x: Firmware file	: RS9116_NLINK_WLAN_BT_IMAGE.rps
[15757.346692] redpine_91x: ================================================
[15757.526673] redpine_91x:  *** Flash CRC passed ***
[15757.529093] redpine_91x: ***** Loaded Firmware *****
[15762.619213] redpine_91x: rsi_sdio_master_access_msword: fail to access MASTER_ACCESS_MSBYTE
[15762.619251] redpine_91x: rsi_sdio_master_reg_read: Unable to set ms word to common reg
[15762.619262] redpine_91x: rsi_read_flash_fw_version: RSI_FLASH_READ_FW_VER failed
[15762.619300] redpine_91x: redpine_hal_device_init: Failed to load TA instructions
[15762.619318] redpine_91x: rsi_probe: Failed in device init
[15768.804993] redpine_91x: redpine_set_clr_tx_intention,357: Wait event failed
[15768.805058] redpine_91x: rsi_tx_scheduler_thread,629:  Failed to get tx_access

and:

[15774.992194] redpine_91x: redpine_set_clr_tx_intention,357: Wait event failed
[15774.992263] redpine_91x: rsi_coex_scheduler_thread,114:  Failed to get tx_access
[15774.992418] redpine_91x: rsi_probe: Failed in probe...Exiting
[15774.992463] RSI-SDIO WLAN mmc1:fffd:1: probe with driver RSI-SDIO WLAN failed with error 1
[15775.061174] mmc1: card fffd removed
[15780.193994] mmc1: new high speed SDIO card at address fffd
[15780.200002] redpine_91x: rsi_probe: ***** 9116 Module *****
[15780.200220] redpine_91x: redpine_hal_device_init: oper_mode = 5, coex_mode = 2
[15780.201593] redpine_91x: Received Board Version Number: 10
[15780.202691] redpine_91x: rsi_load_firmware: Loading file RS9116_NLINK_WLAN_BT_IMAGE.rps
[15780.203193] redpine_91x:  FW Length = 329216 bytes
[15780.203209] redpine_91x: ================================================
[15780.203216] redpine_91x: ================ RSI Version Info ==============
[15780.203225] redpine_91x: ================================================
[15780.203232] redpine_91x: FW Version	: 2.1.0.0
[15780.203242] redpine_91x: RSI FW Version	:  1610.2.1.ab.ffbf
[15780.203249] redpine_91x: Driver Version	: RS9116.NB0.NL.GNU.LNX.OSD.2.0.0.0024
[15780.203258] redpine_91x: Operating mode	: 5 [Wi-Fi STA + BT EDR]
[15780.203266] redpine_91x: Firmware file	: RS9116_NLINK_WLAN_BT_IMAGE.rps
[15780.203275] redpine_91x: ================================================
[15780.386338] redpine_91x:  *** Flash CRC passed ***
[15780.389860] redpine_91x: ***** Loaded Firmware *****
[15785.446129] redpine_91x: rsi_sdio_master_access_msword: fail to access MASTER_ACCESS_MSBYTE
[15785.446169] redpine_91x: rsi_sdio_master_reg_read: Unable to set ms word to common reg
[15785.446198] redpine_91x: rsi_read_flash_fw_version: RSI_FLASH_READ_FW_VER failed
[15785.446212] redpine_91x: redpine_hal_device_init: Failed to load TA instructions
[15785.446227] redpine_91x: rsi_probe: Failed in device init
[15791.631502] redpine_91x: redpine_set_clr_tx_intention,357: Wait event failed
[15791.631548] redpine_91x: rsi_tx_scheduler_thread,629:  Failed to get tx_access
[15797.818564] redpine_91x: redpine_set_clr_tx_intention,357: Wait event failed
[15797.818634] redpine_91x: rsi_coex_scheduler_thread,114:  Failed to get tx_access
[15797.819217] redpine_91x: rsi_probe: Failed in probe...Exiting
[15797.819263] RSI-SDIO WLAN mmc1:fffd:1: probe with driver RSI-SDIO WLAN failed with error 1
[15797.901083] mmc1: card fffd removed
[15800.736547] mmc1: new high speed SDIO card at address fffd
[15800.738963] redpine_91x: rsi_probe: ***** 9116 Module *****
[15800.739116] redpine_91x: redpine_hal_device_init: oper_mode = 5, coex_mode = 2
[15800.740303] redpine_91x: Received Board Version Number: 10
[15800.741422] redpine_91x: rsi_load_firmware: Loading file RS9116_NLINK_WLAN_BT_IMAGE.rps
[15800.742111] redpine_91x:  FW Length = 329216 bytes
[15800.742136] redpine_91x: ================================================
[15800.742144] redpine_91x: ================ RSI Version Info ==============
[15800.742153] redpine_91x: ================================================
[15800.742161] redpine_91x: FW Version	: 2.1.0.0
[15800.742170] redpine_91x: RSI FW Version	:  1610.2.1.ab.ffbf
[15800.742181] redpine_91x: Driver Version	: RS9116.NB0.NL.GNU.LNX.OSD.2.0.0.0024
[15800.742189] redpine_91x: Operating mode	: 5 [Wi-Fi STA + BT EDR]
[15800.742198] redpine_91x: Firmware file	: RS9116_NLINK_WLAN_BT_IMAGE.rps
[15800.742207] redpine_91x: ================================================
[15800.892744] redpine_91x: rsi_sdio_master_access_msword: fail to access MASTER_ACCESS_MSBYTE
[15800.892771] redpine_91x: rsi_sdio_master_reg_read: Unable to set ms word to common reg
[15800.892787] redpine_91x: bl_write_cmd: Command 4b REGOUT reading failed..
[15800.892798] redpine_91x:  *** Flash CRC passed ***
[15800.892834] redpine_91x: rsi_sdio_master_access_msword: fail to access MASTER_ACCESS_MSBYTE
[15800.892844] redpine_91x: rsi_sdio_master_reg_write: Unable to set ms word to common reg
[15800.892852] redpine_91x: rsi_load_9116_flash_fw: Unable to access full RAM memory
[15805.924120] redpine_91x: rsi_sdio_master_access_msword: fail to access MASTER_ACCESS_MSBYTE
[15805.924184] redpine_91x: rsi_sdio_master_reg_read: Unable to set ms word to common reg
[15805.924256] redpine_91x: rsi_read_flash_fw_version: RSI_FLASH_READ_FW_VER failed
[15805.924299] redpine_91x: redpine_hal_device_init: Failed to load TA instructions
[15805.924349] redpine_91x: rsi_probe: Failed in device init
[15812.113841] redpine_91x: redpine_set_clr_tx_intention,357: Wait event failed
[15812.113898] redpine_91x: rsi_tx_scheduler_thread,629:  Failed to get tx_access
[15818.297193] redpine_91x: redpine_set_clr_tx_intention,357: Wait event failed
[15818.297265] redpine_91x: rsi_coex_scheduler_thread,114:  Failed to get tx_access
[15818.297400] redpine_91x: rsi_probe: Failed in probe...Exiting
[15818.297513] RSI-SDIO WLAN mmc1:fffd:1: probe with driver RSI-SDIO WLAN failed with error 1
[15818.368675] mmc1: card fffd removed
[15821.281659] mmc1: new high speed SDIO card at address fffd
[15821.284758] redpine_91x: rsi_probe: ***** 9116 Module *****
[15821.284951] redpine_91x: redpine_hal_device_init: oper_mode = 5, coex_mode = 2
[15821.286512] redpine_91x: Received Board Version Number: 10
[15821.287751] redpine_91x: rsi_load_firmware: Loading file RS9116_NLINK_WLAN_BT_IMAGE.rps
[15821.288323] redpine_91x:  FW Length = 329216 bytes
[15821.288505] redpine_91x: ================================================
[15821.288647] redpine_91x: ================ RSI Version Info ==============
[15821.288764] redpine_91x: ================================================
[15821.288867] redpine_91x: FW Version	: 2.1.0.0
[15821.288977] redpine_91x: RSI FW Version	:  1610.2.1.ab.ffbf
[15821.289092] redpine_91x: Driver Version	: RS9116.NB0.NL.GNU.LNX.OSD.2.0.0.0024
[15821.289133] redpine_91x: Operating mode	: 5 [Wi-Fi STA + BT EDR]
[15821.289250] redpine_91x: Firmware file	: RS9116_NLINK_WLAN_BT_IMAGE.rps
[15821.289365] redpine_91x: ================================================
[15821.297248] redpine_91x: rsi_sdio_master_access_msword: fail to access MASTER_ACCESS_MSBYTE
[15821.297280] redpine_91x: rsi_sdio_master_reg_read: Unable to set ms word to common reg
[15821.297291] redpine_91x: bl_write_cmd: Command 4b REGOUT reading failed..
[15821.297333] redpine_91x:  *** Flash CRC passed ***
[15821.297380] redpine_91x: rsi_sdio_master_access_msword: fail to access MASTER_ACCESS_MSBYTE
[15821.297393] redpine_91x: rsi_sdio_master_reg_write: Unable to set ms word to common reg
[15821.297399] redpine_91x: rsi_load_9116_flash_fw: Unable to access full RAM memory
[15823.338058] edt_ft5x06 2-0038: Unable to fetch data, error: -6
[15826.405834] redpine_91x: rsi_sdio_master_access_msword: fail to access MASTER_ACCESS_MSBYTE
[15826.406176] redpine_91x: rsi_sdio_master_reg_read: Unable to set ms word to common reg
[15826.406485] redpine_91x: rsi_read_flash_fw_version: RSI_FLASH_READ_FW_VER failed
[15826.406535] redpine_91x: redpine_hal_device_init: Failed to load TA instructions
[15826.406581] redpine_91x: rsi_probe: Failed in device init
[15832.592096] redpine_91x: redpine_set_clr_tx_intention,357: Wait event failed
[15832.592474] redpine_91x: rsi_tx_scheduler_thread,629:  Failed to get tx_access
[15838.777805] redpine_91x: redpine_set_clr_tx_intention,357: Wait event failed
[15838.778146] redpine_91x: rsi_coex_scheduler_thread,114:  Failed to get tx_access
[15838.779255] redpine_91x: rsi_probe: Failed in probe...Exiting
[15838.779404] RSI-SDIO WLAN mmc1:fffd:1: probe with driver RSI-SDIO WLAN failed with error 1
[15920.994767] edt_ft5x06 2-0038: Unable to fetch data, error: -6

Update: I have just succeeded in enabling the wifi card a couple of times with the switch, after a few rapid off-on movements. One problem with this (as I am sure that you are aware) is that in my hands the time taken to bring the card up is longer than the interval needed between off-on cycles to make it succeed. This means that enabling the wifi card cannot be done (on my device at least) from the UI, it is essential to be watching the dmesg output.

For reference, here is the dmesg output from successfully enabling the card. I’ll have a think about replacing the card in the future.

[16489.131681] mmc1: new high speed SDIO card at address fffd
[16489.150158] redpine_91x: rsi_probe: ***** 9116 Module *****
[16489.152671] redpine_91x: redpine_hal_device_init: oper_mode = 5, coex_mode = 2
[16489.154608] redpine_91x: Received Board Version Number: 10
[16489.156165] redpine_91x: rsi_load_firmware: Loading file RS9116_NLINK_WLAN_BT_IMAGE.rps
[16489.164481] redpine_91x:  FW Length = 329216 bytes
[16489.165119] redpine_91x: ================================================
[16489.166249] redpine_91x: ================ RSI Version Info ==============
[16489.166322] redpine_91x: ================================================
[16489.166349] redpine_91x: FW Version	: 2.1.0.0
[16489.166370] redpine_91x: RSI FW Version	:  1610.2.1.ab.ffbf
[16489.166395] redpine_91x: Driver Version	: RS9116.NB0.NL.GNU.LNX.OSD.2.0.0.0024
[16489.166417] redpine_91x: Operating mode	: 5 [Wi-Fi STA + BT EDR]
[16489.166458] redpine_91x: Firmware file	: RS9116_NLINK_WLAN_BT_IMAGE.rps
[16489.166479] redpine_91x: ================================================
[16489.350706] redpine_91x:  *** Flash CRC passed ***
[16489.356672] redpine_91x: ***** Loaded Firmware *****
[16494.555827] redpine_91x: ================================================
[16494.556124] redpine_91x: ================ RSI Version Info ==============
[16494.556198] redpine_91x: ================================================
[16494.556214] redpine_91x: FW Version	: 1.2.0.16
[16494.556254] redpine_91x: RSI FW Version	:  1610.1.2.ab.ffbf
[16494.556274] redpine_91x: Driver Version	: RS9116.NB0.NL.GNU.LNX.OSD.2.0.0.0024
[16494.556299] redpine_91x: Operating mode	: 5 [Wi-Fi STA + BT EDR]
[16494.556316] redpine_91x: Firmware file	: RS9116_NLINK_WLAN_BT_IMAGE.rps
[16494.556333] redpine_91x: ================================================
[16494.567505] redpine_91x: rsi_send_bt_reg_params: Sending BT reg frame
[16494.567779] BT REG PARAMS: (length = 21)
[16494.567838] 05 60 00 00 00 00 00 00 00 00 00 00 00 00 55 00 
[16494.568001] 00 00 01 1e 02 
[16494.579025] redpine_91x:  HCI module init done...
[16494.579633] redpine_91x: RSI HCI DEVICE "hci0" open
[16494.687951] Bluetooth: MGMT ver 1.23
[16495.126697] redpine_91x: RSI `hci0' flush
[16495.129564] redpine_91x: RSI HCI DEVICE "hci0" closed
[16495.129905] redpine_91x: rsi_hci_close: device `hci0' not running
[16495.301052] redpine_91x: <==== Interface UP ====>
[16495.301131] redpine_91x: rsi_mac80211_bss_info_changed: Change of ERP INFO: 0
[16495.305291] redpine_91x: rsi_mac80211_bss_info_changed: Sending vap updates....
[16495.348697] redpine_91x: <==== Interface DOWN ====>
[16495.350903] redpine_91x: <==== Interface UP ====>
[16495.350975] redpine_91x: rsi_mac80211_bss_info_changed: Change of ERP INFO: 0
[16495.351003] redpine_91x: rsi_mac80211_bss_info_changed: Sending vap updates....
[16499.248728] redpine_91x: <==== Interface DOWN ====>
[16499.250173] redpine_91x: <==== Interface UP ====>
[16499.250259] redpine_91x: rsi_mac80211_bss_info_changed: Change of ERP INFO: 0
[16499.250270] redpine_91x: rsi_mac80211_bss_info_changed: Sending vap updates....

I was seeing that sometimes the WiFi/BT firmware wasn’t getting loaded after a reboot (on crimson with the RS9116 2.5.1.11 firmware). When that happened, there is nothing in dmesg to tell me why.

Then, when I rebooted, sometimes it loaded and sometimes it didn’t. I found that taking out the battery and putting it back in also works, because it always loaded the firmware after that.

I think that maybe it was caused, because I left the RS9116_NLINK_WLAN_BT_IMAGE.rps file in the /lib/firmware/ directory and it was trying to reflash the firmware at every boot. I have removed it, and haven’t seen the problem since then.

Once again the Redpine WiFi/BT is not loading, and taking out the battery and putting it back in is not causing the WiFi/BT to return. Now, I am seeing that I have version 228.207.157.252, which makes no sense.

$ sudo dmesg | grep redpine
[   10.183246] redpine_91x: rsi_probe: ***** 9116 Module *****
[   10.184594] redpine_91x: redpine_hal_device_init: oper_mode = 5, coex_mode = 2
[   10.185846] redpine_91x: Received Board Version Number: 10
[   10.187286] redpine_91x: rsi_load_firmware: Loading file RS9116_NLINK_WLAN_BT_IMAGE.rps
[   10.192204] redpine_91x: rsi_load_firmware: Failed to open file RS9116_NLINK_WLAN_BT_IMAGE.rps
[   10.192230] redpine_91x:  *** No FW magic will try to load anyway ***
[   10.198884] redpine_91x: ***** Loaded Firmware *****
[   15.414582] redpine_91x: ================================================
[   15.414622] redpine_91x: ================ RSI Version Info ==============
[   15.414641] redpine_91x: ================================================
[   15.414649] redpine_91x: FW Version	: 228.207.157.252
[   15.414659] redpine_91x: RSI FW Version	:  ccfc.e4.cf.87.22c2
[   15.414669] redpine_91x: Driver Version	: RS9116.NB0.NL.GNU.LNX.OSD.2.0.0.0024
[   15.414676] redpine_91x: Operating mode	: 5 [Wi-Fi STA + BT EDR]
[   15.414685] redpine_91x: Firmware file	: RS9116_NLINK_WLAN_BT_IMAGE.rps
[   15.414693] redpine_91x: ================================================

I rebooted three times in a row, and the Redpine firmware was wrong (according to dmesg). Then on the fourth reboot, the firmware loaded correctly on boot and I have WiFi again.

Here is what dmesg is now showing:

$ sudo dmesg | grep redpine
[sudo] password for purism: 
[    9.187391] redpine_91x: rsi_probe: ***** 9116 Module *****
[    9.188225] redpine_91x: redpine_hal_device_init: oper_mode = 5, coex_mode = 2
[    9.190117] redpine_91x: Received Board Version Number: 10
[    9.191456] redpine_91x: rsi_load_firmware: Loading file RS9116_NLINK_WLAN_BT_IMAGE.rps
[    9.191647] redpine_91x: rsi_load_firmware: Failed to open file RS9116_NLINK_WLAN_BT_IMAGE.rps
[    9.197637] redpine_91x: ***** Loaded Firmware *****
[   14.346548] redpine_91x: ================================================
[   14.346580] redpine_91x: ================ RSI Version Info ==============
[   14.346603] redpine_91x: ================================================
[   14.346613] redpine_91x: FW Version	: 1.2.0.16
[   14.346625] redpine_91x: RSI FW Version	:  1610.1.2.ab.ffbf
[   14.346635] redpine_91x: Driver Version	: RS9116.NB0.NL.GNU.LNX.OSD.2.0.0.0024
[   14.346644] redpine_91x: Operating mode	: 5 [Wi-Fi STA + BT EDR]
[   14.346654] redpine_91x: Firmware file	: RS9116_NLINK_WLAN_BT_IMAGE.rps
[   14.346659] redpine_91x: ================================================
[   14.350499] redpine_91x: rsi_send_bt_reg_params: Sending BT reg frame
[   14.353605] redpine_91x:  HCI module init done...
[   14.356764] redpine_91x: RSI HCI DEVICE "hci0" open
[   14.401088] redpine_91x: RSI `hci0' flush
[   14.401168] redpine_91x: RSI HCI DEVICE "hci0" closed
[   14.401187] redpine_91x: rsi_hci_close: device `hci0' not running
[   14.419250] redpine_91x: <==== Interface UP ====>
[   14.426048] redpine_91x: rsi_mac80211_bss_info_changed: Change of ERP INFO: 0
[   14.426754] redpine_91x: rsi_mac80211_bss_info_changed: Sending vap updates....
[   14.462788] redpine_91x: <==== Interface DOWN ====>
[   14.465617] redpine_91x: <==== Interface UP ====>
[   14.467900] redpine_91x: rsi_mac80211_bss_info_changed: Change of ERP INFO: 0
[   14.468053] redpine_91x: rsi_mac80211_bss_info_changed: Sending vap updates....
[   18.348822] redpine_91x: <==== Interface DOWN ====>
[   18.350360] redpine_91x: <==== Interface UP ====>
[   18.350492] redpine_91x: rsi_mac80211_bss_info_changed: Change of ERP INFO: 0
[   18.350514] redpine_91x: rsi_mac80211_bss_info_changed: Sending vap updates....
[   18.567801] redpine_91x: EAPOL 4 confirm

The next time I get back to the US, I am going to buy a SparkLAN board, because the Redpine WiFi simply isn’t reliable.

I don’t think that’s exactly right. I do not have such a file in /lib/firmware, and haven’t had for many years, and I occasionally experience this problem. (As you observe, the firmware file only needs to be there as a one-off if you are upgrading the firmware.)

However the situation is a little confusing because /lib/firmware appears to be part of an overlay file system, presumably required for supporting the firmware jail for the SparkLAN (or any other card that requires firmware at boot from the jail) but not actually needed for the Redpine.

I guess the presence of the firmware file could be a factor in the sense that the presence of the firmware file triggers timing and nature of communication with the card that would otherwise not occur.

I’ve ordered a SparkLAN card from FLOSS Shop and when I find the time I’ll try to fit it in my Librem5.

I’m not sure what is causing the problem. I know that the Redpine firmware doesn’t load correctly roughly 1 out of every 3 times that I boot, but I can’t establish what causes it. I have tried every firmware version available, and none of them have fixed the problem. Maybe there is some kind of timing problem. It appears to be worse for me than for other people, but I have one of the first Librem 5 USA phones that was shipped, so maybe my phone is special.

At any rate, I have come to the conclusion that the RS9116 is simply not a good chip. I have tried several different Bluetooth speakers and earphones, and all of them constantly drop the connection with the RS9116. My current earphones (ONN Sport Gen 2) usually only play for about 10 seconds before they drop the connection and have to reconnect. In contrast, my Bluetooth keyboard works OK with the RS9116 and doesn’t disconnect. Maybe the problem is caused by the higher data rate that audio requires. Maybe it is the implementation of A2DP or HSP in the rsi driver or the firmware. I haven’t bothered to investigate why.

As I see it, there is no good option for WiFi/Bluetooth if the goal is software freedom. Atheros is no longer producing its ath9k chips (AR9280, AR9285, AR9380) whose WiFi could function without any firmware, because they didn’t have an embedded CPU, but these chips worked better with the proprietary firmware and required it for the Bluetooth to function. The RS9116 was the second freest option, because it can store its proprietary firmware on its chip, so it doesn’t have to be loaded at every boot from /lib/firmware, however Redpine stopped maintaining the driver, and the performance proved to be bad. So now the only options left are WiFi/Bluetooth chips that have to have their proprietary firmware loaded at every boot from /lib/firmware.

Reading between the lines, I am guessing that Purism knew that there were problems with the RS9116, but thought that Redpine Signals->Silicon Labs would keep working on the drivers and the firmware and fix the problems. The RS9116’s last firmware update was in 2022 and the last update to the rsi driver was in 2023, so Purism gave up waiting for Redpine and switched to SparkLAN in Feb. 2023. I give Purism credit for trying to find the freest option available, but it sucks for those of us who now have to buy a new M.2 card that costs $29 to get reliable WiFi/Bluetooth.

At the end of the day, I buy from Purism, because I know that the company is trying to do things that are hard, and don’t always work out. Purism took a major risk using the i.MX 8M Quad chip, that was released 5 months after the L5’s crowd funding started. It led to delays, but eventually Purism got everything to work, but the RS9116 was one of the engineering decisions that didn’t work, but at least Purism designed the phone with an M.2 slot so the WiFi/BT could be replaced.