reggie4
Posts: 81
Joined: Wed Jan 15, 2014 2:09 pm

Motion-PICAM-UV4L

Mon Oct 13, 2014 12:49 pm

Hi All,

I have a raspberry pi camera board and the UV4L driver installed, for use with the popular software Motion; and am having problems with making it work following a boot.

I can get motion to work following a boot, by entering the following into the terminal:

1)

Code: Select all

sudo /etc/init.d/motion stop
2)

Code: Select all

LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so motion -c /etc/motion/motion.conf
I've poured over the script /etc/init.d/motion but just cannot get motion to work with the UV4L driver without steps 1 and 2 above.

If I do not perform 1&2, motion runs, but its a gray screen with message "unable to open video device".

I've tried tried to run a shell script at boot that "LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so motion -c /etc/motion/motion.conf", which worked for a few mins, then back to grey screen again.

How can I make Motion boot using this driver, automatically?
The driver usage is on this webpage, example 2, Motion http://www.linux-projects.org/modules/s ... e&artid=16

Thanks in advance,

Reggie.


reggie4
Posts: 81
Joined: Wed Jan 15, 2014 2:09 pm

Re: Motion-PICAM-UV4L

Mon Oct 13, 2014 6:56 pm

I've tried tried to run a shell script at boot that "LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so motion -c /etc/motion/motion.conf", which worked for a few mins, then back to grey screen again.
Following Rpiname's helpful comments, I placed

Code: Select all

export LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so
in the correct place and this seemed to work for a while then suddenly it stopped again. I looked in the syslog and BINGO!

Code: Select all

Error opening file /mnt/01-20141013173918-00.jpg with mode w: Permission denied
The permissions for the folder weren't set to write for user motion - :oops:

Once I gave them those permissions, it worked.

Thanks for your help Rpiname,

Reggie.

Return to “Camera board”