Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arducam IMX219 8MP Setup #155

Open
git2212 opened this issue Oct 8, 2024 · 1 comment
Open

Arducam IMX219 8MP Setup #155

git2212 opened this issue Oct 8, 2024 · 1 comment

Comments

@git2212
Copy link

git2212 commented Oct 8, 2024

Hello,

I am trying to add ARDUCAM (IMX219) support to my Klipper setup on an OrangepiZero 3 running an Octoprint frontend. Since the recommended OS was an Armbian Bookworm image, that's what I installed... as a result most of the "guides" out there targeted at PI seem to not apply.

I want to use Octoprint's support for camera-streamer with camera support via libcamera so I went ahead and installed the available APT packages

libcamera0.3 libcamera-tools libcamera-v4l2.

As per the camera-streamer github, I used the following to install:

PACKAGE=camera-streamer-$(test -e /etc/default/raspberrypi-kernel && echo raspi || echo generic)_0.2.8.$(. /etc/os-release; echo $VERSION_CODENAME)_$(dpkg --print-architecture).deb
wget "https://github.com/ayufan/camera-streamer/releases/download/v0.2.8/$PACKAGE"
sudo apt install "$PWD/$PACKAGE"

Everything appears to have installed without errors.

I am now stuck at configuring a proper camera-streamer service... I attempted to use the following:

[Unit]
Description=camera-streamer web camera for USB camera on Generic platform
After=network.target
ConditionPathExistsGlob=/dev/v4l/by-id/usb-*-video-index0

[Service]
ExecStart=/usr/bin/camera-streamer \
  -camera-path=/dev/video1 \
  -camera-format=JPEG \
#  -camera-format=MJPG \
  -camera-width=1920 -camera-height=1080 \
  -camera-fps=30 \
  ; use two memory buffers to optimise usage
  -camera-nbufs=3 \
  --http-listen=0.0.0.0 \
  --http-port=8080 \
  ; disable video streaming (WebRTC, RTSP, H264)
  ; on non-supported platforms
  -camera-video.disabled

DynamicUser=yes
#User=pi
#Group=pi
SupplementaryGroups=video i2c
Restart=always
RestartSec=10
Nice=10
IOSchedulingClass=idle
IOSchedulingPriority=7
CPUWeight=20
AllowedCPUs=1-2
MemoryMax=250M

[Install]
WantedBy=multi-user.target

but it fails to run and aborts with

Main PID: 8910 (code=exited, status=216/GROUP)

From what I can tell, it is complaining about setting the 'group' ... but why? I've tried it running as

User=pi
Group=pi

but same no joy.

For what it's worth, v4l2-ctl --list-devices spits out the camera as:

cedrus (platform:cedrus):
	/dev/video0
	/dev/media0

Arducam_8mp: USB Camera (usb-5311000.usb-1):
	/dev/video1
	/dev/video2
	/dev/media1

libcamera appears to work as it's cam -l utility lists the camera as:


Available cameras:
1: 'Arducam_8mp: USB Camera' (/base/soc/usb@5311000-1:1.0-0c45:6366)

Not sure if I am missing a permission somewhere or my service config is just wrong... any suggestions would be greatly appreciated :)

@git2212
Copy link
Author

git2212 commented Oct 9, 2024

I was able to run camera-streamer as a service once I removed i2c from supplimentary groups... I don't actually have an i2c group... it still begs the question, why would it not work with pi:pi ?... that user:group is valid...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant