RDK X5连接132GS MIPI双目相机(GS130W)报错

连接GS130W之后按照https://developer.d-robotics.cc/rdk_doc/Robot_development/boxs/spatial/hobot_stereonet里的教程跑通了两次,但是今天再使用就连接不上了,求大佬指点。

这是我的操作过程和log:

root@ubuntu:/home/sunrise/ros2_ws/cam_test# i2cdetect -r -y 4
i2cdetect -r -y 6
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – 33 – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: 50 – – – – – – – – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – – –
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – 32 – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – – –
root@ubuntu:/home/sunrise/ros2_ws/cam_test# cp -rv /opt/tros/humble/share/hobot_stereonet/script/run_cam.sh ./
‘/opt/tros/humble/share/hobot_stereonet/script/run_cam.sh’ → ‘./run_cam.sh’
root@ubuntu:/home/sunrise/ros2_ws/cam_test# bash run_cam.sh --rotation 90.0 --log_level INFO
[WARN] [1778834059.724880202] [mipi_node]:
node params:
config_path: /opt/tros/humble/lib/mipi_cam/config/
video_device_name:
channel: 2
channel2: 0
camera_info_url:
camera_calibration_file_path:
out_format_name: nv12
gdc_bin_file:
image_width: 1280
image_height: 1088
sub_image_width: 960
sub_image_height: 540
framerate: 30
rotation: 90.000000
device_mode: dual
dual_combine: 1
lpwm_enable: true
gdc_enable: false
frame_ts_type: realtime
frame_id: default_cam
link_type: 0
link_port: 0
io_method_name: ros
cal_alpha: 0.000
[INFO] [1778834059.731909943] [mipi_cap]: this board support mipi:
[INFO] [1778834059.731979727] [mipi_cap]: host 0
[INFO] [1778834059.732014431] [mipi_cap]: host 2
[ERROR] [1778834059.732127960] [mipi_cam]: There are no available host.

