×

INDI Library v1.9.6 Released (21 May 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Re:Raspberry Pi Camera Module - Indi

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

I am trying to use indi with my camera module v2 on a raspberry pi 3/ubuntu mate 16.04.
I did a lot of tries before asking and listed below what I did :
  • I made sure my raspberry pi camera module v2 was ok with the "raspistill".
  • I followed the install instructions presented here : www.indilib.org/support/tutorials/169-ek...-complete-guide.html
  • Indi seems totally ok and I launch my server with the indi_v4l2_ccd driver.
  • with phd2 I can connect to the server, it is able to retrieve resolution, pixel size, ... and I can connect to the camera (in the tray bay I can see camera connected").
  • My only problem is when I set a 0.2 sec exposure, it seems to start but never ends.


I would take any clue to progress on my investigations.

Thank you in advance for your help !
4 years 8 months ago #20114

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

  • Posts: 1029
  • Thank you received: 301
Hello,
Which camera is it exactly?
Would you care to share a few commands you tried with their parameters and their result? Raspistill for instance?
Then if you open the INDI panel in Ekos, you can enable additional debug output, run an exposure from there, and show us the logs from the bottom text box. Try to keep the scenario (and describe it!) as simple as possible (connect, configure, expose).

-Eric
HEQ5-Pro - Atik 314E - Orion ED80T - DMK21 on Orion 50mm
DIY 3D-printed Moonlite and FWheel RGB/LPR
KStars and indiserver on two Atom 1.6GHz 1GB RAM Linux, VPN remote access
The following user(s) said Thank You: Jasem Mutlaq
4 years 8 months ago #20127

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

Or just enable CCD Debug from Ekos (see my signature for HOWTO)
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
The following user(s) said Thank You: Christophe BONNEFOY
4 years 8 months ago #20135

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

  • Posts: 8
  • Thank you received: 1

File Attachment:

File Name: 2017-10-12...0-13.zip
File Size:13 KB


Hi all, hi Knro and Eric,

Please find enclosed my logs as proposed by knro.

I briefly looked into the log, it seems that the frames are actualy taken but dropped because not of the expected size : " V4L2 CCD : [DEBUG] read_frame: frame is 38544-byte long, expected 786432 - frame should be dropped "
This is a great news as it means that there is actually a frame ;)

Any help would be appreciated !


PS : the command that I did to test raspi still was : "raspistill -t 2000 -o image.jpg", my camera is the camera module v2 for raspberry pi (bought here )

Best regards,

Edit : The file is now really attached to the message !

Christophe
Last edit: 4 years 8 months ago by Christophe BONNEFOY. Reason: The file is now really attached to the message !
4 years 8 months ago #20142
Attachments:

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

  • Posts: 1029
  • Thank you received: 301
Ah, interesting. There is a safeguard in the V4L2 driver client (that is, the INDI driver) which drops frames that are not matching the expected size. In your use case, indi_v4l2_ccd expects the frame to be 1024x768 8bpp, but the kernel driver provides a much shorter data block. So the frame is there, yes, but either it is corrupted or the settings were not properly forwarded to the kernel.
I'm writing this from Tapatalk, which is buggier and buggier as updates come, and I can't check links nor logs right now. I'll return to this post shortly to have a look.

-Eric
HEQ5-Pro - Atik 314E - Orion ED80T - DMK21 on Orion 50mm
DIY 3D-printed Moonlite and FWheel RGB/LPR
KStars and indiserver on two Atom 1.6GHz 1GB RAM Linux, VPN remote access
4 years 8 months ago #20150

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

  • 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
4 years 8 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
HEQ5-Pro - Atik 314E - Orion ED80T - DMK21 on Orion 50mm
DIY 3D-printed Moonlite and FWheel RGB/LPR
KStars and indiserver on two Atom 1.6GHz 1GB RAM Linux, VPN remote access
4 years 8 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
HEQ5-Pro - Atik 314E - Orion ED80T - DMK21 on Orion 50mm
DIY 3D-printed Moonlite and FWheel RGB/LPR
KStars and indiserver on two Atom 1.6GHz 1GB RAM Linux, VPN remote access
4 years 8 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: 4 years 8 months ago by Christophe BONNEFOY.
4 years 8 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
HEQ5-Pro - Atik 314E - Orion ED80T - DMK21 on Orion 50mm
DIY 3D-printed Moonlite and FWheel RGB/LPR
KStars and indiserver on two Atom 1.6GHz 1GB RAM Linux, VPN remote access
4 years 8 months ago #20242

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

  • Posts: 47
  • 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: 2 years 1 month ago by Lars Berntzon.
2 years 1 month ago #53899

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

  • Posts: 43
  • 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.
2 years 1 month ago #53914

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

Time to create page: 0.629 seconds