Issue setting up Arducam with Octoprint

Camera model
Arducam Pi Camera with motorized lens.

What is the problem?
I've followed the steps on

and when i get to the portion where i have to enter
"if ! grep -Fxq "^#ArduCamFocus$" /boot/config.txt; then
sudo cat << end_of_file >> /boot/config.txt
i get the error "-bash: /boot/config.txt: Permission denied".

My ultimate issue is that the camera shows in the control tab and I can see an image, however it doesn't allow me to change the cameras focus. The adjustment sliders are there, but are grayed out. I thought the problem with me not being able to enter the code above was my issue, however, the changes it's supposed to make are already in /boot/config.txt so I'm thinking that's not the issue. I just stated it here just incase that can give an idea for fixing the bigger issue.

What did you already try to solve it?
I have tried reinstalling octopi several times on my sd card to hopefully solve the issue. I have also tried accessing the /boot/config.txt and adding that line of code manually. I have followed every step of that guide and I get stuck. Octoprint isn't allowing me to change the focus on the camera.

Logs (/var/log/webcamd.log, syslog, dmesg, ... no logs, no support)

OctoPrint version : 1.6.1
OctoPi version    : 0.18.0
pi@octopi:~ $ if ! grep -Fxq "^#ArduCamFocus$" /boot/config.txt; then
sudo cat << end_of_file >> /boot/config.txt
-bash: /boot/config.txt: Permission denied

Additional information about your setup (OctoPrint version, OctoPi version, ...)
I'm using a raspberry pi 3 B+ for octopi. I am using Windows 10 and using puTTY to access SSH. Thanks.

The easiest way would be to just do it without the script.


sudo  /boot/config.txt

scroll down to the end of the file and add this


Exit the editor with ctrl + x, confirm the save question with y and the filename with enter.

I checked /boot/config.txt and it already has that in there.

# For more options and information see
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border

# uncomment to force a console size. By default it will be display's size minus
# overscan.

# uncomment if hdmi display is not detected and composite is being output

# uncomment to force a specific HDMI mode (this will force VGA)

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display

# uncomment for composite PAL

#uncomment to overclock the arm. 700 MHz is the default.

# Uncomment some or all of these to enable the optional hardware interfaces

# Uncomment this to enable infrared communication.

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)

# Enable DRM VC4 V3D driver on top of the dispmanx display stack

# enable raspicam


well then you don't need to add it again :slight_smile:

I didn't state it in the first post and I should have. I was thinking that not being able to put that in the code was my issue, it clearly isn't since it's already there. The camera shows up in octopint control and I can see live footage, but it will not let me change the cameras focus.

Can you upload the octoprint.log? There may be errors or other useful information relating to the plugin there.

octoprint.log (64.4 KB)

I would love to know the solution to this. I have the same exact Pi, same situation, tried everything and get nothing. Here is my log for comparison sake. octoprint 111021.log (146.5 KB)

I have a possible idea that could fix it. I haven't tried it yet because I couldn't find a solution and gave up and bought a regular webcam. It involves taking the sd card out of the raspberry pi, inserting it into your PC, opening octopi.txt using notepad++ and uncommenting the appropriate lines for a raspberry pi camera. Then trying again. I plan on trying this to see if it works because I would like to set up my pi camera specifically for time lapse and the webcam for overall monitoring. Let me know if this works.

Edit- Do this on top of everything else that is supposed to work for the installation with the correct plugin.

Thanks, i have completed that task multiple times now without success.
Pardon my newb question.
Can i use VS code to edit everything on the SD card by uncommenting the sections and avoid the SSH thing. - do those two thing accomplish the same task two different ways?

In other words, i can't get SSH to work, can i just do everything right on the SD card?

From what I understand about using SSH to access a file, is to be able to do it remotely. So if this is correct, then in theory, if you can access the actual file via SD card, then you can edit it without using SSH. I'm fairly new to this as well so I'm having to learn with trial and error.

Ok, i got it figured out, 2 main things i changed that led to success.

1- I was running in circles because my password included (@) symbol which comes out as (") when you type it directly into the Raspberry Pi so my password was always incorrect. - I changed my password, then went into Localization options and changed the keyboard from generic to my keyboard. Then @ came out as @.
2- I started the whole installation over with a 8gb card (anything below 32gb) because I could not format my card in the correct Fat32 format (never payed attention before) with my 64gb card. I don't know all of the i/o on that but since ExFat isn't the same i guess it keeps something from working correctly . Not sure if all that was said correctly, hopefully you get the drift.

I used this install to get it right.

You should not need to format the SD card manually, the imager will take care of that.

While you can avoid using SSH and edit files directly on the SD card, the OS where the SD card will be attached needs to be able to mount the / partition. This is easily accomplished if that OS is Linux but it gets harder for others.

I strongly suggest you figure out how to use SSH. Your life with a 3D printer and OctoPrint will be much easier.

Well I also have setup issues with my ArduCam Autofocus camera.

Camera model ArduCam 16 MP IMX519 Autofocus
Raspberry Pi 4 Model: B + 8GB Ram + 64 GB SD Card

What is the problem?. Build Issues of libcamera (and possibly others too).
the command vcgencmd get_camera gets supported=1 detected=0
Does this mean possibly my camera is faulty or connected incorrecty ?

Some of the documented instructions do not work.
[ yes I did read the manual for the camera and tried the instructions there, but although the instructions executed without error, the camera still not working ]

Concern that Ocotpi Build is 32 bit kernel - why not 64 bit ?
Concern about the OS Release version (10) when the camera docs talk about (11).

What did you already try to solve it?. Tried doing everything over again. Not sure where to begin
Tried the instructions at:

It fails at step 2.2 and also 2.3.3

**pi@octopi**:**~ $** raspistill -t 0
mmal: Cannot read camera info, keeping the defaults for OV5647
mmal: mmal_vc_component_create: failed to create component '' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component '' (1)
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Camera is not detected. Please check carefully the camera module is installed correctly

Logs (/var/log/webcamd.log, syslog, dmesg, ... no logs, no support) (157.1 KB)

Additional information about your setup (OctoPrint version, OctoPi version, ...)
OctoPrint version : 1.8.4
OctoPi version : 0.18.0

Other symptoms:
Installation of camera software is supposed to create /dev/video0 and /dev/video1 but they are not present , The system tries to use /dev/video10 (first of 10 video devices that are created by default).
so its obvious cause of some issues, but the build process fails due to what looks like basic programming issues ::

There are a myriad of possible issues and probably some blind alleys. So I need some help with a place to start methodical approach to debugging the issue.

I'm having the same issue as the OP.

Octoprint 1.8.6
Raspberry Pi 3 Model B 1GB RAM + 32GB SD Card
ArduCam 5MP SKU B0176 motorized focus

Problem: I've installed all the libraries, enabled I2C, as specified by arducam and in the plug-in pages.
I have a good camera feed in Octoprint, but neither of the Arducam plug-ins enable control of the focus capability. I had the same problem as the OP (bash error on config.txt) but manually inspected the config.txt file and found the two I2C parameters were already enabled.

ArducamCameraControl 0.3. PTZ and focus sliders are grayed-out and non-functional
ArducamFocus 0.0.6 Clicking on the focus arrows generates the error "Trouble accessing camera. I2C bus failure. Is camera plugged in?"

I2C is enabled in the config.txt parameters and via raspbi-config. The camera video stream is working. But I'm unable to control focus using either of these plug-ins.

In case it helps, I was having the same problem. Camera worked, i2c error on focus. I switched the camera aspect ratio to 4:3 in octoprint "Webcam & Time Lapse" settings, and it works now.