[ERROR] [1778834059.732437341] [mipi_cam]: [init]->init X5_RDK’s mipi host and gpio failure: (����

[ERROR] [1778834059.732524915] [mipi_node]: [init]->mipinode init failure.

[INFO] [1778834059.733796811] [mipi_node]: [MipiCamNode::init]->Initing ‘/opt/tros/humble/lib/mipi_cam/config/’ at 1280x1088 via ros at 30 FPS
[INFO] [1778834059.733856555] [mipi_cam]: cal_file:
[WARN] [1778834059.733883343] [mipi_node]: get camera calibration parameters failed
[INFO] [1778834059.733917256] [mipi_cam]: cal_file:
[WARN] [1778834059.733941503] [mipi_node]: get camera calibration parameters failed
terminate called after throwing an instance of ‘rclcpp::exceptions::RCLError’
what(): could not create publisher: rcl node’s context is invalid, at ./src/rcl/node.c:428
[ros2run]: Aborted

问题分析

根据你的日志,核心错误是:

[ERROR] [mipi_cam]: There are no available host.
[ERROR] [mipi_cam]: [init]->init X5_RDK's mipi host and gpio failure

结论:MIPI Host 初始化失败,相机硬件未被正确识别。

从你的 i2cdetect 输出看:

  • I2C bus 4 检测到设备地址 0x330x50
  • I2C bus 6 检测到设备地址 0x32

这说明相机 I2C 通信正常,但 MIPI 数据链路或 GPIO 配置有问题。


排查步骤

1. 检查 MIPI 硬件连接

这是最常见的原因。之前能跑通两次,今天不行了,很可能是:

  • 排线松动:重新插拔 MIPI 排线,确保完全插入
  • 排线损坏:检查排线是否有折痕或损坏
  • 接口氧化:用无水酒精清洁金手指

2. 重启板卡

MIPI Host 状态可能残留,需要完全重启:

sudo reboot

重启后不要运行任何其他相机程序,直接测试。

3. 检查 MIPI Host 状态

重启后,运行以下命令查看 MIPI 主机状态:

# 查看 MIPI 相关设备节点
ls -l /dev/video*

# 查看 dmesg 中 MIPI 相关日志
dmesg | grep -i mipi

# 查看传感器检测
dmesg | grep -i sensor

4. 确认相机配置文件

检查配置文件是否存在且正确:

ls -la /opt/tros/humble/lib/mipi_cam/config/
cat /opt/tros/humble/lib/mipi_cam/config/calib_params.yaml

如果 calib_params.yaml 为空或不存在,需要重新标定或从备份恢复。

5. 尝试单目模式测试

先排除双目配置问题,尝试单目启动:

source /opt/tros/humble/setup.bash
ros2 launch mipi_cam mipi_cam.launch.py channel:=2

6. 检查系统版本和驱动

确认系统镜像版本:

cat /etc/version

如果最近升级过系统,可能存在驱动不兼容问题。


参考案例

社区有类似案例:


建议操作顺序

  1. 断电重启(完全断电,不是软重启)
  2. 重新插拔 MIPI 排线
  3. 运行 dmesg | grep -i mipi 查看硬件识别情况
  4. 如果还是不行,尝试单目模式测试
  5. dmesg 完整输出贴到社区,方便进一步分析

如果以上步骤都无效,可能是:

  • 相机模组硬件故障
  • RDK X5 的 MIPI 接口硬件问题

建议联系技术支持或更换相机测试。

这是重启并插拔排线后的操作root@ubuntu:/home/sunrise/ros2_ws/cam_test# dmesg | grep -i mipi
root@ubuntu:/home/sunrise/ros2_ws/cam_test# source /opt/tros/humble/setup.bash
ros2 launch mipi_cam mipi_cam.launch.py channel:=2
[INFO] [launch]: All log files can be found below /root/.ros/log/2026-05-15-17-13-55-972386-ubuntu-4099
[INFO] [launch]: Default logging verbosity is set to INFO
config_file_path is /opt/tros/humble/lib/mipi_cam/config/
Hobot shm pkg enables zero-copy with fastrtps profiles file: /opt/tros/humble/lib/hobot_shm/config/shm_fastdds.xml
Hobot shm pkg sets RMW_FASTRTPS_USE_QOS_FROM_XML: 1
env of RMW_FASTRTPS_USE_QOS_FROM_XML is 1 , ignore env setting
[INFO] [mipi_cam-1]: process started with pid [4108]
[mipi_cam-1] [WARN] [1778836437.274008950] [mipi_node]:
[mipi_cam-1] node params:
[mipi_cam-1] config_path: /opt/tros/humble/lib/mipi_cam/config/
[mipi_cam-1] video_device_name: default
[mipi_cam-1] channel: 0
[mipi_cam-1] channel2: 2
[mipi_cam-1] camera_info_url:
[mipi_cam-1] camera_calibration_file_path: default
[mipi_cam-1] out_format_name: nv12
[mipi_cam-1] gdc_bin_file: default
[mipi_cam-1] image_width: 960
[mipi_cam-1] image_height: 544
[mipi_cam-1] sub_image_width: 960
[mipi_cam-1] sub_image_height: 540
[mipi_cam-1] framerate: 30
[mipi_cam-1] rotation: 0.000000
[mipi_cam-1] device_mode: single
[mipi_cam-1] dual_combine: 0
[mipi_cam-1] lpwm_enable: false
[mipi_cam-1] gdc_enable: true
[mipi_cam-1] frame_ts_type: sensor
[mipi_cam-1] frame_id: default_cam
[mipi_cam-1] link_type: 0
[mipi_cam-1] link_port: 0
[mipi_cam-1] io_method_name: shared_mem
[mipi_cam-1] cal_alpha: 0.000
[mipi_cam-1] [ERROR] [1778836437.281098130] [mipi_cam]: There are no available host.
[mipi_cam-1]
[mipi_cam-1] [ERROR] [1778836437.281478751] [mipi_cam]: [init]->init X5_RDK’s mipi host and gpio failure: (\ufffd\u032f\ufffd\ufffd
[mipi_cam-1]
[mipi_cam-1] [ERROR] [1778836437.281601625] [mipi_node]: [init]->mipinode init failure.
[mipi_cam-1]
[mipi_cam-1] [WARN] [1778836437.282940153] [mipi_cam]: Enabling zero-copy
[mipi_cam-1] [WARN] [1778836437.283101277] [mipi_node]: get camera calibration parameters failed
[mipi_cam-1] terminate called after throwing an instance of ‘rclcpp::exceptions::RCLError’
[mipi_cam-1] what(): could not create publisher: rcl node’s context is invalid, at ./src/rcl/node.c:428
[ERROR] [mipi_cam-1]: process has died [pid 4108, exit code -6, cmd ‘/opt/tros/humble/lib/mipi_cam/mipi_cam --ros-args --log-level warn --ros-args --params-file /tmp/launch_params_nxdwdwmp --params-file /tmp/launch_params_r3fkby1p --params-file /tmp/launch_params_l3jhix_v --params-file /tmp/launch_params_3aquph4r --params-file /tmp/launch_params_09ms6om4 --params-file /tmp/launch_params_t13b5w_o --params-file /tmp/launch_params_84n2dwc1 --params-file /tmp/launch_params_cskoe3pn --params-file /tmp/launch_params_0_j28je1 --params-file /tmp/launch_params_a_qm9ctp --params-file /tmp/launch_params_opwb2yoz --params-file /tmp/launch_params_x1bd3nee --params-file /tmp/launch_params_dkf007bh --params-file /tmp/launch_params_me3wxtrg --params-file /tmp/launch_params_mry9kpas --params-file /tmp/launch_params_mspbffg_ --params-file /tmp/launch_params_ote4bnrw’].
root@ubuntu:/home/sunrise/ros2_ws/cam_test# ls -la /opt/tros/humble/lib/mipi_cam/config/
cat /opt/tros/humble/lib/mipi_cam/config/calib_params.yaml
\u603b\u8ba1 36
drwxr-xr-x 2 root root 4096 4\u6708 9 11:51 .
drwxr-xr-x 3 root root 4096 4\u6708 9 11:51 ..
-rw-r–r-- 1 root root 662 3\u6708 11 16:15 F37_calibration.yaml
-rw-r–r-- 1 root root 656 3\u6708 11 16:15 GC4663_calibration.yaml
-rw-r–r-- 1 root root 809 3\u6708 11 16:15 sc132gs_calibration_90.yaml
-rw-r–r-- 1 root root 626 3\u6708 11 16:15 sc132gs_calibration.yaml
-rw-r–r-- 1 root root 1339 3\u6708 11 16:15 SC132gs_dual_calibration.yaml
-rw-r–r-- 1 root root 1326 3\u6708 11 16:15 SC230ai_dual_calibration.yaml
-rw-r–r-- 1 root root 964 3\u6708 11 16:15 senyun_dual_calibration.yaml
cat: /opt/tros/humble/lib/mipi_cam/config/calib_params.yaml: \u6ca1\u6709\u90a3\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55
root@ubuntu:/home/sunrise/ros2_ws/cam_test# cat /etc/version
3.5.0

关键发现

dmesg | grep -i mipi 没有任何输出 —— 这是核心问题!

说明系统内核完全没有检测到 MIPI 相机硬件,这不是软件配置问题,是硬件链路问题。


深入排查

1. 先确认 I2C 设备是否还在

之前能看到 0x32/0x33/0x50,现在再检查:

i2cdetect -r -y 4
i2cdetect -r -y 6

如果现在什么都检测不到 → 排线完全没接触好,或相机供电问题

如果还能看到地址 → I2C 通信正常,但 MIPI 数据链路断了


2. 查看完整 dmesg 硬件日志

dmesg | tail -100

重点找:

  • sensor 相关字样
  • camera 相关字样
  • errorfail 相关字样

把完整输出贴出来,能看到硬件初始化失败的具体原因。


3. 检查 MIPI 排线方向(GS130W 关键!)

GS130W 是双目相机,排线有方向要求

  • 排线金属面朝向:朝向板卡内侧(不是朝上)
  • 排线是否完全插入:需要听到"咔哒"声(如果有卡扣)
  • 排线锁扣是否压紧:MIPI 接口通常有黑色/白色锁扣,需要先翻开→插入→压下


4. 检查相机供电

GS130W 需要独立供电,检查:

# 查看 5V 电源是否正常
sudo voltmeter  # 如果有这个工具

# 或者查看电源管理芯片状态
dmesg | grep -i power

如果相机供电不足,I2C 能通但 MIPI 链路起不来。


5. 尝试加载相机驱动模块

# 查看已加载的内核模块
lsmod | grep -i cam

# 尝试重新加载(如果存在)
sudo modprobe -r hobot_mipi
sudo modprobe hobot_mipi

快速判断流程

┌─────────────────────────────────┐
│  i2cdetect 还能看到设备吗?      │
└───────────────┬─────────────────┘
                │
    ┌───────────┴───────────┐
    │                       │
   能                      不能
    │                       │
    ▼                       ▼
MIPI 链路问题           排线/供电问题
    │                       │
    │                   重新插拔排线
    │                   检查供电
    │                       │
    ▼                       ▼
查看 dmesg 完整日志      再测 i2cdetect
    │                       │
    ▼                       ▼
联系技术支持            能检测到→回到左边

建议下一步

  1. 再跑一次 i2cdetect,确认 I2C 设备是否还在
  2. 拍一张排线连接的照片(金属面朝向、锁扣状态)
  3. 贴出 dmesg | tail -100 完整输出

如果 I2C 设备消失了,基本确定是排线接触问题,需要:

  • 完全拔出排线
  • 用橡皮擦清洁金手指
  • 重新插入并确认锁扣压紧

如果 I2C 设备还在但 MIPI 就是不识别,可能是:

  • 相机模组 MIPI 发射端故障
  • RDK X5 MIPI 接收端故障
  • 需要联系技术支持更换硬件测试

root@ubuntu:/home/sunrise/ros2_ws/cam_test# i2cdetect -r -y 4
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – 33 – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: 50 – – – – – – – – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – – –
root@ubuntu:/home/sunrise/ros2_ws/cam_test# i2cdetect -r -y 6
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – 32 – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – – –
root@ubuntu:/home/sunrise/ros2_ws/cam_test# dmesg | tail -100
[ 12.046709] systemd-journald[274]: Failed to read journal file /var/log/journal/93376d30162346569ffd698a59b4b039/user-1000.journal for rotation, trying to move it out of the way: Text file busy
[ 12.153697] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 12.153718] Bluetooth: BNEP filters: protocol multicast
[ 12.153744] Bluetooth: BNEP socket layer initialized
[ 12.158009] Bluetooth: MGMT ver 1.22
[ 12.532022] asoc-duplex-host-card snd0: asoc_simple_probe end
[ 12.567836] start to add opp table.
[ 12.567855] finish to add opp table 4.
[ 12.567905] Galcore version 6.4.14.9.674707
[ 12.602192] nano2d 3c010000.gc820: Adding to iommu group 9
[ 12.602282] nano2d 3c010000.gc820: clk name: pclk, freq = 100000000.
[ 12.602299] nano2d 3c010000.gc820: clk name: aclk, freq = 750000000.
[ 12.602311] nano2d 3c010000.gc820: clk name: clk1x, freq = 750000000.
[ 12.602435] gpu_parse_dt: register base(3c010000), irq(77).
[ 12.602940] create /dev/nano2d device.
[ 12.603030] Insmod parameters:
[ 12.603034] device[0] core[0]
[ 12.603040] irq line:77
[ 12.603046] register base:0x3c010000
[ 12.603052] register size:0x10000

[ 12.603061] iommu enabled
[ 12.603064] contiguous base:0x0
[ 12.603068] contiguous size:0x0
[ 12.603071] command contiguous base:0x0
[ 12.603075] command contiguous size:0x0

[ 12.606085] [VPF mgr]:[L271]vpf_alloc_minor_number: minor[0] bit3 is used
[ 12.606302] [VPF mgr]:[L271]vpf_alloc_minor_number: minor[0] bit4 is used
[ 12.606415] [VPF mgr]:[L271]vpf_alloc_minor_number: minor[0] bit5 is used
[ 12.606525] [VPF mgr]:[L271]vpf_alloc_minor_number: minor[0] bit6 is used
[ 12.606612] [VPF mgr]:[L271]vpf_alloc_minor_number: minor[0] bit7 is used
[ 12.606698] nano2D: after probe, allocate_count = 28
[ 12.652080] vs-disp-sif 3e080000.vs-sif: Adding to iommu group 3
[ 12.653753] vs-dc 3e000000.dc8000Nano: Adding to iommu group 4
[ 12.658916] vs-bt1120 3e010000.bt1120: Adding to iommu group 5
[ 12.698742] vs-drm 3e000000.disp_apb:display-subsystem: bound 3e080000.vs-sif (ops sif_component_ops [vs_drm])
[ 12.698897] drivers/gpu/drm/verisilicon/dc/dc_proc/gc_proc.c: 593
[ 12.703657] drivers/gpu/drm/verisilicon/dc/dc_proc/gc_proc.c: 604
[ 12.703873] vs-drm 3e000000.disp_apb:display-subsystem: bound 3e000000.dc8000Nano (ops dc_component_ops [vs_drm])
[ 12.704011] vs-drm 3e000000.disp_apb:display-subsystem: bound 3e010000.bt1120 (ops bt1120_component_ops [vs_drm])
[ 12.704056] vs-drm 3e000000.disp_apb:display-subsystem: bound 3e000000.disp_apb:bt1120_bridge (ops bt1120_bridge_component_ops [vs_drm])
[ 12.704096] vs-drm 3e000000.disp_apb:display-subsystem: bound 3e000000.disp_apb:bt1120_bridge_wb (ops bt1120_bridge_component_ops [vs_drm])
[ 12.704201] vs-drm 3e000000.disp_apb:display-subsystem: bound 3e000000.disp_apb:dsi-encoder (ops encoder_component_ops [vs_drm])
[ 12.704284] vs-drm 3e000000.disp_apb:display-subsystem: bound 3e000000.disp_apb:hdmi-encoder (ops encoder_component_ops [vs_drm])
[ 12.705332] [drm] Initialized vs-drm 1.0.0 20191101 for 3e000000.disp_apb:display-subsystem on minor 0
[ 13.260643] hobot_gmac 35010000.horizon_tsn eth0: PHY [hobot-mac-mdio-35010000:00] driver [RTL8211F Gigabit Ethernet] (irq=POLL)
[ 13.279774] hobot_gmac 35010000.horizon_tsn eth0: mac_config_rx_queues_routing, not support packet mode :\x02
[ 13.279844] hobot_gmac 35010000.horizon_tsn eth0: configuring for phy/rgmii-id link mode
[ 13.436267] get_txpwr_max:txpwr_max:18
[ 13.451069] get_txpwr_max:txpwr_max:18
[ 13.484104] get_txpwr_max:txpwr_max:18
[ 13.484202] get_txpwr_max:txpwr_max:18
[ 13.484623] get_txpwr_max:txpwr_max:18
[ 13.484671] get_txpwr_max:txpwr_max:18
[ 13.487056] get_txpwr_max:txpwr_max:18
[ 13.648961] rwnx_virtual_interface_add: 10, p2p-dev-wlan0
[ 13.648984] rwnx_virtual_interface_add, ifname=p2p-dev-wlan0, wdev=0000000091bd19e5, vif_idx=1
[ 13.648992] p2p dev addr=b4 2f 3 31 99 cb
[ 13.649006] get_txpwr_max:txpwr_max:18
[ 13.649018] get_txpwr_max:txpwr_max:18
[ 13.659597] get_txpwr_max:txpwr_max:18
[ 13.660052] get_txpwr_max:txpwr_max:18
[ 13.660110] get_txpwr_max:txpwr_max:18
[ 13.660199] get_txpwr_max:txpwr_max:18
[ 13.661377] get_txpwr_max:txpwr_max:18
[ 13.661946] get_txpwr_max:txpwr_max:18
[ 13.662007] P2P interface started
[ 15.307974] rwnx_send_sm_connect_req drv_vif_index:0 connect to Xx_Kafka_5G(11) channel:5200 auth_type:0
[ 15.568542] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 15.569778] get_txpwr_max:txpwr_max:18
[ 16.149655] dw-apb-uart 32120000.serial: forbid DMA for kernel console
[ 17.717162] es8326 7-0018: Clock coefficients do not match
[ 18.059261] es8326 7-0018: Clock coefficients do not match
[ 18.079413] es8326 7-0018: Clock coefficients do not match
[ 18.408364] es8326 7-0018: Clock coefficients do not match
[ 18.435891] es8326 7-0018: Clock coefficients do not match
[ 18.991434] Bluetooth: RFCOMM TTY layer initialized
[ 18.991465] Bluetooth: RFCOMM socket layer initialized
[ 18.991485] Bluetooth: RFCOMM ver 1.11
[ 20.064114] using random self ethernet address
[ 20.064131] using random host ethernet address
[ 20.092144] Mass Storage Function, version: 2009/09/11
[ 20.092167] LUN: removable file: (no medium)
[ 20.107409] using random self ethernet address
[ 20.107425] using random host ethernet address
[ 20.221947] usb0: HOST MAC fe:36:ec:2e:2b:a7
[ 20.221969] usb0: MAC 5e:55:12:34:35:2a
[ 20.235302] usb1: HOST MAC e6:6a:62:43:70:8e
[ 20.235319] usb1: MAC 12:f1:22:6a:1a:2d
[ 20.573109] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
[ 26.057832] logitech-hidpp-device 0003:046D:4074.0004: HID++ 4.2 device connected.
[ 66.389990] usb 1-1.3: new full-speed USB device number 4 using xhci-hcd
[ 66.541533] usb 1-1.3: New USB device found, idVendor=062a, idProduct=8572, bcdDevice= 0.02
[ 66.541554] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 66.541561] usb 1-1.3: Product: Hexgears Keyboard
[ 66.541567] usb 1-1.3: Manufacturer: MosArt
[ 66.592110] input: MosArt Hexgears Keyboard as /devices/platform/soc/35000000.hsio_apb/35100000.usb3/35100000.usb/xhci-hcd.2.auto/usb1/1-1/1-1.3/1-1.3:1.0/0003:062A:8572.0005/input/input12
[ 66.660366] input: MosArt Hexgears Keyboard as /devices/platform/soc/35000000.hsio_apb/35100000.usb3/35100000.usb/xhci-hcd.2.auto/usb1/1-1/1-1.3/1-1.3:1.0/0003:062A:8572.0005/input/input13
[ 66.660825] hid-generic 0003:062A:8572.0005: input,hiddev98,hidraw4: USB HID v1.11 Keyboard [MosArt Hexgears Keyboard] on usb-xhci-hcd.2.auto-1.3/input0
root@ubuntu:/home/sunrise/ros2_ws/cam_test# dmesg | grep -i power
[ 0.155306] dr-power-domain 31030000.power-controller: Looking up bpu-supply from device tree
[ 3.777921] dr-power-domain 31030000.power-controller: Looking up bpu-supply from device tree
[ 3.786753] dr-power-domain 31030000.power-controller: Looking up gpu-supply from device tree
[ 3.868284] dr-power-domain 31030000.power-controller: Looking up bpu-supply from device tree
[ 3.883362] dr-power-domain 31030000.power-controller: Looking up gpu-supply from device tree
[ 8.583077] aicbsp: aicbsp_set_subsys, power state change to 1 dure to AIC_WIFI
[ 8.583082] aicbsp: aicbsp_platform_power_on
[ 11.720702] bpu-core 3a000000.bpu: Can’t get bpu power delay, use default
root@ubuntu:/home/sunrise/ros2_ws/cam_test# lsmod | grep -i cam
vs_cam_pulse 16384 1 vs_sif_v4l
vs_cam_ctrl 16384 5 vs_vse_v4l,vs_gdc_arm_v4l,vs_isp_v4l,vs_csi2_snps_v4l,vs_sif_v4l
root@ubuntu:/home/sunrise/ros2_ws/cam_test# sudo modprobe -r hobot_mipi
sudo modprobe hobot_mipi
modprobe: FATAL: Module hobot_mipi not found.
modprobe: FATAL: Module hobot_mipi not found in directory /lib/modules/6.1.83

