×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Will KStars "V4L2 CCD" talk to Meade LPI ?

  • Posts: 81
  • Thank you received: 3
Hello everyone,

I am doing my due diligence before purchasing a new telescope. This will be my second; my first one was a 45-year old 3-inch Unitron refractor (definitely not computerized). My objective is to run INDI Server on a Raspberry PI 3 with device connections to the go-to-mount and a glorified webcam better known as the Meade LPI-GM

I installed KStars on my Linux laptop running Ubuntu 16.04. Everything works great! To be honest I've only tried the Telescope Simulator but it has helped me better understand the INDI protocol. I was hoping to find a device named "Meade LPI" under the CCDs category but alas there was none. So I fired up DuckDuckGo and hunted and hunted...

I found this blog post by groz at Cloudy Nights in which he links to a post by Jasem

Am I correct in thinking that the device named "V4L2 CCD" will talk to the Meade LPI ?

Thank you for a great forum and equally great products!
7 years 2 weeks ago #15153

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

  • Posts: 314
  • Thank you received: 95
Yes, you can try your Meade LPI with "V4L2 CCD" device.
You can try my open project Astronomy Linux
The following user(s) said Thank You: Brian Morgan
7 years 2 weeks ago #15155

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

  • Posts: 81
  • Thank you received: 3
Ok, well I got V4L2 CCD driver working with my laptop's webcam (monochrome only, color causes KStars to crash).

When I record several seconds of video the file it saves to has a SER extension. Is there a utility available for Ubuntu that can open the file and save selected frames?

Thank you.
7 years 1 week ago #15210

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

  • Posts: 81
  • Thank you received: 3
I got V4L2 driver working with my laptop's webcam (monochrome only, color causes KStars to crash).

When I record several seconds of video it writes a file with a SER extension. Is there a Linux program that can open the file and save selected frames? When I search online for information about SER files there is precious little.

Thank you.
7 years 1 week ago #15223

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

Yes, use SER Player . Also color should cause KStars to crash, any logs?
The following user(s) said Thank You: Brian Morgan
7 years 1 week ago #15226

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

  • Posts: 81
  • Thank you received: 3
Thank you, SER Player works perfectly!

Now to the crashing issue. Believe it or not there is nothing written to the log file before the crash happens. I turned on all logging checkboxes in the INDI Control Panel. The only thing I see is in the Terminal: "Client 0: read: Connection reset by peer" and "Client 0: shut down complete - bye!" Here is the command line I used to start indiserver: "indiserver -v indi_v4l2_ccd" All logging options I set in the INDI Control Panel. I am not aware of any log file for KStars. Is there?

One thing that I discovered is that I can get it to crash repeatably by following this procedure:
1. Start indiserver
2. Launch KStars
3. Connect to server
4. Launch control panel
5. Connect to driver
6. Set Image settings to "Gray"
7. Stream on. Works great!
8. Stream off.
9. Set Image settings to "Color"
10. Stream on. Crash!

But I discovered this morning that if I select "Color" first and then stream it I do not get the crash. But in the window I see myself in the webcam but I am in four smaller regions in the upper half of the window but there is a lot of syncing issues. I see that it is updating as I move from side to side but there are definite problems.

By no means am I a video expert. Do you think that there are other settings in the control panel that I need to make when I select "Color"?

My laptop came with a program called "Cheese Webcam Booth". It works perfectly and in color.
7 years 1 week ago #15231

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

It might be a case of unsupported format. When you first start indiserver -v indi_v4l2_ccd, it prints information on the video device including capture formats available.
The following user(s) said Thank You: Brian Morgan
7 years 1 week ago #15232

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

  • Posts: 81
  • Thank you received: 3
This is what the terminal says after I start the server fresh and then begin streaming in color:
(Like I said in an earlier post, my image is spread across four regions with lots of syncing issues.)

