Hey all, I’m trying to get this display working with Balena OS, together with the browser block. Disclaimer: I’m still very new to Balena.
Since the device overlays for the hyperpixel2r are not yet available in Balena OS, I compiled them on my Mac OS X to the .dtbo format and then copied it before provisioning the device into /mnt/overlays. You need to do this straight after flashing the image, otherwise it won’t be persisted.
Based on this comment, I then based most of my next steps.
I successfully ran the ./dist/hyperpixel2r-init script from a python container. I also added the I2C interface based on this documentation.
FROM balenalib/%%BALENA_MACHINE_NAME%%-python:3-buster-build
# Defines our working directory in container
WORKDIR /usr/src/app
RUN pip install --no-cache-dir RPi.GPIO
# This will copy all files in our root to the working directory in the container
COPY . ./
# Enable udevd so that plugged dynamic hardware devices show up in our container.
ENV UDEV=1
CMD modprobe i2c-dev && python3 ./dist/hyperpixel2r-init
my docker-compose.yml is…
version: '2'
services:
display:
build: ./display
restart: on-failure
privileged: true # required for UDEV to find plugged in peripherals such as a USB mouse
devices:
- "/dev/i2c-1:/dev/i2c-1"
- "/dev/mem:/dev/mem"
- "/dev/ttyACM0:/dev/ttyACM0"
cap_add:
- SYS_RAWIO
labels:
io.balena.features.kernel-modules: '1'
browser:
restart: always
image: balenablocks/browser
privileged: true # required for UDEV to find plugged in peripherals such as a USB mouse
network_mode: host
depends_on:
- display
I also added the configs I found in the install.sh as BALENA_HOST_CONFIG_* custom configuration variables as well as the DT params and overlays I think are required, but potentially too many:
Interesting logs:
dimes
[ 1.826947] bcm2708_fb soc:fb: FB found 1 display(s)
[ 1.838791] Console: switching to colour frame buffer device 60x30
[ 1.840694] bcm2708_fb soc:fb: Registered framebuffer for display 0, size 480x480
Display seems to be recognised, although I have no clue if the above logs imply that the display is ready to display data.
browser service logs
18.04.22 13:26:08 (+0200) browser xauth: file /home/chromium/.Xauthority does not exist
18.04.22 13:26:08 (+0200) browser xauth: (stdin):1: bad display name "5291aa2:0" in "add" command
The browser cannot add the display, any ideas how to debug this?
dimes
[ 6.848092] pinctrl-bcm2835 fe200000.gpio: pin gpio2 already requested by fe804000.i2c; cannot claim for rpi_backlight
[ 6.848112] pinctrl-bcm2835 fe200000.gpio: pin-2 (rpi_backlight) status -22
[ 6.848122] pinctrl-bcm2835 fe200000.gpio: could not request pin 2 (gpio2) from group gpio2 on device pinctrl-bcm2711
[ 6.848131] gpio-backlight rpi_backlight: Error applying setting, reverse things back
There’s a conflict with another I2C thingy that wants to use the same pins. Haven’t gotten around that yet, any ideas? I tried to find out what fe804000 is, but had no luck…
Here is my complete dmesg. There’s a lot going on in there; I’m sure someone experienced with this could find some more hints in it
root@5291aa2:~# dmesg.txt (26.6 KB)
My goal is to get the display running and eventually displaying some output from the browser block on it.
Thanks a lot and I hope I make sense