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
-
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!
Marked As Solved
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 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
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:
- sftp into the nerves device
- Get /sys/firmware/fdt
- Run
dtc -O dts fdt > rpi3.dts - Look through the dts for camera-related entries. For each one, look at the
compatiblestring 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. - 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 thefwup.confto 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
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
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.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









