Getting RPi-Cam-Web-Interface running - camera

I followed the tutorial on this site, to get my RaspberryPi NoIR-Cam running. After starting it i am retrieving the following error:
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
sh: 1: /var/www/html/macros/error_hard.sh: Permission denied
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
This looks like a permission thing, but I executed
chmod u+x *.sh
just like they mentioned in the tutorial. Do you have any idea what I am doing wrong here?

Explanation: It is a permission problem, the RPi interface is trying to use the pi camera at the same time as something else, and that something else has root privileges.
I have used this interface before to stream PiCamera data into a webserver, and use three.js to render it and make it vr compatible. This RPi web interface is pretty frustrating for me. But, I have had that problem before. First, check your camera connection to the pi. To do this type raspistill -t 0 into the terminal. If it brings up a preview window, that is not the problem, if it doesn't bring up a preview window, fiddle with the connection and try again. Next, if that doesn't work, run ./RPi_Cam_Web_Interface_Installer.sh. This should bring up a crude GUI. Use your arrow keys to select number 4, or start camera. Once it starts, it should say 'started' next to it. You may get an error message at the bottom saying mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
sh: 1: /var/www/html/macros/error_hard.sh: Permission denied
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM) (or the same error you got). To fix this, close the terminal, open up a new one, and cd RPi_Web_Interface and then run again ./RPi_Web_Interface_Installer.sh select configure, enable autostart and camera. Then reboot. When the pi boots up, immediately open a terminal cd RPi_Web_Interface and ./RPi_Web_Interface_Installer.sh and check if the camera is started (you will know because the green started message will be next to the start option). If it isn't started, start it. IF you get the same error messages, I don't know what to tell you.

Had this exact error so:
ran sudo raspi-config and re-enabled the camera -problem went away

Related

Setting up SSH for WSL using Ubuntu, but can't edit ssd_config file with VSCode WSL2 window. It won't save - "operation not permitted"?

I'm following these instructions to set up LAMP on WSL. I got to step 3, and made the edits it instructed after "Make these edits:". However, after editing sshd_config using VSCode (in a WSL-2 window, which I figured might matter), I'm unable to save it and continue with the instructions.
VSCode first gives me this error popup when I try to save:
Failed to save 'sshd_config': Insufficient permissions. Select 'Retry as Admin' to retry as administrator.
And when I select "Retry as Admin", it gives another:
Failed to save 'sshd_config': Command failed: "C:\Users\smith\AppData\Local\Programs\Microsoft VS Code\bin\code.cmd" --file-write "c:\Users\smith\AppData\Roaming\Code\code-elevated-BmAuYzjZ" "\\wsl.localhost\Ubuntu\etc\ssh\sshd_config" Error using --file-write: EPERM: operation not permitted, open '\\wsl.localhost\Ubuntu\etc\ssh\sshd_config'
What do I need to do to be able to use VSCode to make the edits to this file? I don't want to be locked into only being able to use Nano for this or any project, so I'd be very thankful for some guidance.
UPDATE: I think I've made a little headway! I tried following this similar tutorial, but on this step, trying to add this file, I get an error. I think I'm lacking some kind of permission to change WSL files in Explorer at all.
I'll try to figure out how to do this before going further, and I'll report back if I'm successful.

#1558 - Column count of mysql.proc is wrong. Expected 21, found 20. Please use mysql_upgrade to fix this error

I got this message when I try to run query on XAMPP in macOS
#1558 - Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 100108, now running 100421. Please use mysql_upgrade to fix this error
I tried to write
'mysql_upgrade -u root -p'
on my terminal but I got this message
zsh: command not found: mysql_upgrade
I also ran into same issue and after cracking my head for the past 10hrs, I finally realise how to perform the upgrade. U
go to your Mac terminal and paste the following code:
Applications/XAMPP/xamppfiles/bin/mysql_upgrade -u root -p
Supply your root password and see it work like magic.
Contrary to what many people posted online by using /opt/lampp/bin
It always gives a zsh not found error.
I hope this helps you and in the future for others who might need it.
You could try switching to a different shell, say bash by typing bash in your terminal.
Then proceed to run mysql_upgrade normally in the appropriate directory
I also could not run the code from the Terminal. I was, however, able to go to the folder itself and "run" the mysql_upgrade application. If you are using XAMPP and the Application Manager, there's a button to Open Application Folder. If you click that, finder will open where XAMPP lives. Open the bin folder. Then scroll until you find mysql_upgrade. Double click it. It will run in a Terminal session and complete the upgrade. Hope this helps someone else as I spent waaayyyy too much time trying to get this to work.

