Problem with Video_streaming

I followed this link How to use Analogue Camera Adapter on Embedded Linux, and did connection as specified.

after setting environment as specified :

Coliri iMX6 # setenv fdt_file imx6dl-colibri-cam-eval-v3.dtb

Colibri iMX6 # saveenv

after setting env i did

dmesg | grep adv

and got output:
root@colibri-imx6:~# dmesg | grep adv
[ 2.912549] systemd[1]: System time before build time, advancing clock.
[ 6.174389] adv7280 2-0021: chip found @ 0x42 (21a8000.i2c)
[ 6.174405] adv7280 2-0021: no sensor pwdn pin available
[ 6.203555] adv7280 2-0021: adv7280_probe:Analog Device adv7280 not detected!

I’m using ADV7180.

I also tried to probe i2c signal, but it is not giving any output.
how can i solve it?
Thank you

Hi @hemasree

Could you provide the software version of your module?

I’m using ADV7180.

How did you connect ADV7180 to the carrier board?
Can you provide a connection schematic?

adv7280 2-0021: no sensor pwdn pin available

Which pin did you configure for the PowerDown Gpio?

Best regards,
Jaski

Thanks for acknowledging me Mr. @jaski.tx link text

I’m sending you my board and module sketch, how they connected.
in analogue camera module V1.1A the jumper settings are as follows
JP1---- pin 2 and pin 3 are shorted
JP2---- pin 1 and pin 2 are shorted
JP3---- open
JP4---- Shorted
JP5---- open
JP6---- shorted
JP7---- open

I’m trying to access the adv7180 of my board. but fail to access as i mention above. can you please tell me what might be wrong. what can cause error like this. If you have any experience please do share it with us, it might help me and others. I’ll wait for your reply.

Thank you.
regards

Hi @hemasree

In the pictures, you sent me, you are using an Apalis Evaluation Board and not Colibri Evaluation Board?

Could you provide the version of the hardware (including Carrier Board) and software of your module?

What is output of uname -a?

Could you provide the complete dmesg log?

Thanks and best regards,
Jaski

Hello Mr. @jaski.tx

link text

here im sending you the file of my results what i got… and now i’m using Apalis iMx6Q 1GB V1.1B Apalis evaluation board of Toradex, Rev. 1.0-12/2012. apologies for not mentioning it before… in this board camera module is some time detecting the module and some time not. it seems to be its i2c communication problem, its not probing, but not sure how to take it. i tried both the adc in module the max9526 and adv7180… adv7180 it keep popping adv7280 errors as mention before.

and now i’m trying to figure out how can i manually prob or detect i2c

sorry all of the sudden i changed board and asking different question, but i’m new to this board and don’t know much about it.

so if anyone reading it have any idea please do share.

Mr.@jaski.tx is there any way i can manually prob the board with camera module. because when i connect module it needs to restart and then detect but sometime is cannot detect.

when i give command “mesg|grep max9526” and if it detects module in case of max9526.
the info are as follows: mxc_v4l2_master_attach: ipu0:/csi0 parallel attached max9526:mxc0

when i give command “mesg|grep max9526” and if it dont detects module in case of max9526.
the info are as follows: max9526 3-0020: Device seems not to be a MAX9526

I’ll wait for your reply. Mr. @jaski.tx

Thanks and best regards

HI @hemasree

I just saw that you are using the version 1.1A of the analogue camera module. This is very old version of the module. In the old version, adv7180 was used and not adv7280. To use the old version, you definitely need to enable the adv7180 in the device tree and disable the adv7280.

Best regards,
Jaski

hello Mr. @jaski.tx
thanks for your reply. In version 1.1A its have two decoder one is max9526 and another is adv7180, right.
i tried max9526 too but when i play/execute my cpp file which i already cross-compiled it gives some error

