-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V4L2: Couldn't map video buffer: Code=22 #43
Comments
I think the error code 22 is came from Linux native error code. Link Maybe I/O argument for /dev/video has been changed since Raspbian 11...? |
I can't look it up on RPi right now, but what about sappho's point that /dev/video may not exist? |
I've searched some [similar] [issues], maybe V4L2 related code needs to be updated.
I suggest getting a stack trace (toward Linux system calls) with this code may help discover the problem. |
Device exits and I can open it with a native linux program (guvcview).
I'm not sure how to do this. |
Following up on this, just in case others experience the same issue. The problem is that the kernel on Raspberry Pi4 may be 64 bit, even if user space is 32 bit (see raspberrypi/firmware#1795). Because of this uname will return aarch64 and the 64 bit Interop is used. This makes the mmap call fail. To get it running on my system, I changed the code in NativeMethods_V4L2.cs to use armv7l Interop for the aarch64 case. This of course not a general solution, but I have no idea of how to create a better architecture selection. |
Oh, understood... This difference could also be in Win32 WoW. (Fortunately in Win32 we didn't have to interact directly with the native interface, so the problem didn't occur.) It might be a good idea to additionally check IntPtr.Size to choose between using aarch64 or armv7l (maybe we should do the same for x86_64). |
Fixed and will release on next version. |
I have been using FlashCap 1.5.0 on a Raspberry Pi 4 without any issues.
Now I upgraded the OS from Raspbian 10 (buster) to Raspbian 11 (bullseye) aka. the newest Raspberry Pi OS.
Unfortunately I'm now unable to connect to my camera.
I have looked at the source of FlashCap, but that doesn't bring me closer to understand what the error code 22 is about.
Source of simple problem that throws the above exception:
I tried with different cameras, but that doesn't help. The cameras are working fine in other program on the Pi with the new OS.
Any suggestions?
The text was updated successfully, but these errors were encountered: