geraldoramos / pigeon

Pigeon is a simple 3D printed cloud home surveillance camera project that uses the new Raspberry Pi Zero W
https://www.instructables.com/id/Pigeon-a-3D-Printed-Cloud-Home-Surveillance-Camera/
GNU General Public License v3.0
296 stars 22 forks source link

bcm2835-v412 error on install, can't install package following it #24

Open flingwing opened 6 years ago

flingwing commented 6 years ago

In a recent redeploy of pigeon onto my pi I got the following error on install:

modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.9.41+/modules.dep.bin' modprobe: FATAL: Module bcm2835-v4l2 not found in directory /lib/modules/4.9.41+ Installation completed and service started

The HTTP server refuses connection (I've verified the port is open). No images are being taken and stored on DB.

When I went to install the module wget https://github.com/Motion-Project/motion/releases/download/release-4.0.1/pi_jessie_motion_4.0.1-1_armhf.deb dpkg -i pi_jessie_motion_4.0.1-1_armhf.deb

it also is unsuccessful, spits out a bunch of characters. One thing it does seem to try to do is connect to a unreachable domain:

--2017-11-07 00:19:43--  (try: 2)  http://2.0/
Connecting to 2.0 (2.0)|2.0.0.0|:80... 
geraldoramos commented 6 years ago

Hi @flingwing, what OS version are you using? Also, can you confirm the hardware you are using (Raspberry pi W?)

I will try to reproduce the issue.

flingwing commented 6 years ago

Hey @geraldoramos, thanks for the help.

I'm using Jessie lite

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)" NAME="Raspbian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=raspbian ID_LIKE=debian

Linux version 4.9.41+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #1023 Tue Aug 8 15:47:12 BST2017`

on a pi zero

`processor : 0 model name : ARMv6-compatible processor rev 7 (v6l) BogoMIPS : 697.95 Features : half thumb fastmult vfp edsp java tls CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xb76 CPU revision : 7

Hardware : BCM2835 Revision : 900093 Serial : 00000000c391f68e`

geraldoramos commented 6 years ago

Hi,

Looks like you are not using the newest version. The current installation uses sudo apt-get install motion in replacement of wget https://github.com/Motion-Project/motion/releases/download/release-4.0.1/pi_jessie_motion_4.0.1-1_armhf.deb dpkg -i pi_jessie_motion_4.0.1-1_armhf.deb.

Can you let me know the results of sudo apt-get install motion?

I would recommend trying to git clone this repository and trying the install pigeon with the most updated version.

If my assumption is wrong and you are using the newest installation routine, can you clarify where did you get the wget ...motion... command?

I was going to try a new install on the most recent Raspbian today but I then I realize the issue could be the older installation script.

Let me know and I will try to reproduce the issue on a fresh install here if it doesn't work....

flingwing commented 6 years ago

an apt-get on motion tells me I have the latest version motion is already the newest version (4.0-1).

the wget was from the documentation under the issues section. I ran it after I was experiencing issues after installation.

curious What package serves up the v4l2 library? That sounds like it is part of motion?

also based on the the original error output on installation it looks to reference /lib/modules/4.9.41+/modules.dep.bin

whereas my library has 4.9.59+ 4.9.59-v7+

mconway commented 6 years ago

Not sure if this was resolved (it's a bit old), but I had a similar issue last night when installing Pigeon using the install_pigeon.sh script. Turns out that if apt-get upgrade pulls down a new kernel image, you need to reboot before it will work.

flingwing commented 6 years ago

Hmm.. thats curious, I’ve rebooted but get the same issue. I’ll try again tonight.

Anyone know where the path is coded so I can manually change (if I’m interpreting the error correctly).

On Dec 18, 2017, at 12:51 PM, Mike Conway notifications@github.com wrote:

Not sure if this was resolved (it's a bit old), but I had a similar issue last night when installing Pigeon using the install_pigeon.sh script. Turns out that if apt-get upgrade pulls down a new kernel image, you need to reboot before it will work.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

mconway commented 6 years ago

I believe the path is actually an error from modprobe, which is why I realized it was an issue with Kernel versions.

flingwing commented 6 years ago

okay, a few restarts and apt-get updates did seem do some good. Motion is running and I can pull up the IP now, however, I ran into a "unable to open video device" and when I look for a /dev/video0 it is missing.

sudo modprobe bcm2835-v4l2seems to address that. After a reboot I seem to have to rerun that command. Everything is working now and its fantastic!

One other issue I seemed to have is my motion http control was set as the same port as my stream which obviously didn't fly. After tweaking that and I had the motion settings via website as well.

flingwing commented 6 years ago

okay turns out this is more complicated.... One thing I noticed I need to run motion as root for it to successfully work at all. But that wasn't it.

On reboots the Pi doesn't have the required /dev/video0 device. this is where the sudo modprobe bcm2835-v4l2 comes into play. My goal is to have everything launch after being powered on so I added this kernel to the list of modules to load on startup in /etc/modules-load.d. This has the desired effect and I can see the video0 device after reboots.

Motion still won't loading correctly after a reboot. It looks like a second motion process is started (perhaps part of the motion package install) and ties the video device up giving a grey screen with, our without, our motion run in rc.local. I installed apt-get install sysv-rc-conf and launched sudo sysv-rc-conf to disable motion. That prevents the errant motion process for kicking off, but I still need to kick off sudo motion -c /home/pi/pigeon/pigeon.conf despite it being in rc.local. Thinking that is a product of sysv-rc-conf and the run levels I've turned motion off on in order to kill that errant motion process. Any thoughts?

ghost commented 5 years ago

I had the same error. I just figured out that I wasn't writing the correct name. The package name is "bcm2835-v4l2", the character between the four and the number two is an "l", not a "1". I hope that helps!

sungonuni commented 3 years ago

I had the same error. I just figured out that I wasn't writing the correct name. The package name is "bcm2835-v4l2", the character between the four and the number two is an "l", not a "1". I hope that helps!

Awsome! Maybe 80% of who run into this issue can solve by this solution.