VIDEOIO ERROR: V4L: device v4l2:///dev/video0: Unable to query number of channels
[ 6091.594180] ERROR: v4l2 capture: slave not found! V4L2_CID_HUE
[ 6091.600761] ERROR: v4l2 capture: slave not found! V4L2_CID_HUE

(video:1488): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (dest)' failed
OpenCV Error: Unspecified error (GStreamer: cannot link color -> sink
) in cvCaptureFromCAM_GStreamer, file /usr/src/debug/opencv/3.3+gitAUTOINC+87c27a074d_2a9d1b22ed_a62e20676a_34e4206aef_fccf7cd6a4-r0/git/module6
VIDEOIO(cvCreateCapture_GStreamer (CV_CAP_GSTREAMER_FILE, filename)): raised OpenCV exception

/usr/src/debug/opencv/3.3+gitAUTOINC+87c27a074d_2a9d1b22ed_a62e20676a_34e4206aef_fccf7cd6a4-r0/git/modules/videoio/src/cap_gstreamer.cpp:816: ek
 in function cvCaptureFromCAM_GStreamer

Error opening video stream or file

and in terminal it suppose to work when i input command

"gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink use-vsync=true"

right.
but it pops error :

Setting pipeline to PAUSED ...
[ 6279.531917] mxc_sdc_fb fb@0: 1024x768 h_sync,r,l: 104,48,152  v_sync,l,u: 4,3,23 pixclock=63500000 Hz
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[ 6290.299482] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
ERROR: from element /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0: Internal data stream error.
Additional debug info:
../../../../git/libs/gst/base/gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0:
streaming stopped, reason error (-5)
Execution ended after 0:00:10.290318478
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
[ 6290.823715] mxc_sdc_fb fb@0: 1024x768 h_sync,r,l: 104,48,152  v_sync,l,u: 4,3,23 pixclock=63500000 Hz
Freeing pipeline ...

I don’t know what is wrong in what?
do anyone have any idea about it. I’ll wait for your reply Mr. @jaski.tx what u think about this. and it will be helpful if you give me your opinion

Thank Mr. @jaski.tx
regards

Hi @hemasree

Unfortunately we don’t have the ACA module version 1.1A, but I am getting similar errors with ACA module version 2.0B.

Could you share the code you are using to get picture from the camera?

Thanks and best regards,
Jaski

Hello Mr. @jaski.tx

thanks for helping out again.
I’m using same codes used in this link: High performance, low power Embedded Computing Systems | Toradex Developer Center

and one more which i used to test when above code keeps popping error are :

#include "opencv2/opencv.hpp"
#include 
#include 

using namespace std;
using namespace cv;

int main()
{

VideoCapture cap("v4l2:///dev/video0");// video3 is my usb cam but didn't work either
//cap.open(3); 
//VideoCapture cap(VIDIOC_ENUM_FMT);    

// Check if camera opened successfully
if(!cap.isOpened())
{
cout << "Error opening video stream or file" << endl;
return -1;
}

//cap.set(CAP_PROP_FPS, 120);   
while(1)
{
Mat frame;
// Capture frame-by-frame
cap >> frame;
    
// If the frame is empty, break immediately
if (frame.empty())
{
	break;
}

imshow( "Output_Win", frame );
// Press  ESC on keyboard to exit
char c=(char)waitKey(25);
if(c==27)
{
	break;
}
}
  
// When everything done, release the video capture object
cap.release();
 
// Closes all the frames
destroyAllWindows();
     
return 0;
}

seems error is same.
and please share if anything cross your mind.

Thank You Mr. @jaski.tx
Regards

Hi @hemasree
thanks for the code. We will try this out and come back to you soon.

Best regards,
Jaski

Hi @hemasree

You need to add the following line when defining your capture device:

VideoCapture cap("imxv4l2videosrc device=\"/dev/video0\" ! videoconvert ! appsink")

This worked with the Analogue Camera Adapter. For you webcam, you may need different videosources. The different video sources can be found with the command gst-inspect-1.0 | grep v4l2 on the SoM.

Best regards,
Jaski