New Raspberry Pi 400

Correct

Hi,

Sounds like this has turned into something of a tangled web of dependencies and load order. Always have hated these kinds of issues… (FWIW - I’ve been using linux for over 10 years, but am new to the Arm distros.)

Is there a chance of getting a summary of what needs to be done to a fresh 20.12 image to (a) enable the wifi and bluetooth sound support, and (b) keep the configuration compatible with the stable repositories, and © can be accomplished before booting the image for the first time?

I think this would be beneficial as there are probable a lot of people who received Pi 400’s as Christmas gifts and are likely to want to move to a different distribution from the default. (For example, I bought one of these to give as a gift and planned to install an SD card with Manjaro before sending it to the person…so I don’t wan to do the initial setup. I want the person who receives it to do the initial setup.)

George

I have not installed the new 20.12 image yet so I am not really sure if and what issues there is. I did take a quick look at the image’s package list and it looks like the wrong
firmware-raspberry pi & brcm-patchram-plus packages are installed.

A temporary quick fix would be to mount the image on a desktop or laptop or any other linux you may have and:

cd to the sdcard’s usr/lib/firmware directory:

sudo ln -s bcm ./updates
sudo sync       # Flushes ram to sdcard
1 Like

I think you meant “./updates” instead of “…/updates”… At least that was how I needed to create the link to get it to work.

Which is working for me…and I think I’d feel comfortable doing that as a patch against the 20.12 image so I can send the gift Pi 400 I have here. (I’m guessing that no one is going to change this path behavior without some big notice of deprecation beforehand.)

Small follow-up question: I see there is a newer brcm-patchram-plus (r3.bee0942-5) and firmware-raspberrypi (6-1.6) in he official repositories. Have these been tested with the Pi 400 yet? Are they safe, or should I lock the system tto the current version(s) until things settle down a bit and are sabilized / cleaned up?

George

P.S. Thank you for all your work on this Darksky, I see it’s taken quite a bit of your time over the past two months… And answering forum questions on a holiday is going way above and beyond.

You are right. I changed it.

The latest packages are good. There might be an upgrade issue with the firmware-raspberrypi package with the updates directory existing; just force the install if it is on that package.

@strit is rebuilding new pi4 images and will be pushed today.

1 Like

Hi there,
I lost bluetooth after my last system update, no connectors available.

Please find here my details:
Manjaro Gnome 21.10 (used on Pi 400)
Kernel = Mainline = 5.14.13-1-MANJARO-ARM
local/firmware-raspberrypi 6-1.9
local/brcm-patchram-plus r3.bee0942-5

Could not find any errors in the log though, but perhaps looked at the wrong place.

systemctl status attach-bluetooth.service
● attach-bluetooth.service - Attach Bluetooth Adapter Raspberry Pi devices
Loaded: loaded (/usr/lib/systemd/system/attach-bluetooth.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2021-10-29 11:22:58 CEST; 13min ago
Main PID: 342 (patchram.sh)
Tasks: 2 (limit: 4152)
CPU: 90ms
CGroup: /system.slice/attach-bluetooth.service
├─342 /bin/bash /usr/bin/patchram.sh
└─360 /usr/bin/brcm_patchram_plus --patchram /usr/lib/firmware/updates/brcm/BCM4345C0.hcd --baudrate 3000000 --enable_hci --use_baudrate_for_download --no2bytes --tosleep=1000000 /dev/ttyAMA0

Okt 29 11:22:58 berry systemd[1]: Started Attach Bluetooth Adapter Raspberry Pi devices.

Please help as I run out of ideas how to fix bluetooth on Manjaro latest stable.

Nothing has changed with the firmware-raspberrypi or brcm-patchram-plus packages. Sometimes things change with the kernel and the bluetooth device does not get loaded because some old stuff still remains in memory when doing a reboot and doing a second reboot here fixes that. Bluetooth works fine here on the pi400.

And I have no clue what all you did to try to fix things to get you back to a default install with everything. Right now you have firmware loading for a pi3b+/pi4b it should be BCM4345C5.hcd, I can only guess.

Try this:

Reinstall brcm-patchram-plus and shutdown and unplug every thing from your pi400 and wait @15 seconds then plug everything back in and see if you have bluetooth. If this does not work paste here what is in your /boot/cmdline.txt

Bluetooth Summary

[ray@pi4 ~]$ cat /proc/cpuinfo | grep Raspberry
Model : Raspberry Pi 400 Rev 1.0

[ray@pi4 ~]$ systemctl --type=service | grep blue
attach-bluetooth.service loaded active running Attach Bluetooth Adapter Raspberry Pi devices
bluetooth.service loaded active running Bluetooth service

[ray@pi4 ~]$ systemctl status attach-bluetooth
● attach-bluetooth.service - Attach Bluetooth Adapter Raspberry Pi devices
Loaded: loaded (/usr/lib/systemd/system/attach-bluetooth.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2021-10-29 07:53:16 CDT; 16min ago
Main PID: 439 (patchram.sh)
Tasks: 2 (limit: 4154)
CPU: 46ms
CGroup: /system.slice/attach-bluetooth.service
├─439 /bin/bash /usr/bin/patchram.sh
└─449 /usr/bin/brcm_patchram_plus --patchram /usr/lib/firmware/updates/brcm/BCM4345C5.hcd --baudrate 3000000 --enable_hci --use_baudrate_for_download --no2bytes --tosleep=1000000 /dev/ttyAMA0

Oct 29 07:53:16 pi4 systemd[1]: Started Attach Bluetooth Adapter Raspberry Pi devices.
Oct 29 07:53:17 pi4 patchram.sh[449]: Done setting line discpline

[ray@pi4 ~]$ dmesg | grep Blue
[ 9.109643] Bluetooth: Core ver 2.22
[ 9.109762] Bluetooth: HCI device and connection manager initialized
[ 9.109780] Bluetooth: HCI socket layer initialized
[ 9.109789] Bluetooth: L2CAP socket layer initialized
[ 9.109802] Bluetooth: SCO socket layer initialized
[ 9.197411] Bluetooth: HCI UART driver ver 2.3
[ 9.197432] Bluetooth: HCI UART protocol H4 registered
[ 9.197515] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 9.197654] Bluetooth: HCI UART protocol Broadcom registered
[ 9.468958] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 9.468977] Bluetooth: BNEP filters: protocol multicast
[ 9.468997] Bluetooth: BNEP socket layer initialized
[ 29.183055] Bluetooth: RFCOMM TTY layer initialized
[ 29.183100] Bluetooth: RFCOMM socket layer initialized
[ 29.183136] Bluetooth: RFCOMM ver 1.11