核心问题确认

I2C 正常 + MIPI 无日志 = 硬件链路问题

从你的日志分析:

  • :white_check_mark: I2C 通信正常(0x32/0x33/0x50 都能检测到)
  • :cross_mark: MIPI 数据链路完全没被内核识别(dmesg 无任何 camera/mipi/sensor 日志)
  • :white_check_mark: 相机驱动模块已加载(vs_cam_ctrl, vs_csi2_snps_v4l

结论:排线接触问题概率 90%+


立即执行排查

1. 重新插拔排线(关键步骤)

GS130W 的 MIPI 排线需要完全插入并锁紧

操作步骤:
1. 断电(拔掉电源适配器)
2. 翻开 MIPI 接口锁扣(黑色/白色小卡扣)
3. 完全拔出排线
4. 用橡皮擦轻轻擦拭排线金手指
5. 重新插入——要插到底,金属面朝板卡内侧
6. 压下锁扣,确认卡住
7. 通电重启

排线方向参考:

        ┌─────────────┐
        │   RDK X5    │
        │   板卡      │
        │             │
        │  ┌─────┐    │
        │  │MIPI │    │  ← 排线金属面朝向板卡内侧
        │  │接口 │    │
        │  └─────┘    │
        │    ↑↑↑      │
        │   排线      │
        └─────────────┘

2. 重启后再次检查

sudo reboot

重启后立即执行:

# 查看是否有 camera 相关日志
dmesg | grep -E "camera|sensor|mipi|csi"

# 查看 video 设备节点
ls -l /dev/video*

正常情况应该有类似输出:

[    5.123456] vs_csi2_snps 3a040000.csi2: probe successful
[    5.234567] vs_isp_v4l: sensor detected: gs130w
[    5.345678] video0: registered as /dev/video0

3. 如果还是不行 —— 检查供电

GS130W 需要稳定 5V 供电,用万用表测量相机接口供电引脚:

# 查看电源相关日志
dmesg | grep -E "5V|power|regulator"

快速判断表

检查结果 可能原因 解决方案
dmesg 有 sensor 日志 驱动配置问题 检查相机配置文件
dmesg 无任何 camera 日志 排线/硬件问题 重新插拔或更换排线
ls /dev/video* 无设备 MIPI 链路不通 检查排线锁扣
I2C 设备消失 供电/排线完全断开 检查供电和连接

如果以上都无效

可能是硬件故障,建议:

  1. 更换一根 MIPI 排线测试(社区有帖子讨论排线规格)
  2. 换一块 RDK X5 板卡测试(排除板卡 MIPI 接口故障)
  3. 联系技术支持提供以下信息:
    • 完整 dmesg 输出
    • i2cdetect 输出
    • 排线连接照片
    • 系统版本(3.5.0)

参考资源

先按步骤 1 重新插拔排线,90% 的问题都是这个原因。 操作完把 dmesg | grep -E "camera|sensor|mipi|csi" 的输出贴出来,我再帮你分析。

root@ubuntu:/home/sunrise/ros2_ws/cam_test#
dmesg | grep -E “camera|sensor|mipi|csi”

ls -l /dev/video*
[ 11.423251] OF: graph: no port node found in /soc/cam/csi@3d060000
[ 11.429485] OF: graph: no port node found in /soc/cam/csi@3d070000
[ 11.435797] OF: graph: no port node found in /soc/cam/csi@3d080000
[ 11.442029] OF: graph: no port node found in /soc/cam/csi@3d090000
[ 11.448932] OF: graph: no port node found in /soc/cam/csi@3d090000
[ 11.460189] vs-snps-csi 3d090000.csi: No endpoint found for csi
[ 11.466260] OF: graph: no port node found in /soc/cam/csi@3d080000
[ 11.472488] vs-snps-csi 3d080000.csi: No endpoint found for csi
[ 11.478433] OF: graph: no port node found in /soc/cam/csi@3d070000
[ 11.484658] vs-snps-csi 3d070000.csi: No endpoint found for csi
[ 11.490619] OF: graph: no port node found in /soc/cam/csi@3d060000
[ 11.496825] vs-snps-csi 3d060000.csi: No endpoint found for csi
[ 11.502806] OF: graph: no port node found in /soc/cam/csi@3d060000
[ 11.514571] vs-snps-csi 3d060000.csi: No endpoint found for CSI
[ 11.521275] OF: graph: no port node found in /soc/cam/csi@3d070000
[ 11.527483] vs-snps-csi 3d070000.csi: No endpoint found for CSI
[ 11.533483] OF: graph: no port node found in /soc/cam/csi@3d080000
[ 11.539692] vs-snps-csi 3d080000.csi: No endpoint found for CSI
[ 11.545725] OF: graph: no port node found in /soc/cam/csi@3d090000
[ 11.551960] vs-snps-csi 3d090000.csi: No endpoint found for CSI
crw-rw-r–+ 1 root video 81, 0 3\u6708 24 21:52 /dev/video0
crw-rw-r–+ 1 root video 81, 1 3\u6708 24 21:52 /dev/video1
crw-rw-r–+ 1 root video 81, 2 3\u6708 24 21:52 /dev/video2
crw-rw-r–+ 1 root video 81, 3 3\u6708 24 21:52 /dev/video3
crw-rw-r–+ 1 root video 81, 4 3\u6708 24 21:52 /dev/video4
crw-rw-r–+ 1 root video 81, 5 3\u6708 24 21:52 /dev/video5
root@ubuntu:/home/sunrise/ros2_ws/cam_test# # 查看电源相关日志
dmesg | grep -E “5V|power|regulator”
[ 0.118493] regulator-dummy: no parameters, enabled
[ 0.155209] dr-power-domain 31030000.power-controller: Looking up bpu-supply from device tree
[ 0.189990] reg-fixed-voltage 34000000.a55_apb0:regulator-1v8: adc_1v8 supplying 1800000uV
[ 0.194129] hpu3501 2-001c: Found hpu3501-regulator node, register regulator
[ 0.194273] hpu3501-regulator hpu3501-regulator.0.auto: fault_cfgr will be default value
[ 0.194291] hpu3501-regulator hpu3501-regulator.0.auto: ocp_cfg1r will be default value
[ 0.194307] hpu3501-regulator hpu3501-regulator.0.auto: ocp_cfg2r will be default value
[ 0.194323] hpu3501-regulator hpu3501-regulator.0.auto: reg 0x53 will be default value 0x4
[ 3.774719] dr-power-domain 31030000.power-controller: Looking up bpu-supply from device tree
[ 3.783547] dr-power-domain 31030000.power-controller: Looking up gpu-supply from device tree
[ 3.857415] dr-power-domain 31030000.power-controller: Looking up bpu-supply from device tree
[ 3.873590] dr-power-domain 31030000.power-controller: Looking up gpu-supply from device tree
[ 8.390238] sii902x 7-003b: supply iovcc not found, using dummy regulator
[ 8.390716] sii902x 7-003b: supply cvcc12 not found, using dummy regulator
[ 8.407404] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 8.469966] aicbsp: aicbsp_set_subsys, power state change to 1 dure to AIC_WIFI
[ 8.469971] aicbsp: aicbsp_platform_power_on
[ 11.575139] bpu-core 3a000000.bpu: Can’t get bpu power delay, use default

