Jump to content

Will there be a software update for Hat brick for Raspberry Pi 5 ?


riks

Recommended Posts

Does anyone tried to put the Hat on a Raspberry Pi working ?

I get this error in the /var/log/brickd.log

2024-01-16 18:06:36.731765 <I> <main_linux.c:375> Running on Linux system (sysname: Linux, release: 6.1.0-rpi6-rpi-2712, version: #1 SMP PREEMPT Debian 1:6.1.58-1+rpt2 (2023-10-27), machine: aarch64)
libusb: warning [libusb_init] installing new context as implicit default
2024-01-16 18:06:36.735775 <I> <bricklet.c:521> Using bricklet.* section in config file
2024-01-16 18:06:36.735783 <I> <bricklet.c:530> Found Bricklet port A (spidev: /dev/spidev0.0, driver: gpio, name: gpio23, num: 23)
2024-01-16 18:06:36.735835 <I> <bricklet_stack_linux.c:129> Using BCM2835 backend for Bricklets (Raspberry Pi detected)
2024-01-16 18:06:36.735855 <E> <vcgencmd.c:185> Could not open /dev/vchiq for writing: ENOENT (2)
2024-01-16 18:06:36.735858 <E> <bricklet_stack_linux_bcm2835.c:65> Could not read Raspberry Pi core_freq config

 

Link to comment
Share on other sites

To use the HAT Brick with a Raspberry Pi 5, you'll have to update the HAT's firmware to 2.0.4 and install Brick Daemon 2.4.5 on the Pi. Updating the HAT Firmware with only a Pi 5 is possible but difficult. Can you temporarily plug the HAT on an older Pi, install Brick Daemon there and update the HAT Firmware with Brick Viewer?

Link to comment
Share on other sites

Hi rtrbt,

I have update firmware and daemon to this version. It connects but does not show me any bricklets. Same behaviour I had on my Pi4, so I added to the /etc/brickd.conf these mapping

bricklet.group0.spidev = /dev/spidev0.0

bricklet.group0.cs0.driver = gpio
bricklet.group0.cs0.name = gpio23
bricklet.group0.cs0.num = 23

bricklet.group0.cs1.driver = gpio
bricklet.group0.cs1.name = gpio22
bricklet.group0.cs1.num = 22

bricklet.group0.cs2.driver = gpio
bricklet.group0.cs2.name = gpio25
bricklet.group0.cs2.num = 25

bricklet.group0.cs3.driver = gpio
bricklet.group0.cs3.name = gpio26
bricklet.group0.cs3.num = 26

bricklet.group0.cs4.driver = gpio
bricklet.group0.cs4.name = gpio27
bricklet.group0.cs4.num = 27

bricklet.group0.cs5.driver = gpio
bricklet.group0.cs5.name = gpio24
bricklet.group0.cs5.num = 24

bricklet.group0.cs6.driver = gpio
bricklet.group0.cs6.name = gpio7
bricklet.group0.cs6.num = 7

bricklet.group0.cs7.driver = gpio
bricklet.group0.cs7.name = gpio6
bricklet.group0.cs7.num = 6

bricklet.group0.cs8.driver = gpio
bricklet.group0.cs8.name = gpio5
bricklet.group0.cs8.num = 5

After a reboot I get this in the /var/log/brickd.log and deamon is shutting down.

2024-01-18 10:56:42.884905 <I> <bricklet_stack_linux.c:87> Using spidev backend for Bricklets (unsupported suffix 5 after 'Raspberry Pi' in /proc/device-tree/model)
2024-01-18 10:56:42.884981 <E> <gpio_sysfs.c:77> Could not write to '/sys/class/gpio/export' to export GPIO 22: EINVAL (22)
2024-01-18 10:56:42.884988 <E> <bricklet_stack_linux_spidev.c:78> Could not export gpio22: EINVAL (22)

Any idea's ?

Regards,
Rik

 

 

 

Link to comment
Share on other sites

The pin numbers have changed for the Pi 5. Try this instead:.

bricklet.group0.spidev = /dev/spidev0.0

bricklet.group0.cs0.driver = gpio
bricklet.group0.cs0.name = gpio422
bricklet.group0.cs0.num = 422

bricklet.group0.cs1.driver = gpio
bricklet.group0.cs1.name = gpio421
bricklet.group0.cs1.num = 421

bricklet.group0.cs2.driver = gpio
bricklet.group0.cs2.name = gpio424
bricklet.group0.cs2.num = 424

bricklet.group0.cs3.driver = gpio
bricklet.group0.cs3.name = gpio425
bricklet.group0.cs3.num = 425

bricklet.group0.cs4.driver = gpio
bricklet.group0.cs4.name = gpio426
bricklet.group0.cs4.num = 426

bricklet.group0.cs5.driver = gpio
bricklet.group0.cs5.name = gpio423
bricklet.group0.cs5.num = 423

#bricklet.group0.cs6.driver = gpio
#bricklet.group0.cs6.name = gpio406
#bricklet.group0.cs6.num = 406

bricklet.group0.cs7.driver = gpio
bricklet.group0.cs7.name = gpio405
bricklet.group0.cs7.num = 405

bricklet.group0.cs8.driver = gpio
bricklet.group0.cs8.name = gpio404
bricklet.group0.cs8.num = 404

Port G is disabled with this config, because the pin for port G is already marked as in use by Raspberry Pi OS.

For this to work, you also have to enable the SPI device manually with raspi-config (Interface Options -> SPI) and then restart.

If Brick Daemon starts with this config, please check again that the HAT firmware is up to date with Brick Viewer. Also open the HAT Bricks tab to check whether the HAT is stuck in bootloader mode. Brick Viewer will then show only this:

grafik.png

If the HAT is stuck in bootloader mode, reflash the HAT and restart the Pi. Then I would assume that Brick Daemons output contains the following lines:

2024-01-22 15:19:08.678489 <I> <bricklet.c:304> Found supported HAT product_id 0x084e in device tree, using default HAT Brick config
2024-01-22 15:19:08.678495 <I> <bricklet.c:341> Found Bricklet port A (spidev: /dev/spidev0.0, driver: gpio, name: gpio422, num: 422)
2024-01-22 15:19:08.678530 <I> <bricklet_stack_linux.c:87> Using spidev backend for Bricklets (unsupported suffix 5 after 'Raspberry Pi' in /proc/device-tree/model)
2024-01-22 15:19:08.679837 <I> <bricklet.c:341> Found Bricklet port B (spidev: /dev/spidev0.0, driver: gpio, name: gpio421, num: 421)
2024-01-22 15:19:08.680329 <I> <bricklet.c:341> Found Bricklet port C (spidev: /dev/spidev0.0, driver: gpio, name: gpio424, num: 424)
2024-01-22 15:19:08.680708 <I> <bricklet.c:341> Found Bricklet port D (spidev: /dev/spidev0.0, driver: gpio, name: gpio425, num: 425)
2024-01-22 15:19:08.681120 <I> <bricklet.c:341> Found Bricklet port E (spidev: /dev/spidev0.0, driver: gpio, name: gpio426, num: 426)
2024-01-22 15:19:08.681975 <I> <bricklet.c:341> Found Bricklet port F (spidev: /dev/spidev0.0, driver: gpio, name: gpio423, num: 423)
2024-01-22 15:19:08.682363 <I> <bricklet.c:341> Found Bricklet port G (spidev: /dev/spidev0.0, driver: gpio, name: gpio406, num: 406)
2024-01-22 15:19:08.682811 <I> <bricklet.c:341> Found Bricklet port H (spidev: /dev/spidev0.0, driver: gpio, name: gpio405, num: 405)
2024-01-22 15:19:08.683247 <I> <bricklet.c:341> Found Bricklet port I (spidev: /dev/spidev0.0, driver: gpio, name: gpio404, num: 404)

If you get "Found supported HAT..." the HAT and all ports should work again-

Link to comment
Share on other sites

Hi rtrbt,

yes indeed. I totally forgot the PINOUT is different compared to older models.

Works fine now with these mapping. I can see my bricklets.

Thanks for your help ! Maybe you put a section in the Doc. I will not be the only one I suppose that runs a Raspberry Pi5 with a HAT and it is supported by Tinkerforge.

Regards,
Rik

Link to comment
Share on other sites

  • 1 month later...

I seem to be stuck in a similar problem on a raspberrypi5 with a zerohat. Firmware is updated and on rpi5 brickd v.2.4.5 is running. I tried the changes in /etc/brickd.conf  but it didn't change anything. Brickd is not running..

The following output is when I run brickd directly. 

root@hexagon-rpi5:~# brickd
2024-03-22 15:26:03.167727 <I> <main_linux.c:369> Brick Daemon 2.4.5 started (pid: 2448, daemonized: 0)
2024-03-22 15:26:03.167737 <I> <main_linux.c:375> Running on Linux system (sysname: Linux, release: 6.6.20+rpt-rpi-2712, version: #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07), machine: aarch64)
libusb: warning [libusb_init] installing new context as implicit default
2024-03-22 15:26:03.170565 <I> <bricklet.c:304> Found supported HAT product_id 0x085d in device tree, using default HAT Zero Brick config
2024-03-22 15:26:03.170571 <I> <bricklet.c:345> Found Bricklet port A (spidev: /dev/spidev0.0, driver: gpio, name: gpio426, num: 426)
2024-03-22 15:26:03.170588 <I> <bricklet_stack_linux.c:87> Using spidev backend for Bricklets (unsupported suffix 5 after 'Raspberry Pi' in /proc/device-tree/model)
2024-03-22 15:26:03.170613 <E> <gpio_sysfs.c:77> Could not write to '/sys/class/gpio/export' to export GPIO 426: EINVAL (22)
2024-03-22 15:26:03.170616 <E> <bricklet_stack_linux_spidev.c:78> Could not export gpio426: EINVAL (22)
2024-03-22 15:26:03.170809 <I> <main_linux.c:563> Brick Daemon 2.4.5 stopped
root@hexagon-rpi5:~# brickd --version
2.4.5

Regards Amely

Link to comment
Share on other sites

Sorry, the WARP3 firmware release took a bit longer than expected.

Please test the attached brickd package (you can install it with

sudo dpkg -i brickd_2.4.5+snapshot~e70c9c6_arm64.deb 

)

I've rewritten the HAT specific code to use the GPIO's names (those will hopefully never change!) instead of their numbers.

brickd_2.4.5+snapshot~e70c9c6_arm64.deb

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...