I did as you suggested, but unfortunatelly also after reinstalling brcm-patchram-plus and doing a 15 sec power off reboot the wrog firmware file is being loaded.

Please find here my contents of /boot/cmdline.txt
root=PARTUUID=9a2018a0-02 rw rootwait console=serial0,115200 console=tty3 selinux=0 quiet splash plymouth.ignore-serial-consoles smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=serial0,115200 usbhid.mousepoll=8 audit=0

I guess I found the issue. I have a newer Pi 400 revision, and therefore your if statement is not working as intended for me. Please find here the details:

sudo cat /usr/bin/patchram.sh
#! /bin/bash

MODEL=$(cat /proc/cpuinfo | grep Model | awk ‘{print $3,$4,$5,$6,$7,$8}’)

if [ “$MODEL” = “Raspberry Pi 3 Model B Rev” ]; then
/usr/bin/brcm_patchram_plus --patchram /usr/lib/firmware/updates/brcm/BCM43430A1.hcd --enable_hci --no2bytes --tosleep=1000000 /dev/ttyAMA0
elif [ “$MODEL” = "Raspberry Pi 400 Rev 1.0 " ]; then
/usr/bin/brcm_patchram_plus --patchram /usr/lib/firmware/updates/brcm/BCM4345C5.hcd --baudrate 3000000 --enable_hci --use_baudrate_for_download --no2bytes --tosleep=1000000 /dev/ttyAMA0
else
/usr/bin/brcm_patchram_plus --patchram /usr/lib/firmware/updates/brcm/BCM4345C0.hcd --baudrate 3000000 --enable_hci --use_baudrate_for_download --no2bytes --tosleep=1000000 /dev/ttyAMA0
fi

majamee@berry MODEL=$(cat /proc/cpuinfo | grep Model | awk ‘{print $3,$4,$5,$6,$7,$8}’)
majamee@berry echo $MODEL
Raspberry Pi 400 Rev 1.1

Thanks for finding this. It is being looked in to.

ADDED:

For now try this by editing /usr/bin/patchram.sh and comment out everything in except these 2 lines in the pi400 section so it only directly runs the line to patch the firmware for the pi400 and bypasses all checking for other devices and takes the if / else statements out of the picture:

#! /bin/bash
/usr/bin/brcm_patchram_plus --patchram /usr/lib/firmware/updates/brcm/BCM4345C5.hcd --baudrate 3000000 --enable_hci --use_baudrate_for_download --no2bytes --tosleep=1000000 /dev/ttyAMA0

Then reboot

Thank you very much for the quick assistance. I could fix it in the meantime by editing the patchram.sh script as follows:

#! /bin/bash

MODEL=$(cat /proc/cpuinfo | grep Model | awk '{print $3,$4,$5,$6,$7,$8}')

if [ "$MODEL" = "Raspberry Pi 3 Model B Rev" ]; then
/usr/bin/brcm_patchram_plus --patchram /usr/lib/firmware/updates/brcm/BCM43430A1.hcd --enable_hci --no2bytes --tosleep=1000000 /dev/ttyAMA0
elif [ "$MODEL" = "Raspberry Pi 400 Rev 1.0 " ]; then
/usr/bin/brcm_patchram_plus --patchram /usr/lib/firmware/updates/brcm/BCM4345C5.hcd --baudrate 3000000 --enable_hci --use_baudrate_for_download --no2bytes --tosleep=1000000 /dev/ttyAMA0
elif [ "$MODEL" = "Raspberry Pi 400 Rev 1.1 " ]; then
/usr/bin/brcm_patchram_plus --patchram /usr/lib/firmware/updates/brcm/BCM4345C5.hcd --baudrate 3000000 --enable_hci --use_baudrate_for_download --no2bytes --tosleep=1000000 /dev/ttyAMA0
else
/usr/bin/brcm_patchram_plus --patchram /usr/lib/firmware/updates/brcm/BCM4345C0.hcd --baudrate 3000000 --enable_hci --use_baudrate_for_download --no2bytes --tosleep=1000000 /dev/ttyAMA0
fi

Maybe not the most elegant solution, but it does work fine now :slight_smile: