Webcam: libv4l2 & VIDIOC_DQBUF : No such device - python

I have written a python code by using OpenCV library to detect a motion. If a motion occurs, it takes a snapshot of the moving object. However my problem is this: If I execute the program on my PC (Ubuntu 12.04) everything's OK.
But when I execute the program on my BeagleBone which has Angstrom Linux running and an Us Robotics webcam device attached to it, after a while it gives the following error:
libv4l2: error dequeuing buf: No such device
VIDIOC_DQBUF: No such device
How can I solve this problem?
Regards
edit: I installed ubuntu 12.04 to my BeagleBone and everything is OK with it too. It seems like my problem is related to Angstrom image. Maybe a driver or a library (libv4l2?) problem? Any ideas?

I was seeing this error with Ubuntu also when the board was powered through the USB cable. When I powered the board with a 5V supply, the problem went away.

I experienced the same problem. I even changed my board because of this error. But when I resorted back to my older power supply, it was gone. As simple as that.

Related

Raspberry Pi 400 with BME688 for bme ai studio data collection

I am using a Raspberry Pi 400 with a Bosch BME688 sensor to collect data to pass to the BME Ai studio for training. I used the pi3g github library to collect data. When running the examples everything works fine but when using the bmerawdata.py it results in a segmentation fault. I've already done what is suggested in the issue for the segmentation fault and i fixed the constants in the library that changed from the 1.0.x version to the 2.2.0.0 of the bsec library.
The first issue that i encountered was that executing the bmerawdata.py under sudo would give me different results from the execution without sudo. After removing the bme68x library and reinstalling it it seems like the super user execution and the normal user execution produce the same result. But after a couple of cycles the program now crashes with a segmentation fault.
If anyone could help that'd be appreciated

troubleshooting raspberry pi pigpio error

i installed the python-pigpio library and get the error pigpio.error: ‘GPIO is not in use for PWM’ when running the line https://github.com/danking6/smart-led-window/blob/master/window.py#L133. google didn’t turn up much for that error, and am new to raspberry pi development. im not sure where to even start troubleshooting. i am only using pins 21 and the ground pin next to it. can someone point me in a good troubleshooting direction….
using python 2.7.16, python-pigpio 1.68-3
Have you tried moving your connection to pin GPIO 18? according to this image, pin 21 does not have PWM support

Error displaying video stream using Opencv on raspberry pi

I'm trying to access a live video feed from my Raspberry Pi with a PiCam attached. I have enabled the camera in the interface settings and even tested it by snapping some pictures and videos using the PiCam library. However, OpenCV is giving me troubles. I installed open CV following this tutorial (shoutout to Adrian Rosenbrock).
Check out the screenshot below for the code and the error message. I'm running everything from within a virtual environment with OpenCV installed, like Adrian suggests.
Code and error message
VIDEOIO ERROR: V4L: can't open camera by index 0
From what I've read from other problems people have had, this error is sometimes resolved by playing with the index value. If i change the index value to -1 or 1, like most solutions suggest, i either get the same thing or a slightly different "can't access camera" error.
I'm relatively new to OpenCV and RPi so I might just be missing something simple. Any suggestion is much appreciated, thanks!
You may need to enable access to the camera. Try typing:
sudo modprobe bcm2835-v4l2 in terminal on your RPI.

Raspbian Jessie (RPI3) boot options not launching Desktop

I'm trying to connect raspberry pi with MatLab. I use the toolbox within matlab to configure raspberry pi. It automatically connects through network however it also gives you OS within that setup procedure, you can't connect to raspberry pi without it. Although the system it gives is technically Raspbian Jessie it comes with limited package.
When it launches and I input dir into console it only shows files such as: satkin_ws install ros_indigo.sh install_ros_package.sh and ros_catkin_ws. No other folders or files are pre-loaded onto the system. I tried to install some packages for display manager such as gdm3 and lightdm but I still have a problem with loading desktop environment. Can someone give me suggestions on how to resolve this issue?
Alright after doing some research I found that the system installed by Matlab is Raspbian Jessie Lite which does not come with GUI/Desktop environment by default but you can install it you want. Here is the link to get you going:
https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=133691

Python Illegal instruction on Raspberry Pi Zero

When I try to run a python script I get Illegal instruction and that's it, it doesn't give any more details so I have no idea what's going on, is there a way to find out what is causing the Illegal instruction error?
Also, I run the code using sudo I don't get any output, the program just exits.
UPDATE:
The script I'm running is the simple-agent script from bluez:
https://github.com/pauloborges/bluez/blob/master/test/simple-agent
Also, I ran line by line like #buratino said and I got the error in the second line:
from gi.repository import GObject
Like #Notlikethat said, the Illegal instruction error happens when the code being executed was compiled for a different architecture, Raspberry Pi uses ARM.
That said, I found out that GObject seemed to be causing the problem. Anyway, I uninstalled every bluetooth related package I had installed and reinstall them using the raspbian repository and now the Illegal instruction is gone and the script executes correctly.
Why did this happen? Well, I have a Raspberry Pi Zero which means I don't have an Ethernet port, before I bought a WiFi dongle I installed a few packages by downloading them on my computer and storing the .deb in the SD card, of course this means I have to manually check that I'm downloading the right version of the package, I must've messed up in one of them.
Lesson learned, never try to manually install packages, let apt-get do all the work!

Categories

Resources