riks Geschrieben January 17, 2024 at 12:10 Geschrieben January 17, 2024 at 12:10 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 Zitieren
rtrbt Geschrieben January 17, 2024 at 13:47 Geschrieben January 17, 2024 at 13:47 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? Zitieren
riks Geschrieben January 18, 2024 at 10:38 Autor Geschrieben January 18, 2024 at 10:38 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 Zitieren
rtrbt Geschrieben January 22, 2024 at 14:25 Geschrieben January 22, 2024 at 14:25 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: 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- Zitieren
riks Geschrieben January 22, 2024 at 16:29 Autor Geschrieben January 22, 2024 at 16:29 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 Zitieren
dwisk Geschrieben March 22, 2024 at 15:30 Geschrieben March 22, 2024 at 15:30 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 Zitieren
rtrbt Geschrieben March 27, 2024 at 10:29 Geschrieben March 27, 2024 at 10:29 It seems like kernel 6.6 changed the GPIO numbers again. https://github.com/raspberrypi/linux/issues/6037 We have to update Brick Daemon for the new GPIO numbers, probably next week. Zitieren
dwisk Geschrieben April 3, 2024 at 15:47 Geschrieben April 3, 2024 at 15:47 Would it be possible to change the GPIO numbers already through /etc/brickd.conf ? I would try, just have no idea about which numbers to use. Zitieren
rtrbt Geschrieben April 4, 2024 at 06:59 Geschrieben April 4, 2024 at 06:59 No, because Brick Daemon ignores the configured GPIO numbers if a HAT is detected. Zitieren
dwisk Geschrieben April 9, 2024 at 20:53 Geschrieben April 9, 2024 at 20:53 Understood. Any chance to get an update for break daemon anytime soon? Would love to use the rpi5 :) and thanks anyway Zitieren
rtrbt Geschrieben April 11, 2024 at 08:02 Geschrieben April 11, 2024 at 08:02 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. Edit: Attachment deleted. Brick Daemon 2.4.6 has been released. Please install the official release instead. Zitieren
dwisk Geschrieben April 19, 2024 at 10:55 Geschrieben April 19, 2024 at 10:55 Sorry, couldn't work on this for a while. Just tested it and it works. brickd starts and brickv can connect. Thanks a lot! Zitieren
smgor03 Geschrieben May 29, 2024 at 10:11 Geschrieben May 29, 2024 at 10:11 I encountered the same error on my Raspberry Pi 5 with Ubuntu 24.04 LTS. When trying to run brickd I receive: <I> <bricklet_stack_linux.c:87> Using spidev backend for Bricklets (unsupported suffix 5 after 'Raspbery Pi ' in /proc/device-tree/model <E> <bricklet_stack_linux.c:84> Failed to find line GPIO23:EACCES (13) This happens with the .deb provided by @rtrbt as well as installing brickd via apt-get (although the GPIO number differs between versions). Any ideas or pointers how to fix it? Zitieren
MatzeTF Geschrieben May 29, 2024 at 11:32 Geschrieben May 29, 2024 at 11:32 Try this version. Zitieren
smgor03 Geschrieben May 29, 2024 at 13:38 Geschrieben May 29, 2024 at 13:38 (bearbeitet) Thanks! While not getting the GPIO error again, I am now getting a new one though: 2024-05-29 15:33:36.626559 <I> <main_linux.c:369> Brick Daemon 2.4.6+snapshot~730b7d7 started (pid: 38985, daemonized: 0) 2024-05-29 15:33:36.626572 <I> <main_linux.c:375> Running on Linux system (sysname: Linux, release: 6.8.0-1004-raspi, version: #4-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 02:29:55 UTC 2024, machine: aarch64) 2024-05-29 15:33:36.637842 <I> <bricklet.c:274> Found supported HAT product_id 0x084e in device tree, using default HAT Brick config 2024-05-29 15:33:36.637852 <I> <bricklet.c:315> Found Bricklet port A (spidev: /dev/spidev0.0, driver: gpio, name: GPIO23, num: 23) 2024-05-29 15:33:36.637903 <I> <bricklet_stack_linux.c:87> Using spidev backend for Bricklets (unsupported suffix 5 after 'Raspberry Pi' in /proc/device-tree/model) Segmentation fault (core dumped) Reads like a memory error. Any idea what's going on? Edit: Running brickd with sudo causes following error: $ sudo brickd 2024-05-29 15:40:05.952884 <I> <main_linux.c:369> Brick Daemon 2.4.6+snapshot~730b7d7 started (pid: 39560, daemonized: 0) 2024-05-29 15:40:05.952902 <I> <main_linux.c:375> Running on Linux system (sysname: Linux, release: 6.8.0-1004-raspi, version: #4-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 02:29:55 UTC 2024, machine: aarch64) 2024-05-29 15:40:05.959147 <I> <bricklet.c:274> Found supported HAT product_id 0x084e in device tree, using default HAT Brick config 2024-05-29 15:40:05.959153 <I> <bricklet.c:315> Found Bricklet port A (spidev: /dev/spidev0.0, driver: gpio, name: GPIO23, num: 23) 2024-05-29 15:40:05.959186 <I> <bricklet_stack_linux.c:87> Using spidev backend for Bricklets (unsupported suffix 5 after 'Raspberry Pi' in /proc/device-tree/model) 2024-05-29 15:40:05.960048 <I> <bricklet.c:315> Found Bricklet port B (spidev: /dev/spidev0.0, driver: gpio, name: GPIO22, num: 22) 2024-05-29 15:40:05.960841 <I> <bricklet.c:315> Found Bricklet port C (spidev: /dev/spidev0.0, driver: gpio, name: GPIO25, num: 25) 2024-05-29 15:40:05.961438 <I> <bricklet.c:315> Found Bricklet port D (spidev: /dev/spidev0.0, driver: gpio, name: GPIO26, num: 26) 2024-05-29 15:40:05.962076 <I> <bricklet.c:315> Found Bricklet port E (spidev: /dev/spidev0.0, driver: gpio, name: GPIO27, num: 27) 2024-05-29 15:40:05.962680 <I> <bricklet.c:315> Found Bricklet port F (spidev: /dev/spidev0.0, driver: gpio, name: GPIO24, num: 24) 2024-05-29 15:40:05.963279 <I> <bricklet.c:315> Found Bricklet port G (spidev: /dev/spidev0.0, driver: gpio, name: GPIO7, num: 7) 2024-05-29 15:40:05.963771 <E> <bricklet_stack_linux_spidev.c:285> Could not reserve line for ouput gpiochip4 7: EBUSY (16) 2024-05-29 15:40:06.963663 <I> <main_linux.c:563> Brick Daemon 2.4.6+snapshot~730b7d7 stopped bearbeitet May 29, 2024 at 13:43 von smgor03 Zitieren
photron Geschrieben May 29, 2024 at 17:11 Geschrieben May 29, 2024 at 17:11 When you run brickd as user then it cannot access the GPIO pins with an EACCESS error. That is somewhat expected. There was a bug in the cleanup code for that case that resulted in a crash. This is fixed on Github now. You need to run brickd as root, but then it still cannot access the GPIO pins this time with an EBUSY error. This is unexpected. I can repoduce this problem with Ubuntu on an Raspberry Pi 5. But this is working fine with Raspberry Pi OS. So this must be an Ubuntu specific problem. I don't have the time right now to look into this Ubuntu specific problem. Maybe we could look at this next week. Sorry! Zitieren
rtrbt Geschrieben June 3, 2024 at 09:49 Geschrieben June 3, 2024 at 09:49 Quote Running brickd with sudo causes following error: EBUSY could mean that the HAT Bricks device tree overlay did not load correctly (We use the overlay to be able to use gpiochip4 7) Please run gpioinfo and post the output here. Zitieren
smgor03 Geschrieben June 10, 2024 at 10:36 Geschrieben June 10, 2024 at 10:36 Zitat Please run gpioinfo and post the output here. The output is: gpiochip0 - 32 lines: line 0: "-" unused input active-high line 1: "2712_BOOT_CS_N" "spi10 CS0" output active-low [used] line 2: "2712_BOOT_MISO" unused input active-high line 3: "2712_BOOT_MOSI" unused input active-high line 4: "2712_BOOT_SCLK" unused input active-high line 5: "-" unused input active-high line 6: "-" unused input active-high line 7: "-" unused input active-high line 8: "-" unused input active-high line 9: "-" unused input active-high line 10: "-" unused input active-high line 11: "-" unused input active-high line 12: "-" unused input active-high line 13: "-" unused input active-high line 14: "PCIE_SDA" unused input active-high line 15: "PCIE_SCL" unused input active-high line 16: "-" unused input active-high line 17: "-" unused input active-high line 18: "-" unused input active-high line 19: "-" unused input active-high line 20: "PWR_GPIO" "pwr_button" input active-low [used] line 21: "2712_G21_FS" unused input active-high line 22: "-" unused input active-high line 23: "-" unused input active-high line 24: "BT_RTS" unused input active-high line 25: "BT_CTS" unused input active-high line 26: "BT_TXD" unused input active-high line 27: "BT_RXD" unused input active-high line 28: "WL_ON" "wl_on_reg" output active-high [used] line 29: "BT_ON" "shutdown" output active-high [used] line 30: "WIFI_SDIO_CLK" unused input active-high line 31: "WIFI_SDIO_CMD" unused input active-high gpiochip1 - 4 lines: line 0: "WIFI_SDIO_D0" unused input active-high line 1: "WIFI_SDIO_D1" unused input active-high line 2: "WIFI_SDIO_D2" unused input active-high line 3: "WIFI_SDIO_D3" unused input active-high gpiochip2 - 17 lines: line 0: "RP1_SDA" unused input active-high line 1: "RP1_SCL" unused input active-high line 2: "RP1_RUN" "RP1 RUN pin" output active-high [used] line 3: "SD_IOVDD_SEL" "vdd-sd-io" output active-high [used] line 4: "SD_PWR_ON" "sd_vcc_reg" output active-high [used] line 5: "SD_CDET_N" "cd" input active-low [used] line 6: "SD_FLG_N" unused input active-high line 7: "-" unused input active-high line 8: "2712_WAKE" unused input active-high line 9: "2712_STAT_LED" "ACT" output active-low [used] line 10: "-" unused input active-high line 11: "-" unused input active-high line 12: "PMIC_INT" unused input active-high line 13: "UART_TX_FS" unused input active-high line 14: "UART_RX_FS" unused input active-high line 15: "-" unused input active-high line 16: "-" unused input active-high gpiochip3 - 6 lines: line 0: "HDMI0_SCL" unused input active-high line 1: "HDMI0_SDA" unused input active-high line 2: "HDMI1_SCL" unused input active-high line 3: "HDMI1_SDA" unused input active-high line 4: "PMIC_SCL" unused input active-high line 5: "PMIC_SDA" unused input active-high gpiochip4 - 54 lines: line 0: "ID_SDA" unused input active-high line 1: "ID_SCL" unused input active-high line 2: "GPIO2" unused input active-high line 3: "GPIO3" unused input active-high line 4: "GPIO4" unused input active-high line 5: "GPIO5" unused input active-high line 6: "GPIO6" unused input active-high line 7: "GPIO7" "spi0 CS1" output active-low [used] line 8: "GPIO8" "spi0 CS0" output active-low [used] line 9: "GPIO9" unused input active-high line 10: "GPIO10" unused input active-high line 11: "GPIO11" unused input active-high line 12: "GPIO12" unused input active-high line 13: "GPIO13" unused input active-high line 14: "GPIO14" unused input active-high line 15: "GPIO15" unused input active-high line 16: "GPIO16" unused input active-high line 17: "GPIO17" unused input active-high line 18: "GPIO18" unused input active-high line 19: "GPIO19" unused input active-high line 20: "GPIO20" unused input active-high line 21: "GPIO21" unused input active-high line 22: "GPIO22" unused output active-high line 23: "GPIO23" unused output active-high line 24: "GPIO24" unused output active-high line 25: "GPIO25" unused output active-high line 26: "GPIO26" unused output active-high line 27: "GPIO27" unused output active-high line 28: "PCIE_RP1_WAKE" unused input active-high line 29: "FAN_TACH" unused input active-high line 30: "HOST_SDA" unused input active-high line 31: "HOST_SCL" unused input active-high line 32: "ETH_RST_N" "phy-reset" output active-low [used] line 33: "-" unused input active-high line 34: "CD0_IO0_MICCLK" "cam0_reg" output active-high [used] line 35: "CD0_IO0_MICDAT0" unused input active-high line 36: "RP1_PCIE_CLKREQ_N" unused input active-high line 37: "-" unused input active-high line 38: "CD0_SDA" unused input active-high line 39: "CD0_SCL" unused input active-high line 40: "CD1_SDA" unused input active-high line 41: "CD1_SCL" unused input active-high line 42: "USB_VBUS_EN" unused output active-high line 43: "USB_OC_N" unused input active-high line 44: "RP1_STAT_LED" "PWR" output active-low [used] line 45: "FAN_PWM" unused output active-high line 46: "CD1_IO0_MICCLK" "cam1_reg" output active-high [used] line 47: "2712_WAKE" unused input active-high line 48: "CD1_IO1_MICDAT1" unused input active-high line 49: "EN_MAX_USB_CUR" unused output active-high line 50: "-" unused input active-high line 51: "-" unused input active-high line 52: "-" unused input active-high line 53: "-" unused input active-high Zitieren
rtrbt Geschrieben June 11, 2024 at 07:59 Geschrieben June 11, 2024 at 07:59 Quote [...] gpiochip4 - 54 lines: [...] line 7: "GPIO7" "spi0 CS1" output active-low [used] line 8: "GPIO8" "spi0 CS0" output active-low [used] There's the problem: Your HAT Brick's firmware is outdated. The easiest way to fix this is to use an older Raspberry Pi (every version up to and including a Pi 4 will work). Plug the HAT on the old Pi, install Brick Daemon there, connect to the Pi with Brick Viewer and update the HAT Firmware to 2.0.4. Then plug the HAT back onto the Pi 5 and boot it, gpioinfo should then report both those lines as unused and Brick Daemon should be able to start. If you don't have another older Pi available, we have to build a patched version of Brick Daemon for you. Zitieren
photron Geschrieben July 2, 2024 at 16:45 Geschrieben July 2, 2024 at 16:45 The original problem has been resolved. Please update to brickd 2.4.6 and HAT Brick firmware 2.0.4. Zitieren
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.