3

I'm trying to use the library zbar to scan qr codes using Raspberry pi's camera module. I've connected and tested the camera, but I don't know how to access that from the library because it isn't on /dev/video0 or any location I can find. So I went here and followed these instructions:

raspberrypi ~ $ uv4l --driver raspicam --auto-video_nr --encoding h264 --width 1920 --height 1080 

After that I can use my camera and can find it on /dev/video0 through " ls /dev/video* " . However, when I run zbar through python, it doesn't work and, afterwards, " ls /dev/video* " returns no results!

The code I use is very similar to the one in here

Piotr Kula
  • 17,336
  • 6
  • 66
  • 105
rvcam
  • 31
  • 1
  • 2

2 Answers2

4

You can access the camera board on /dev/video0 by running the command:

sudo modprobe bcm2835-v4l2

This will have to be run on every boot of the device. Or you can put modprobe bcm2835-v4l2 in /etc/rc.local to make it run on every boot automatically.

11chubby11
  • 4,872
  • 5
  • 26
  • 32
2

Manually running modprobe bcm2835-v4l2 is good for temporarily loading a kernel module. To load a module at every boot, add it to /etc/modules:

bcm2835-v4l2
roens
  • 121
  • 4