DougVonMoser
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
-
Has anyone gotten v1 Pi cameras working on RPi3A+ with Nerves recently?
-
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!
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex










Showing Posts 1 to 9- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
fhunleth
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.
fhunleth
I took a look, but will need to look more next week. Linux detects and loads the kernel modules for me, but “libcamera-hello –list-cameras” still returns no cameras after a timeout. The timeout seems promising since when I first started, detection failed immediately. At least now, I get a nice message in the
dmesgwhen the camera sensor loads.I’ve started sending PRs to the nerves_system_rpi3a and nerves_system_rpi0_2 systems. If I follow your post right, then I bet that you only need to add
CONFIG_I2C_MUX_PINCTRL=mto your kernel config to get to where I’m at right now. However, it still won’t work. When I get time again, my next steps will be to see if enabling libcamera debug prints or running strace will give a clue.DougVonMoser
Thanks super much for taking a look @fhunleth!
I’ll get caught up with those PRs, try this latest config, and continue tinkering. Thanks again!
fhunleth
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:
dtc -O dts fdt > rpi3.dtscompatiblestring and then recursively grep through the Linux kernel source code to find the.cfile with that string. If there’s not a.ofile, then it wasn’t built and a Linux kernel config option needs to be turned on.status = “disabled”entries. These tend to exist when the RPi bootloader can’t find the overlay file for that piece of hardware. Edit thefwup.confto add those device tree overlay files.At the beginning I did a quick check of
dmesgand Istrace’dlibcamera-vidsince 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.DougVonMoser
Hi again Frank, really appreciate your time and attention here. I’ve applied your latest changes on main of nerves_system_rpi3a (ebf63d0) but still no cameras are detected for me.
Troubleshooting alongside an llm agent, here’s where I’m at. (I confess I’m coming from the web and I’m hanging on by a thread for these lower level concepts.)
Here are the specific commands I ran on the device and their results:
When I run libcamera-hello --list-cameras, it reports no cameras, as expected.
The kernel does seem to detect the camera sensor on the I2C bus. Grepping dmesg for ov5647 shows the device is recognized.
The specific log lines are:
This seems to be the core of the problem: the ov5647 kernel module is not being loaded. Grepping the output of lsmod for ov5647 returns nothing.
I’ve double-checked that this exact camera and Pi work correctly with the standard Raspberry Pi OS.
I’ll continue down the road of debugging and see what I can come up with. Thanks again.
fhunleth
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
sftpover to your device andget /sys/firmware/fdt? And then either post it or rundtc -O dts fdt > rpi3.dtsand postrpi3.dts. I don’t have that camera handy. I have to believe that we’re really close.Frank
DougVonMoser
libcamera-hello is finding a camera! super exciting thanks for getting to the bottom of this.
The libcamera-jpeg command seems to have trouble at the end with trying to open the file
. I can try to chip away at this in a few hours and try other commands.
This is great progress! Thanks so much!
DougVonMoser
Ah that seems to be a write permission to the filesystem. writing a jpeg to /tmp has it working!
I plan to test things a bit more soon. I’ll let you know if anything pops up.
Thanks for the fix!!
fhunleth
Great! Try writing to
/dataor/root.I’ll aim to get releases out this week so this will all work better out-of-the-box.