This is on the raspberry pi 1 B with the v2 official pi camera. It says no camera detected, but I have had it working on raspbian using raspistill -o image.jpg
. USB camera works like a dream, but on the raspberry pi 1, it has two USB ports so one for the printer and one for the wifi adapter and no room for the USB camera, which is why I need to use the raspberry pi camera. I have tried increasing the memory split from 64 to 128, no difference. I have tried octoprint, same issue. When I found out that you can run astroprint without a hotspot (https://astroprint.zendesk.com/hc/en-us/articles/207866186-Can-I-configure-the-Raspberry-Pi-network-myself-) I thought why not use astroprint? but to my dismay, still no working camera. Please help.
Whatās the result of:
sudo lsmod
Do you see the bcm2835_v4l2 driver in there?
Module Size Used by
cfg80211 525742 0
rfkill 21373 1 cfg80211
bcm2835_gpiomem 3791 0
fixed 3029 0
uio_pdrv_genirq 3718 0
uio 10166 1 uio_pdrv_genirq
v4l2_common 6285 0
videobuf2_vmalloc 5849 0
videobuf2_memops 1939 1 videobuf2_vmalloc
videobuf2_v4l2 16841 0
videobuf2_core 31781 1 videobuf2_v4l2
videodev 177702 3 v4l2_common,videobuf2_core,videobuf2_v4l2
media 28994 1 videodev
ipv6 384468 20
Canāt see exactly bcm2835_v4l2 driver but there are some similar things but I donāt know if theyāre the right things.
Thatās the problem. What image did you flash ?
The problem is that the raspberry pi camera is not being detected and astroprint image is AstroBox-rpi-0_10_9-20170907.
Yes, itās not being detected because we only support V4L2 compatible cameras. The Rpi Camera needs an additional driver (bcm2835_v4l2) to be compatible. Itās possible that the latest image which is the one you mentioned doesnāt include it by default. Weāll fix that on the next image. In the meantime, you can install it yourself:
- Edit the file /etc/modules
- add
bcm2835-v4l2
to the end of it - save & reboot
When I opened that file to edit it (sudo nano /etc/modules
) It appears to have bcm2835-v4l2
on the end of it already:
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
bcm2835-v4l2
Yes, thatās the way it should be but wanted to make sure it was there in yours. I wonder if the last version of raspbian removed the driver all togetherā¦ I need to investigate more.
Iām on an RPi3, and I just bought a V2 camera on the naive assumption that AstroPrint supported it (given the glaring āCameraā icon). I even printed a new RPi case to mount on my printer.
Oh, the Disappointment.
I havenāt paid a dime for any of your services, so my annoyance is largely inconsequential. However, it appears form the discussion that this is some kind of driver problem that could be fixed with an update. I just installed the latest AstroPrint update, so Iām assuming that update did not include a fix for this or the fix did not address my particular issue.
Has there been any movement on this bug?
Sorry about that. We have focused on USB cameras more as theyāre more versatile and have cheaper options.
At the moment weāre busy getting the AstroBox touch ready and all other issues are taking a back seat. We will retake this in the coming year once the AstroBox touch and a few other priorities are out of the way.
Thanks for using AstroPrint and Happy New Year
I also have a RaspPi III, and a V2 camera.
Before the latest update I was able to select 1920x1080 resolution, now Astroprint denies me this option, and only allows 720p stating my camera doesnāt support HD - which is not correct of course.
What version did you previously have?
itās seems the startup procedure is not correct for astroprint to control the raspi cam
we have the same problem even if enable the raspi camera from rapsi-config
but got it work with the following sequence
from astroprint
- select rapi camera
- go to video stream < ---- must not work
- select snapshot and take photo <---- can take picture from raspi-cam
- select stream again, it will work
- if not, select usb camera and repeat step 2
this is my case on Pi3, with different version of raspi-camera
Ah, one sec. if the camera takes photos but no video we also need to look at webrtc compatibility. What browser are trying to see th video on?
im also having problem with the Raspberry Pi NoIR Camera Module V2 the camera works just when i select 1080p it says that this resolution isnt supported by your camera and it is. 720P works but not 1080P on the newest release.
It would be related to how the camera reports its supported modes. What does running this command output:
v4l2-ctl --list-formats-ext -d /dev/video0
Type : Video Capture
Pixel Format: āUYVYā
Name : UYVY 4:2:2
Size: Stepwise 32x32 - 3280x2464 with step 2/2
Index : 9
Type : Video Capture
Pixel Format: 'NV12'
Name : Y/CbCr 4:2:0
Size: Stepwise 32x32 - 3280x2464 with step 2/2
Index : 10
Type : Video Capture
Pixel Format: 'BGR3'
Name : 24-bit BGR 8-8-8
Size: Stepwise 32x32 - 3280x2464 with step 2/2
Index : 11
Type : Video Capture
Pixel Format: 'YV12'
Name : Planar YVU 4:2:0
Size: Stepwise 32x32 - 3280x2464 with step 2/2
Index : 12
Ugh! itās giving a rangeā¦ Weāll need to make changes to support this.
It seems as if a completely different issue has taken control of this issue, so iām going to try and gain back the original issue.
That did help me a lot. Iām going to make a step by step guide on how to get the webcam stream from raspi cam working.
-
Install astroprint as you would normally
-
Run
sudo apt-get update
sudo apt-get install git-core
cd
git clone git://git.drogon.net/wiringPi
cd ~/wiringPi
git pull origin
cd ~/wiringPi
./build
That will get WiringPi good to go -
Now run
nano camerafix.sh
Then paste#!/bin/bash
gpio -g mode 0 in
gpio -g mode 1 in
gpio -g mode 28 alt0
gpio -g mode 29 alt0or (I havnāt tested this one yet)
#!/bin/bash
gpio -g mode 0 in
gpio -g mode 1 inThen press Contol+X then Y then Enter
-
Now you run
chmod +x camerafix.sh
and then go to the web interface camera page and you will see that there is now a nice blue button that says āStart Streaming Videoā ! -
I think you need to do this every time you start it up so now to make it run at startup, run
sudo nano /etc/rc.local
and at the line just aboveexit 0
put the command from number 4 there so it should look like this:-#
-# By default this script does nothing.-# Print the IP address
-_IP=$(hostname -I) || true
-if [ ā$_IPā ]; then
-printf āMy IP address is %s\nā ā$_IPā
-fi
-chmod +x camerafix.sh
-exit 0Then press Contol+X then Y then Enter
I have done this and it 100% works. Donāt know how it would be possible to fix in the software itself. Also, how can I make a timelapse?