How do I resolve question marks on my login screen?

When I restart or shut down and start my computer, I have the following. After sleep mode it doesn't show the question marks when signing into my account. Tried the advice below but it doesn't work:
Fix Font Corruption
Open Terminal in your Utilities' folder and paste the following after the prompt:
fontrestore default
Press RETURN.
If this doesn’t fix the problem then paste the following after the prompt:
sudo atsutil databases -remove
Press RETURN.
You may need to restart the computer for anything to take effect.
Using Macbook Air with Mojave.

Creating network files in SUMO using NETCONVERT

Problem when calling netconvert in sumo:
I am trying to create my own scenario for simulation purposes.
I am using OpenStreetMaps for this.
python osmWebWizard.py
opens the browser and I select the area which I download.
netconvert --osm-files osm_bbox.osm.xml -o osm.net.xml
The error message I get is
Error: Cannot import network data without PROJ-Library. Please install packages proj before building sumo
Warning: Environment variable SUMO_HOME is not set, using built in type maps.
Quitting (on error).
My attempt to fix the problem is:
sudo apt-get install libproj*
But it seems like a dead end there and I am out of options.
Thank you.
EDIT
I have a gut feeling it has to do with libproj0 not being available anymore.

Raspberry Pi - Audio Fails After Adding RTC

I have a Raspberry Pi that I'm trying to hook-up to walkie-talkies to announce the current time every half hour plus different status updates automatically.
I had a CRON job running mpg123 that was announcing the time over the walkies perfectly, but then when I installed the drivers for this RasClock module as specified here (https://www.modmypi.com/blog/installing-the-rasclock-raspberry-pi-real-time-clock), all audio stopped working.
speaker-test says:
speaker-test 1.0.25
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Playback open error: -1,Operation not permitted
and mpg123 says:
[module.c:142] error: Failed to open module jack: file not found
[module.c:142] error: Failed to open module portaudio: file not found
[pulse.c:84] error: Failed to open pulse audio output: Connection refused
[nas.c:220] error: could not open default NAS server
[module.c:142] error: Failed to open module openal: file not found
[audio.c:180] error: Unable to find a working output module in this list: alsa,oss,jack,portaudio,pulse,nas,openal
[audio.c:532] error: Failed to open audio output module
[mpg123.c:897] error: Failed to initialize output, goodbye.
Now, the machine tends to freeze up a lot, too. When I tried suggestions I found online, such as adding "LD_LIBRARY_PATH=/usr/lib/mpg123" or "export LD_LIBRARY_PATH=/usr/lib:/usr/lib/mpg123" before the command, it made no difference.
What little hair I have left thanks you in advance for helping me through this.
I had the same error message with mpg123.
Before this message, I installed all these packages: mysql-server, build-essential, libmysqlclient-dev, libapache2-mod-wsgi.
I also changed group:
# usermod -G anothergroup pi
One of these two manipulations have caused my problem.
The solution in my case ?
Go in the /etc/group file and modify the line beginning with "audio" from this...
audio:x:NN:
to that...
audio:x:NN:pi
N.B.: NN is the GID. pi is the Raspberry Pi's default username.
To achieve the same result, there is also this command :
# usermod -a -G audio pi
Log out from your session and log in again.
P.S.: Could somebody add the mpg123 tag because I spent a lot of time without finding this topic, as I have exactly the same problem with mpg123 ?
I had the same issue run this command should fix it modprobe snd_bcm2835