arjun.a
range data
5aefcf4
raw
history blame
7.08 kB
Ticket Name: Linux/TDA2EVM5777: OpenCV VideoCapture RTSP stream
Query Text:
Part Number: TDA2EVM5777 Tool/software: Linux Hello, I am running PROCESSOR_SDK_VISION_03_1_00_00 Linux and I am trying to use the OpenCV libraries that are pre-installed in the rootfs in my own C++ code application (not within the Vision SDK framework). In my attempt to run cv::VideoCapture capture(rtsp://UserName:Password@ip_address); in my c++ code, I can compile without errors. When running the executable, once I get to the point where I attempt to open the stream, I get these errors: MmRpc_create: Error: open failed, name=/dev/rpmsg-dce ../git/libdce.c:416: dce_ipc_init ERROR: Failed eError == DCE_EOK error val -4../git/libdce.c:479: Engine_open ERROR: Failed dce_ipc_init(coreIdx) == DCE_EOK error val -4MmRpc_create: Error: open failed, name=/dev/rpmsg-dce ../git/libdce.c:416: dce_ipc_init ERROR: Failed eError == DCE_EOK error val -4../git/libdce.c:479: Engine_open ERROR: Failed dce_ipc_init(coreIdx) == DCE_EOK error val -4 I checked the kernel and it looks like I do have RPMSG enabled in the kernel: root@dra7xx-evm:/tmp# cat config | grep RPMSG CONFIG_RPMSG=m CONFIG_RPMSG_RPC=m CONFIG_RPMSG_PRU=m Is there anyway to fix these errors so that I can grab from the rtsp stream? Am I using the correct C++ OpenCV call to grab from the rtsp stream? Do I have to enable anything in the kernel to use the OpenCV call? Please let me know if you need anymore information and thank you in advance for your assistance. Thank you, -iFer
Responses:
Hi iFer, MmRpc_create: Error: open failed, name=/dev/rpmsg-dce indicates that the ipumm firmware which is for multimedia decode/encode is not loaded. Can you check if the rootfs has /lib/firmware/dra7-ipu2-fw.xem4 and is linked to dra7-ipu2-fw.xem4.ipumm-fw ?
Hello, I looked at the /lib/firmware directory and here is the output: root@dra7xx-evm:~# ls -lF /lib/firmware/ lrwxrwxrwx 1 root root 49 Jun 27 00:37 am57xx-pru1_0-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1_0.out lrwxrwxrwx 1 root root 49 Jun 27 00:37 am57xx-pru1_1-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1_1.out lrwxrwxrwx 1 root root 49 Jun 27 00:37 am57xx-pru2_0-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt2_0.out lrwxrwxrwx 1 root root 49 Jun 27 00:37 am57xx-pru2_1-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt2_1.out -rwxr-xr-x 1 root root 9941039 Jun 27 00:37 dra7-dsp1-fw-radio.xe66* -rw-r--r-- 1 root root 7438272 Jun 27 00:37 dra7-dsp1-fw.xe66 -rw-r--r-- 1 root root 889276 Jun 27 00:37 dra7-dsp1-fw.xe66.dspdce-fw -rw-r--r-- 1 root root 21810444 Jun 27 00:37 dra7-dsp1-fw.xe66.opencl-monitor -rw-r--r-- 1 root root 7438272 Jun 27 00:37 dra7-dsp2-fw.xe66 -rw-r--r-- 1 root root 21810444 Jun 27 00:37 dra7-dsp2-fw.xe66.opencl-monitor -rw-r--r-- 1 root root 9499744 Jun 27 00:37 dra7-ipu2-fw.xem4 -rw-r--r-- 1 root root 3743108 Jun 27 00:37 dra7-ipu2-fw.xem4.ipumm-fw -rw-r--r-- 1 root root 576565 Jun 27 00:37 dra7-ipu2-fw.xem4.map -rw-r--r-- 1 root root 186 Jun 27 00:37 goodix_9271_cfg.bin drwxr-xr-x 6 root root 4096 Jun 27 00:37 ipc/ drwxr-xr-x 2 root root 4096 Jun 27 00:37 pru/ drwxr-xr-x 2 root root 4096 Jun 27 00:37 ti-connectivity/ drwxr-xr-x 2 root root 4096 Jun 27 00:37 tigon/ -rw-r--r-- 1 root root 4002 Jun 27 00:37 vpdma-1b8.bin The files you were referencing do exist, but it seems that they are not linked. How do I proceed from here? Thank you!, -iFer
Hi iFer, Please refer this link to link processors.wiki.ti.com/index.php to dynamically link multimedia ipumm firmware to IPU2 and check if it works. Note: OpenCV rtsc capture is not a tested usecase in vision-sdk. Thanks Ramprasad
Hello, Thank you for your help! I attempted to follow the instructions to link firmware correctly by running these commands: cd /sys/bus/platform/drivers/omap-rproc/ echo 55020000.ipu > unbind rm /lib/firmware/dra7-ipu2-fw.xem4 ln -s /lib/firmware/dra7-ipu2-fw.xem4.ipumm-fw /lib/firmware/dra7-ipu2-fw.xem4 echo 55020000.ipu > bind I rebooted linux and double checked to see if the link stayed and that 55020000.ipu is still bounded and they were. I then attempted to rerun my code to open up an RTSP stream, but it still gives me these error messages: MmRpc_create: Error: open failed, name=/dev/rpmsg-dce ../git/libdce.c:416: dce_ipc_init ERROR: Failed eError == DCE_EOK error val -4../git/libdce.c:479: Engine_open ERROR: Failed dce_ipc_init(coreIdx) == DCE_EOK error val -4MmRpc_create: Error: open failed, name=/dev/rpmsg-dce ../git/libdce.c:416: dce_ipc_init ERROR: Failed eError == DCE_EOK error val -4../git/libdce.c:479: Engine_open ERROR: Failed dce_ipc_init(coreIdx) == DCE_EOK error val -4 Here is the output of ls -lF in the /lib/firmware directory: root@dra7xx-evm:/lib/firmware# ls -lF lrwxrwxrwx 1 root root 49 Jun 27 00:37 am57xx-pru1_0-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1_0.out lrwxrwxrwx 1 root root 49 Jun 27 00:37 am57xx-pru1_1-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1_1.out lrwxrwxrwx 1 root root 49 Jun 27 00:37 am57xx-pru2_0-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt2_0.out lrwxrwxrwx 1 root root 49 Jun 27 00:37 am57xx-pru2_1-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt2_1.out -rwxr-xr-x 1 root root 9941039 Jun 27 00:37 dra7-dsp1-fw-radio.xe66* -rw-r--r-- 1 root root 7438272 Jun 27 00:37 dra7-dsp1-fw.xe66 -rw-r--r-- 1 root root 889276 Jun 27 00:37 dra7-dsp1-fw.xe66.dspdce-fw -rw-r--r-- 1 root root 21810444 Jun 27 00:37 dra7-dsp1-fw.xe66.opencl-monitor -rw-r--r-- 1 root root 7438272 Jun 27 00:37 dra7-dsp2-fw.xe66 -rw-r--r-- 1 root root 21810444 Jun 27 00:37 dra7-dsp2-fw.xe66.opencl-monitor lrwxrwxrwx 1 root root 26 Jul 24 20:19 dra7-ipu2-fw.xem4 -> dra7-ipu2-fw.xem4.ipumm-fw -rw-r--r-- 1 root root 3743108 Jun 27 00:37 dra7-ipu2-fw.xem4.ipumm-fw -rw-r--r-- 1 root root 576565 Jun 27 00:37 dra7-ipu2-fw.xem4.map -rw-r--r-- 1 root root 186 Jun 27 00:37 goodix_9271_cfg.bin drwxr-xr-x 6 root root 4096 Jun 27 00:37 ipc/ drwxr-xr-x 2 root root 4096 Jun 27 00:37 pru/ drwxr-xr-x 2 root root 4096 Jun 27 00:37 ti-connectivity/ drwxr-xr-x 2 root root 4096 Jun 27 00:37 tigon/ -rw-r--r-- 1 root root 4002 Jun 27 00:37 vpdma-1b8.bin Here is the output of ls -lF in the /sys/bus/platform/drivers/omap-rproc directory root@dra7xx-evm:/sys/bus/platform/drivers/omap-rproc# ls -lF lrwxrwxrwx 1 root root 0 Jul 24 19:50 40800000.dsp -> ../../../../devices/platform/44000000.ocp/40800000.dsp/ lrwxrwxrwx 1 root root 0 Jul 24 19:50 41000000.dsp -> ../../../../devices/platform/44000000.ocp/41000000.dsp/ lrwxrwxrwx 1 root root 0 Jul 24 19:53 55020000.ipu -> ../../../../devices/platform/44000000.ocp/55020000.ipu/ --w------- 1 root root 4096 Jul 24 19:53 bind lrwxrwxrwx 1 root root 0 Jul 24 19:50 module -> ../../../../module/omap_remoteproc/ --w------- 1 root root 4096 Jul 24 19:50 uevent --w------- 1 root root 4096 Jul 24 19:53 unbind I need to open up an RTSP stream from an IP camera. Is there anyway for me to do that? If not, then is there a way for me to grab a frame from the IP camera using C++ code with the OpenCV libraries already on the visionSDK linux? Thank you!, -iFer