问题定位:CSI Endpoint 未找到

从你的 dmesg 输出看到核心错误:

OF: graph: no port node found in /soc/cam/csi@3d060000
vs-snps-csi 3d090000.csi: No endpoint found for csi

含义:CSI 控制器在设备树中找不到相机传感器的 endpoint,说明相机传感器没有被正确注册


关键判断

检查项 结果 含义
I2C 设备 :white_check_mark: 能检测到 0x32/0x33/0x50 I2C 通信正常
CSI 日志 :cross_mark: No endpoint found 传感器未注册到设备树
sensor 日志 :cross_mark: 无 sensor detected 日志 相机未被识别
/dev/video* :white_check_mark: 有 6 个设备 系统默认设备,非相机

结论:排线 MIPI 数据 lane 未接通(I2C 通但 MIPI 不通)


立即执行排查

1. 检查排线连接(最关键)

GS130W 排线需要完全插入并锁紧,MIPI 数据 lane 对接触要求极高:

操作步骤:
1. 完全断电(拔掉电源适配器)
2. 翻开 MIPI 接口锁扣(黑色卡扣,先向上翻 90 度)
3. 完全拔出排线
4. 检查排线金手指是否有氧化/污渍
5. 用无水酒精或橡皮擦清洁金手指
6. 重新插入——必须插到底,金属面朝板卡内侧
7. 压下锁扣,确认卡住(会听到轻微"咔哒"声)
8. 轻轻拉扯排线,确认不会松动
9. 通电重启

