Skip to content

Camera Stream error #255

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

Open
sowmyasammy-developer opened this issue Apr 11, 2025 · 3 comments
Open

Camera Stream error #255

sowmyasammy-developer opened this issue Apr 11, 2025 · 3 comments

Comments

@sowmyasammy-developer
Copy link

I am trying to capture image and streaming using mira220 sensor. i connected my camera to raspberrypi 4 and powered it by connecting to my laptop. After adding required configuration files and drivers camera is getting detected. But when i try to capture an image i am getting an error.
I am a beginner just started working with camera modules. I am attaching the error logs. Can someone help me what could be the issue.

LOGS

/libcamera-apps/build $ /usr/local/bin/libcamera-hello --list-cameras
Available cameras

0 : mira220 [1600x1400 12-bit GRBG] (/base/soc/i2c0mux/i2c@1/mira220@54)
Modes: 'SGRBG10_CSI2P' : 640x480 [172.06 fps - (480, 460)/640x480 crop]
1600x1400 [60.27 fps - (0, 0)/1600x1400 crop]
'SGRBG12_CSI2P' : 640x480 [172.06 fps - (480, 460)/640x480 crop]
1600x1400 [60.27 fps - (0, 0)/1600x1400 crop]
'SGRBG8' : 640x480 [172.06 fps - (480, 460)/640x480 crop]
1600x1400 [60.27 fps - (0, 0)/1600x1400 crop]


/usr/local/bin/libcamera-jpeg -o test.jpg
[0:22:48.849839377] [5150] INFO Camera camera_manager.cpp:327 libcamera v0.4.0+56-b7af1b4e
[0:22:48.863711479] [5151] WARN RPiSdn sdn.cpp:40 Using legacy SDN tuning - please consider moving SDN inside rpi.denoise
[0:22:48.865463230] [5151] WARN RPI vc4.cpp:393 Mismatch between Unicam and CamHelper for embedded data usage!
[0:22:48.866313764] [5151] INFO RPI vc4.cpp:447 Registered camera /base/soc/i2c0mux/i2c@1/mira220@54 to Unicam device /dev/media1 and ISP device /dev/media4
[0:22:48.866373504] [5151] INFO RPI pipeline_base.cpp:1121 Using configuration file '/usr/local/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
Preview window unavailable
Mode selection for 800:700:12:P
SGRBG10_CSI2P,640x480/0 - Score: 1831.43
SGRBG10_CSI2P,1600x1400/0 - Score: 1375
SGRBG12_CSI2P,640x480/0 - Score: 831.429
SGRBG12_CSI2P,1600x1400/0 - Score: 375
SGRBG8,640x480/0 - Score: 2831.43
SGRBG8,1600x1400/0 - Score: 2375
Stream configuration adjusted
[0:22:48.868325013] [5150] INFO Camera camera.cpp:1202 configuring streams: (0) 800x700-YUV420 (1) 1600x1400-SGRBG12_CSI2P
[0:22:48.868816678] [5151] INFO RPI vc4.cpp:622 Sensor: /base/soc/i2c0mux/i2c@1/mira220@54 - Selected sensor format: 1600x1400-SGRBG12_1X12 - Selected unicam format: 1600x1400-pgCC
[0:22:49.107859771] [5151] ERROR V4L2 v4l2_videodevice.cpp:2049 /dev/video0[12:cap]: Failed to start streaming: Remote I/O error
ERROR: *** failed to start camera ***


Image
Image

@6by9
Copy link
Collaborator

6by9 commented Apr 11, 2025

Remote I/O error aka EREMOTEIO is generally the result of an I2C transfer failure. Check your driver and the kernel logs.

@sowmyasammy-developer
Copy link
Author

sowmyasammy-developer commented Apr 14, 2025

[  697.386716] mira220 10-0054: Could not write stream-on sequence
[  697.386733] unicam fe801000.csi: stream on failed in subdev
[  697.386754] [MIRA220]: Entering power off function.
[  697.386759] [MIRA220]: Skip disabling regulator and clk due to mira220->force_power_off=0.
[ 1102.592813] [MIRA220]: mira220_update_image_pad_format() width 640, height 480.
[ 1102.600245] [MIRA220]: mira220_update_image_pad_format() width 640, height 480.
[ 1102.600265] [MIRA220]: mira220_set_pad_format() to unlock and return.
[ 1102.601441] [MIRA220]: mira220_update_image_pad_format() width 640, height 480.
[ 1102.601816] mira220 10-0054: device in use, ctrl(id:0x980911,val:0x6aa) is not handled
[ 1102.608165] mira220 10-0054: device in use, ctrl(id:0x980911,val:0x55) is not handled
[ 1102.614643] [MIRA220]: mira220_update_image_pad_format() width 640, height 480.
[ 1102.618142] [MIRA220]: Entering mira220_set_stream enable: 1.
[ 1102.618152] [MIRA220]: Entering start streaming function.
[ 1102.618159] [MIRA220]: Entering power on function.
[ 1102.819018] [MIRA220]: Writing stop streaming regs.
[ 1102.819184] mira220 10-0054: Error setting stop-at-row imager state at try 0
[ 1102.820453] mira220 10-0054: Error setting stop-at-row imager state at try 1
[ 1102.821725] mira220 10-0054: Error setting stop-at-row imager state at try 2
[ 1102.822981] mira220 10-0054: Error setting stop-at-row imager state at try 3
[ 1102.824206] mira220 10-0054: Error setting stop-at-row imager state at try 4
[ 1102.825343] mira220 10-0054: Error setting stop-at-row imager state after multiple attempts. Exiting.
[ 1102.825352] mira220 10-0054: Could not write stream-on sequence
[ 1102.825368] unicam fe801000.csi: stream on failed in subdev
[ 1102.825390] [MIRA220]: Entering power off function.
[ 1102.825394] [MIRA220]: Skip disabling regulator and clk due to mira220->force_power_off=0.

this is the kernel log i am getting when i use this command /usr/local/bin/libcamera-jpeg -o test.jpg.
Any idea on what could be the issue

@6by9
Copy link
Collaborator

6by9 commented Apr 15, 2025

Your driver has told you the bit that failed

[  697.386716] mira220 10-0054: Could not write stream-on sequence

The mira220 driver is not in our kernel, therefore not our responsibility. Please ask those who have supplied the driver to you.

There is a draft PR at raspberrypi/linux#6717. Whilst it does have a mira220_identify_module function, it never checks for errors, so will allow the sensor to probe fully even if not correctly configured or connected.

With those complete logs, I'd say that the sensor just isn't connected correctly, so all I2C comms are failing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants