×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Re:Raspberry Pi Camera Module - Indi

  • Posts: 8
  • Thank you received: 1
hi again,
you are right the desired size has not been sent correctly :

Driver indi_v4l2_ccd: VIDIOC_CROPCAP: Inappropriate ioctl for device

what should I do ?

regards

Christophe
6 years 6 months ago #20170

Please Log in or Create an account to join the conversation.

  • Posts: 1029
  • Thank you received: 301
Hello,

Sorry for the delay, there were two clear nights here in French Brittany, and I couldn't let that pass :)

So the log is showing:
V4L2 CCD : "[DEBUG] 0.200-second exposure translates to 2000 1/10,000th-second device ticks. "
V4L2 CCD : "[DEBUG] read_frame: using MMAP to recover frame buffer "
V4L2 CCD : "[DEBUG] read_frame: buffer #0 dequeued from fd:3 "
V4L2 CCD : "[DEBUG] is_compressed: format JPEG has compressed flag 0 "
V4L2 CCD : "[DEBUG] read_frame: frame is 38559-byte long, expected 786432 - frame should be dropped "
The problematic line is "JPEG has compressed flag 0". Kernel V4L2 driver reports the frame is JPEG, and is uncompressed, which is nonsense.
Thus the INDI driver client considers the frame should be raw byte data and obviously larger than this.
Let me have a look at why this is so. There is a function in the driver which checks the frame type to override the compression flag.
-Eric
6 years 6 months ago #20216

Please Log in or Create an account to join the conversation.

  • Posts: 1029
  • Thank you received: 301
Hello,

So I have no real clue about why the kernel would mark the JPEG format as uncompressed.

I don't have a V4L2 at hand unfortunately. Do you have another pixel format available in the INDI panel for this camera? Try to use GREY, it is on the advertised list in the logs.

If there is a need, I can add JPEG in the override list and force the INDI driver to consider it compressed, but that seems weird and I don't know if that will solve your issue: you will probably hit another problem later on.

-Eric
6 years 6 months ago #20230

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 1
Hi,

I have plenty of updates to give you !

Actually, It seems that my EKOS is not able to send the configuration of the image it wants from the cam when I click on the preview button: each time I get an "ioctl invalid" .

To avoid that, I tweaked the parameters from INDI configuration tap BEFORE coming into kstars/ekos :
*Capture Option / Capture Format : YUYV 4:2:2
*Capture Size : 1024x768
Then I went to Ekos and it worked ! :)

I had still had some things to improve:

* Indi tells me 1sec is the maximum I can do and I did not succeed photos with more than 1024x768 while "raspistill -w 2592 -h 1944 -ISO 800 -ss 6000000 -br 80 -co 100 -o out.jpeg" makes 6 sec hi-res photos...

* [solved, I do not know how ?] : INDI configuration window was not reachable from EKOS : each time I wanted to change or see something, I closed KStar, I "indiserver indi_V4l2_ccd" and I use PDH2 which has a button to reach Indi config. -> after hours tweaking, it appeared that the INDI parameter window is supposed to appear just after "start indi" ! It never did that to me until recently :woohoo: . It is now much easier to change settings and consult indi log

I therefore have now advanced in my journey with several questions :
  • Longer exposures, I think it is already posted here
  • Higher Resolution : I can live without it for now, let say it leads to binning and therefore better SNR... let's say...
  • Why the Indi configuration window did not show before ?
  • Why is there an invalid ioctl, I propose to keep only this question for this post

Many thanks for your help, I would be more than happy to provide additional logs or anything else to help.

PS : last thought, as "raspistill" is a command line tool would you think a indi driver feasible to wrap all its functionalities ?
Is it what is done here ?

Regards,

Christophe
Last edit: 6 years 6 months ago by Christophe BONNEFOY.
6 years 6 months ago #20235

Please Log in or Create an account to join the conversation.

  • Posts: 1029
  • Thank you received: 301
Hello,

I think raspistill is using another method than V4L2, but I'm not certain.

About ioctls, I'll check your log again, or you may want to provide a new one with your findings? In any case, errors 22 are often "end of enumeration" errors, and expected (although arguable as a method).

-Eric

-Eric
6 years 5 months ago #20242

Please Log in or Create an account to join the conversation.

  • Posts: 49
  • Thank you received: 12
Hi, I've started to work on a indi-driver for this camera. Its not by far ready but if you like to have a look its here: github.com/lboclboc/indi_raspistill/
Im slaughtering the raspistill code to convert it to a indi-ccd driver but I have some problems. When you use raspistill to get a raw image, the actual jpg-file is a composition of a normal jpeg, and appended to it in the end is a BRCMo raw-file that I don't understand. Does anyone have a clue or suggestions?
It seems to be lines of 6112 bytes, in R-G-B format, but the line is divided into three sections. If its HSB/LSB or what I don't know.

Also a question about INDI, the simulator_ccd driver that I am using as a boiler plate is using 8bit images, but isn't INDI supposed to use 16bit images?

Regards, Lars
The following user(s) said Thank You: Jasem Mutlaq
Last edit: 3 years 11 months ago by Lars Berntzon.
3 years 11 months ago #53899

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 10
A couple of things to keep in mind that I discovered when I wrote my driver is that there is a 1 second limitation when using V4L2. Also, the response from Raspistill will seem slow because the first few frames are always dropped by design. This results in a 1 second exposure actually needing 7 or 8 seconds to complete.
3 years 11 months ago #53914

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 10
I apologize, I just noticed how old this thread is and what I think your actual question is. If you are trying to unpack a raw file, take a look at
github.com/jdhill-repo/indi-picamera/blo...er/indi_picamera.cpp lines 870 to 900. I can't remember exactly where I got the format. Hope this helps.
3 years 11 months ago #53924

Please Log in or Create an account to join the conversation.


Thank you for working on the driver! It's 16bit actually. You can see in setupParameters() function that it's sending 16 to SetCCDParams() function.
3 years 10 months ago #53942

Please Log in or Create an account to join the conversation.

  • Posts: 49
  • Thank you received: 12

Its me that is sorry, I didn't realize this either. I thought it was for the new 12Mp high quality camera that uses the imx477 chip, that is what I am working on anyway.

I did not know about your indi_raspicam before I started coding, even though I did search around quite a bit. I think your solution is simpler to implement by just calling raspiraw,
but sadly raspiraw does not seem to work with the new 12Mp camera.

Regards, Lars
Last edit: 3 years 10 months ago by Lars Berntzon.
3 years 10 months ago #53948

Please Log in or Create an account to join the conversation.

  • Posts: 49
  • Thank you received: 12
Please remove this post
Last edit: 3 years 10 months ago by Lars Berntzon.
3 years 10 months ago #53963

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 10
Support was added to raspiraw for the Sony IMX477 in the last few days, but I have not updated my fork that is on my github page. Since my driver is hard-coded from the V2 camera, if the V2 specific constants were changed, it may work with the HQ. These are RAWBLOCKSIZE, ROWSIZE, HPIXELS, VPIXELS. Also, the mode that is requested in the raspiraw command.

I have a HQ camera ordered and cannot test until it arrives. My goal is to have the driver use both the V2 and HQ.

If you have a link to what you have worked on, I would be interested in seeing it.
3 years 10 months ago #53965

Please Log in or Create an account to join the conversation.

Time to create page: 0.606 seconds