排线方向示意图:

        ┌─────────────────┐
        │    RDK X5       │
        │    板卡         │
        │                 │
        │   ┌───────┐     │
        │   │ MIPI  │     │  ← 黑色锁扣
        │   │ 接口  │     │
        │   └───────┘     │
        │       ↑↑↑       │
        │    排线插入     │
        │  金属面朝内侧   │
        └─────────────────┘

2. 重启后检查 ISP 日志

sudo reboot

重启后立即执行:

# 查看 ISP 和 sensor 相关日志
dmesg | grep -E "isp|sensor|gs130|sc132"

# 查看 CSI 状态
dmesg | grep -E "csi.*probe|csi.*success"

正常输出应该类似:

[    5.123456] vs_isp_v4l: sensor detected: gs130w
[    5.234567] vs_csi2_snps 3a040000.csi2: probe successful
[    5.345678] vs_isp_v4l: init success

3. 检查相机供电(如果排线重插无效)

GS130W 需要独立 5V 供电,I2C 能通但 MIPI 不通可能是供电不足:

# 查看 regulator 状态
dmesg | grep -E "regulator|5V|vcc"

# 如果有万用表,测量相机接口供电引脚
# 应该是 5V ± 0.2V

4. 尝试手动加载 ISP 模块

# 查看已加载的相机相关模块
lsmod | grep -E "vs_|isp|csi"

