DougVonMoser

DougVonMoser

Trying to get Pi V1 Camera working on rpi3a+

Hello!

I’m trying to get a Raspberry Pi Camera Module v1 (OV5647 sensor) working on a Raspberry Pi 3A+ using Elixir Nerves with libcamera.

Current Issue

  • libcamera-hello --list-cameras returns “No cameras available!”

  • Same hardware works perfectly on Raspberry Pi OS

  • Tried custom systems with various config changes of nerves_system_rpi3a and nerves_system_rpi0_2

What I’ve Tried

  • Added camera modules to /etc/modules

  • Tried both camera_auto_detect=1 and dtoverlay=ov5647 in config.txt

  • Added CONFIG_USER_NS=y to kernel config

  • Modules load but no /dev/video* devices created

Questions

  1. Has anyone gotten v1 Pi cameras working on RPi3A+ with Nerves recently?

  2. Are there any working examples or configs I should be looking at?

I’m way out of my element with embedded systems and have been spinning my llm token wheels trying to get this working. The hardware definitely works out of the box on Raspberry OS.

If anyone can point me in a direction that would be awesome. I know there was a similar thread here that might have gotten things working for the rpi5. That’s where most of my cargo culting inspirations have come from.

Thanks for any help!

Marked As Solved

fhunleth

fhunleth

Co-author of Nerves

Thanks for hanging in there to debug this.

I’m double checking all of the Nerves systems now. Synchronize camera config with Raspberry Pi 3 by fhunleth · Pull Request #262 · nerves-project/nerves_system_rpi3a · GitHub might help.

If it doesn’t, could you sftp over to your device and get /sys/firmware/fdt? And then either post it or run dtc -O dts fdt > rpi3.dts and post rpi3.dts. I don’t have that camera handy. I have to believe that we’re really close.

Frank

Also Liked

fhunleth

fhunleth

Co-author of Nerves

One more fix for you at Include vc4 overlays to enable the vc4 for cameras and display · nerves-project/nerves_system_rpi3a@ebf63d0 · GitHub .

I would like to do a little more before making a release, but I’m able to capture video now with libcamera-vid. I think that you should be able to with that fix.

For anyone stumbling on this thread, here’s how I debugged this issue:

  1. sftp into the nerves device
  2. Get /sys/firmware/fdt
  3. Run dtc -O dts fdt > rpi3.dts
  4. Look through the dts for camera-related entries. For each one, look at the compatible string and then recursively grep through the Linux kernel source code to find the .c file with that string. If there’s not a .o file, then it wasn’t built and a Linux kernel config option needs to be turned on.
  5. Look through the dts file for status = “disabled” entries. These tend to exist when the RPi bootloader can’t find the overlay file for that piece of hardware. Edit the fwup.conf to add those device tree overlay files.

At the beginning I did a quick check of dmesg and I strace’d libcamera-vid since I’m not that familiar with the camera and was hoping for an obvious error message. I didn’t get any. I know that there’s some way of turning on more debug messages too. Nothing stood out and then I saw that the kernel wasn’t loading modules, checked the device tree, and got lucky with greping compatible strings.

fhunleth

fhunleth

Co-author of Nerves

Great! Try writing to /data or /root.

I’ll aim to get releases out this week so this will all work better out-of-the-box.

fhunleth

fhunleth

Co-author of Nerves

Ugh. Yes,the Raspberry Pi 5 required quite a few updates to get working with Nerves and the error you’re getting looks very similar. I know that it can’t be the same issue, but there’s not really much to go on and it used to work.

Let me reach out to the Pi camera users I know to see if they have any wisdom to share.

Thanks for posting about this. There’s an issue with the Pi 5 that I’m hearing about that may require me to investigate and if I do, it will be really convenient for me to try a RPi Zero 2 at the same time.

Where Next?

Popular in Questions Top

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> somethi...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: The documentation above suggests that while ...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New

Other popular topics Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29603 241
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36352 110
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 48342 226
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement