Pi 相机:mmal:未从传感器接收到数据

问题描述 投票:0回答:2

这个问题之前已经被问过,但解决方案并没有解决我的问题。

当我将 Pi 相机连接到 Raspberry Pi 并使用命令时:

raspistill -o image.jpg

这会产生错误:

mmal:没有从传感器接收到数据。检查所有连接,包括相机板上的 Sunny 连接。

所有连接均正常。我尝试在两个不同的 Raspberry Pi 上使用两个 Pi 相机,但仍然出现相同的错误。当我使用

raspistill
命令时,相机的红灯会亮起,并且我还通过
sudo raspi-config
启用了 Pi 上的相机。

请帮忙。

raspberry-pi
2个回答
2
投票

我也遇到过这个问题。我不知道静电是否会损坏设备,或者是否发生在运输过程中。我已经看到了我购买的 5MP 版本的一些行为。 首先是将其放入错误的端口。根据您的型号,您可能只是将其插入了错误的端口。有些人声称放入另一个端口可能会烧坏相机。我无法证实或否认这种情况的发生。

我同样会运行此命令并收到如下消息:


mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates
或者您收到的消息。

我尝试跑步:

  1. apt-get update && sudo apt-get dost-upgrade
  2. sudo rpi-更新

我什至调整了模块和黑名单以查看发生了什么。

pi@raspberrypi:~ $ raspistill -v -o image.jpg
raspistill Camera App v1.3.8

Width 2592, Height 1944, quality 85, filename image.jpg
Time delay 5000, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Link to latest frame enabled  no
Full resolution preview No
Capture method : Single capture

Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
Camera component done
Encoder component done
Starting component connection stage
Connecting camera preview port to video render.
Connecting camera stills port to encoder input port
Opening output file image.jpg
Enabling encoder output port
Starting capture 0
mmal: No data received from sensor. Check all connections, including the Sunny one on the camera board

sudo raspi-config
将让您确保启用了相机,或使用菜单、首选项来查看其是否已启用。除此之外,红灯似乎没有任何意义,可能需要更换。 我刚刚订购了一个 8MP,看看它是否有效。

我还检查了这个命令:

pi@raspberrypi:~ $ vcgencmd get_camera
supported=1 detected=1

更新

我安装了 8MP 相机,它工作了。我开始认为我的 5MP 相机出了问题。 关于我自己的行为的一些注释。 - 如果您执行

sudo mod probe bcm2835-v412
,它似乎会将相机安装到 /dev/video0。此时,您将无法再使用 raspistill/vid,而不会出现我遇到的 ENOSPC 错误。 我添加了它来处理运动,这样我就可以从网络上进行流式传输。

我现在已经在几个项目上跳来跳去,并没有在实现中找到太多乐趣,但至少 raspistill 命令有效,并且我确实得到了运动工作,但是我不想要 mjpeg,并且仍然需要弄清楚是否h264 是一个选项。


0
投票

明显的声明:对于相机

supported=1
detected=1
错误,我在使用更好的电源(5V 2.1A)后找到了解决方案。令人惊讶的是,因为原始电源对于其他 pi/相机组合来说工作得很好。

© www.soinside.com 2019 - 2024. All rights reserved.