# 尝试重新加载(如果模块存在)
sudo modprobe -r vs_isp_v4l
sudo modprobe vs_isp_v4l

排查流程图

┌─────────────────────────────────────┐
│  重新插拔排线 + 完全断电重启        │
└─────────────────┬───────────────────┘
                  │
                  ▼
┌─────────────────────────────────────┐
│  dmesg | grep -E "isp|sensor"       │
└─────────────────┬───────────────────┘
                  │
        ┌─────────┴─────────┐
        │                   │
   有 sensor 日志        无 sensor 日志
        │                   │
        ▼                   ▼
┌───────────────┐    ┌───────────────┐
│ 检查配置文件  │    │ 供电/排线问题 │
│ 尝试启动相机  │    │ 更换排线测试  │
└───────────────┘    └───────────────┘

如果以上都无效

可能是硬件故障,建议:

  1. 更换 MIPI 排线测试(参考 排线规格帖子
  2. 联系技术支持,提供以下信息:
    • 完整 dmesg 输出
    • i2cdetect -y 4i2cdetect -y 6 输出
    • 排线连接照片(金属面朝向、锁扣状态)
    • 系统版本:3.5.0
    • 相机型号:GS130W

参考案例

社区类似问题的解决方案:

先执行步骤 1(重新插拔排线 + 完全断电),90% 的类似问题都是排线接触不良导致的。 操作完把 dmesg | grep -E "isp|sensor|gs130" 的输出贴出来,我再帮你分析下一步。