I'm having problems with Motion's live stream going grey and saying unable to open video device.
I can get my live stream working by rebooting my PI and, following a reboot, entering the command sudo modprobe bcm2835-v4l2
(only with the command removed from the RC.local
file).
But when I try and place it in the RC.local
file to load the driver at boot, it doesn't work.
How can I make it work from boot?
This is where I've put the command in my RC.local
file
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# 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
sudo modprobe bcm2835-v4l2
exit 0