2017-03-16T14:11:46: startup: indiserver -v indi_v4l2_ccd
2017-03-16T14:11:46: Driver indi_v4l2_ccd: pid=12304 rfd=3 wfd=6 efd=7
2017-03-16T14:11:46: listening to port 7624 on fd 4
2017-03-16T14:11:46: Driver indi_v4l2_ccd: Using default decoder 'Builtin decoder'
2017-03-16T14:11:46: Driver indi_v4l2_ccd: Supported V4L2 formats are:
2017-03-16T14:11:46: Driver indi_v4l2_ccd: Y16
2017-03-16T14:11:46: Driver indi_v4l2_ccd: NV21
2017-03-16T14:11:46: Driver indi_v4l2_ccd: BA81
2017-03-16T14:11:46: Driver indi_v4l2_ccd: YU12
2017-03-16T14:11:46: Driver indi_v4l2_ccd: NV12
2017-03-16T14:11:46: Driver indi_v4l2_ccd: YV12
2017-03-16T14:11:46: Driver indi_v4l2_ccd: BYR2
2017-03-16T14:11:46: Driver indi_v4l2_ccd: RGB3
2017-03-16T14:11:46: Driver indi_v4l2_ccd: RGGB
2017-03-16T14:11:46: Driver indi_v4l2_ccd: JPEG
2017-03-16T14:11:46: Driver indi_v4l2_ccd: MJPG
2017-03-16T14:11:46: Driver indi_v4l2_ccd: RGBO
2017-03-16T14:11:46: Driver indi_v4l2_ccd: RGBP
2017-03-16T14:11:46: Driver indi_v4l2_ccd: YVYU
2017-03-16T14:11:46: Driver indi_v4l2_ccd: YUYV
2017-03-16T14:11:46: Driver indi_v4l2_ccd: GREY
2017-03-16T14:11:46: Driver indi_v4l2_ccd: VYUY
2017-03-16T14:11:46: Driver indi_v4l2_ccd: UYVY
2017-03-16T14:11:46: Driver indi_v4l2_ccd: snooping on Telescope Simulator.EQUATORIAL_EOD_COORD
2017-03-16T14:11:46: Driver indi_v4l2_ccd: snooping on Telescope Simulator.TELESCOPE_INFO
2017-03-16T14:11:46: Driver indi_v4l2_ccd: snooping on CCD Simulator.FILTER_SLOT
2017-03-16T14:11:46: Driver indi_v4l2_ccd: snooping on CCD Simulator.FILTER_NAME
2017-03-16T14:11:46: Driver indi_v4l2_ccd: snooping on SQM.SKY_QUALITY
2017-03-16T14:12:18: Client 0: new arrival from 127.0.0.1:55800 - welcome!
2017-03-16T14:12:22: Driver indi_v4l2_ccd: VIDIOC_S_CROP: Inappropriate ioctl for device
2017-03-16T14:12:22: Driver indi_v4l2_ccd: VIDIOC_G_CROP: Invalid argument
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Decoder usesoftcrop true
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Decoder set format: YUYV size 1920x1080 bpp 8
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Decoder: Colorspace is 8, using default ycbcr encoding and quantization
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Decoder allocBuffers cropping false
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Control Brightness
2017-03-16T14:12:22: Driver indi_v4l2_ccd: integer
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Control Contrast
2017-03-16T14:12:22: Driver indi_v4l2_ccd: integer
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Control Saturation
2017-03-16T14:12:22: Driver indi_v4l2_ccd: integer
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Control Hue
2017-03-16T14:12:22: Driver indi_v4l2_ccd: integer
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Control White Balance Temperature, Auto
2017-03-16T14:12:22: Driver indi_v4l2_ccd: boolean
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Control Gamma
2017-03-16T14:12:22: Driver indi_v4l2_ccd: integer
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Control Power Line Frequency
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Menu items:
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Disabled
2017-03-16T14:12:22: Driver indi_v4l2_ccd: 50 Hz
2017-03-16T14:12:22: Driver indi_v4l2_ccd: 60 Hz
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Control White Balance Temperature
2017-03-16T14:12:22: Driver indi_v4l2_ccd: integer
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Control Sharpness
2017-03-16T14:12:22: Driver indi_v4l2_ccd: integer
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Control Backlight Compensation
2017-03-16T14:12:22: Driver indi_v4l2_ccd: integer
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Control Exposure, Auto
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Menu items:
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Manual Mode
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Aperture Priority Mode
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Control Exposure (Absolute)
2017-03-16T14:12:22: Driver indi_v4l2_ccd: integer
2017-03-16T14:12:22: Driver indi_v4l2_ccd: Control Exposure, Auto Priority
2017-03-16T14:12:22: Driver indi_v4l2_ccd: boolean
2017-03-16T14:12:22: Driver indi_v4l2_ccd: recorder: setpixelformat 1448695129

Under the "Capture Options" tab in INDI Control Panel there are two buttons: "Motion-JPEG" and "YUYV 4:2:2" with the default being "YUYV 4:2:2".

Yesterday I tried "Motion-JPEG" but couldn't get any output (just black screen but it didn't crash).
7 years 1 week ago #15233

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

  • Posts: 81
  • Thank you received: 3
Additional information:

As noted before clicking "Stream On" crashes when Color selected.
However I can click "Record On"
But when I try to open the file with SER Player it says: "Invalid SER file, Error file is too short to hold all the frames".

No worries, Jasem. I am OK with monochrome. Perhaps I will buy a web cam that plugs into a USB port instead of using this camera that is built into the laptop. I need to buy one for my Windows desktop anyhow. Furthermore, I am going to be using the Meade LPI which I haven't purchased yet. Perhaps color will work fine then but it is not a great loss since I am OK with monochrome.

Thanks!
7 years 1 week ago #15234

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

  • Posts: 81
  • Thank you received: 3
FYI, I learned how to turn on debug output to a file in KStars.

Very interesting behavior! So the procedure is this:
1. Enable KStars logging (verbose)
2. Start indiserver with v4l2_ccd
3. Connect to server
4. Connect to driver.
5. Select Monochrome
6. Stream on. (I look great!)
7. Stream off.
8. Select Color.
9. Stream on. (I don't look great but NO CRASH).
10. Stream off.
11. Shut down KStars and Indiserver.
12. Restart server
13. Start KStars
14. Turn off debug output
15. Connect to server.
16. Connect to driver.
17. Select Monochrome.
18. Stream on (again I look great!)
19. Stream off
20. Select Color.
21 Stream on (CRASH)

There is nothing in the kstars log file or driver log file that indicates a problem.
7 years 1 week ago #15236

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

You need to debug KStars in gdb. So start kstars from the console:
sudo apt-get install kstars-bleeding-dbg
gdb --args kstars
run

Then proceed normally, once KStars crashes, go back to gdb and type bt to get the backtrace. Post it here.
7 years 1 week ago #15239

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

  • Posts: 81
  • Thank you received: 3
I have very good news -- my bad. I was running version 4.1.0 of KStars but using the latest version of libindi that I built from the GitHub source. It is a long story but suffice it to say I learned a heckuva a lot about Linux these past few hours! Darn you Bill Gates!

Now I am running bleeding edge KStars and libindi. My webcam gives me color now!

Thanks for your help and patience, Jasem.
7 years 1 week ago #15267

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

Time to create page: 0.250 seconds