External Mode Error in Simulink with Raspberry pi video capture
Show older comments
Hello,
I have difficulty running on external mode in Simulink with Raspberry pi 3 Model B.
Here's the imformation about mypi:
>> mypi=raspi
mypi =
raspi - 속성 있음:
DeviceAddress: '192.168.137.236'
Port: 18734
BoardName: 'Raspberry Pi 3 Model B'
AvailableLEDs: {'led0'}
AvailableDigitalPins: [4,5,6,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]
AvailableSPIChannels: {'CE0','CE1'}
AvailableI2CBuses: {'i2c-1'}
AvailableWebcams: {'bcm2835-codec-decode (platform:bcm2835-codec):','/dev/video11','bcm2835-isp (platform:bcm2835-isp):',
'/dev/video14','/dev/video16','/dev/video0'}
I2CBusSpeed: 100000
Here is my Simulik Model:

I have set Hardware implementation as follows:

and of course the IP address and username/pwd are correct.
But when I run this model in external mode, it does not work and show error like this:

And if I deploy this model to hardware, SDL Video Display stays the same, and it shows;
### File v4l2_capture.c associated with S-Function 'v4l2_video_capture_sfcn' (used in 'raspberry_camera/V4L2 Video Capture')
does not exist
### Successful completion of build procedure for model: raspberry_camera
Build process completed successfully
I've tried changing the port number in External mode but it didn't work also.
I used Microsoft LifeCam Studio webcam, but I think it's not the problem about webcam itself (It works very well independently)
Thank you very much in advance!
Best regards,
Jiwon LEE
1 Comment
Prasanth Sunkara
on 16 Sep 2021
Hi Jiwon Lee,
We can try 2 different things
1) Change external mode -> Communication Interface -> TCP/IP. Basically, do not use XCP over TCP/IP when you have v4l2 blocks. Try External mode (or Monitor & Tune) now.
2) What happens if you do just "build & deploy" instead of Monitor & Tune? We should expect a SDL display window on the raspberry pi. You can open a VNC connection to Pi and check the ouput on SDL display window in Raspberry Pi.
Please let me know the outcomes of the above 2 approaches.
Thanks,
Prasanth
Answers (0)
Categories
Find more on Run on Target Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!