Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indi-rpicam crash #163

Closed
rwrw01 opened this issue Jul 6, 2020 · 20 comments
Closed

indi-rpicam crash #163

rwrw01 opened this issue Jul 6, 2020 · 20 comments
Labels
bug Something isn't working

Comments

@rwrw01
Copy link

rwrw01 commented Jul 6, 2020

on raspian buster with HQ cam
added indi-rpicam, build went well

on connecting to camera a warning fires:
2020-07-06T19:22:32: [WARNING] Connect: Unknown camera name: testc
2020-07-06T19:22:31: [INFO] MMAL device connected successfully!

no other options are available. When starting device it crashes

@rwrw01 rwrw01 added the bug Something isn't working label Jul 6, 2020
@knro
Copy link
Collaborator

knro commented Jul 7, 2020

@lboclboc Can you please check?

@lboclboc
Copy link
Contributor

lboclboc commented Jul 8, 2020

I recognize this, can you please do and sudo apt-get update and sudo apt-get upgrade. I think the problem is in the gpu driver really. Updated softwares will correctly report the camera as imx477. I'll also create a patch in the driver so it also accepts the faulty camera model testc

@rwrw01
Copy link
Author

rwrw01 commented Jul 9, 2020

I updated RPi on installation and did so again just now. Same error unfortunately.

lboclboc added a commit to lboclboc/indi-3rdparty that referenced this issue Jul 9, 2020
lboclboc added a commit to lboclboc/indi-3rdparty that referenced this issue Jul 9, 2020
@lboclboc
Copy link
Contributor

lboclboc commented Jul 9, 2020

Ive created a pullrequests from https://github.com/lboclboc/indi-3rdparty/tree/indimaster that should fix this. Can you please try this. Seems later mmal libraries actually fixes the name, but this fix just simply accepts the bad name testc also.

@rwrw01
Copy link
Author

rwrw01 commented Jul 11, 2020

the camera is found.

now the next step how to apply gain/binning but that is probably my problem with the ekos interface

@lboclboc
Copy link
Contributor

Good to hear. Binning is not supported yet but gain is working.

@kduchrow
Copy link

kduchrow commented Sep 10, 2020

Hi, I am getting the same Error with an different camera name :
2020-09-10T21:37:18: [WARNING] Connect: Unknown camera name: imx219
2020-09-10T21:37:18: [INFO] MMAL device connected successfully!

I Tried to add this line to the code || !strcmp(camera_control->get_camera()->get_name(), "imx219")
But if I capture an image, the driver chashed. Looks like, I need to configure more.

I am Using The: Raspberry Pi V2.1, 8 MP 1080P (RPI-CAM-V2) Cam.

Thank you hor your help !

@lboclboc
Copy link
Contributor

Im sorry but this driver only supports the hi-quality camera yet. But I can have a look into supporting this camera. I need to find som info about its raw encoding though, if anyone have any references for that, please share with me.
Alternatively, I might be able do deduce the format I you can send me a "raspistill -r -o sample.jpg" capture.

@kduchrow
Copy link

kduchrow commented Sep 11, 2020

Unfortunately I do not know exactly what you need. But I have two links here that might help you:
https://www.raspberrypi.org/forums/viewtopic.php?t=146310
http://bealecorner.org/best/RPi/

Could it be possible, to find out the camera specific parts and extract it in a sperate File, to make it more universal for all IP CAMS ?

@lboclboc
Copy link
Contributor

Thanks, that is good input. I just realized I do have a IMX219 camera also, broken lens, but still I can examine the image format. To be continued.

@kduchrow
Copy link

Awesome!
Sounds very good. I think a lot of people already got a similar camera.
It would be very helpful to support such camera models.
If you need more information, help, or testing, feel free to contact me.

@lboclboc
Copy link
Contributor

Actually I might have something working now. If you can help me test it I would appreciate. Use my fork on https://github.com/lboclboc/indi-3rdparty
Regards, Lars

@kduchrow
Copy link

kduchrow commented Sep 13, 2020

Thank you for dealing with this !
I tried the new driver and it istantly crash.
Here you can see my logfile:

2020-09-13T22:09:00: startup: /usr/bin/indiserver -v -p 7625 -m 300 -r 0 -f /tmp/indififo2d9658af 
2020-09-13T22:09:00: listening to port 7625 on fd 3
FIFO: start indi_rpicam -n "RPI Camera"
With name: RPI Camera
FIFO: Starting driver indi_rpicam
2020-09-13T22:09:00: Driver indi_rpicam: pid=6326 rfd=4 wfd=7 efd=8
2020-09-13T22:09:00: Client 5: new arrival from 127.0.0.1:47716 - welcome!
2020-09-13T22:09:00: Driver indi_rpicam: snooping on Telescope Simulator.EQUATORIAL_EOD_COORD
2020-09-13T22:09:00: Driver indi_rpicam: snooping on Telescope Simulator.TELESCOPE_INFO
2020-09-13T22:09:00: Driver indi_rpicam: snooping on Telescope Simulator.GEOGRAPHIC_COORD
2020-09-13T22:09:00: Driver indi_rpicam: snooping on Telescope Simulator.TELESCOPE_PIER_SIDE
2020-09-13T22:09:00: Driver indi_rpicam: snooping on Rotator Simulator.ABS_ROTATOR_ANGLE
2020-09-13T22:09:00: Driver indi_rpicam: snooping on Focuser Simulator.ABS_FOCUS_POSITION
2020-09-13T22:09:00: Driver indi_rpicam: snooping on Focuser Simulator.FOCUS_TEMPERATURE
2020-09-13T22:09:00: Driver indi_rpicam: snooping on CCD Simulator.FILTER_SLOT
2020-09-13T22:09:00: Driver indi_rpicam: snooping on CCD Simulator.FILTER_NAME
2020-09-13T22:09:00: Driver indi_rpicam: snooping on SQM.SKY_QUALITY
2020-09-13T22:09:07: Driver indi_rpicam: mmal: mmal_vc_port_enable: failed to enable port vc.ril.image_encode:in:0(OPQV): ENOSPC
2020-09-13T22:09:07: Driver indi_rpicam: mmal: mmal_port_enable: failed to enable connected port (vc.ril.image_encode:in:0(OPQV))0x6a7300 (ENOSPC)
2020-09-13T22:09:07: Driver indi_rpicam: mmal: mmal_connection_enable: output port couldn't be enabled
2020-09-13T22:09:07: Driver indi_rpicam: terminate called after throwing an instance of 'MMALException'
2020-09-13T22:09:07: Driver indi_rpicam:   what():  Failed to enable connection
2020-09-13T22:09:07: Driver indi_rpicam: stderr EOF
<delProperty device="RPI Camera"/>
2020-09-13T22:09:07: Driver indi_rpicam: Terminated after #0 restarts.
Child process 6326 died
FIFO: stop indi_rpicam -n "RPI Camera"

@kduchrow
Copy link

kduchrow commented Sep 13, 2020

Okay my Fault !
I had the Web UI in parallel working and probably blocking.
I stopt the Web UI for Raspi Cam and now the Camera is connecting instantly. I am going to test it further tomorrow .

But I got an Error while imaging see here:

2020-09-13T22:22:35: startup: /usr/bin/indiserver -v -p 7625 -m 300 -r 0 -f /tmp/indififoa4f7a3b4 
2020-09-13T22:22:35: listening to port 7625 on fd 3
FIFO: start indi_rpicam -n "RPI Camera"
With name: RPI Camera
FIFO: Starting driver indi_rpicam
2020-09-13T22:22:35: Driver indi_rpicam: pid=1772 rfd=4 wfd=7 efd=8
2020-09-13T22:22:35: Client 5: new arrival from 127.0.0.1:51016 - welcome!
2020-09-13T22:22:35: Driver indi_rpicam: snooping on Telescope Simulator.EQUATORIAL_EOD_COORD
2020-09-13T22:22:35: Driver indi_rpicam: snooping on Telescope Simulator.TELESCOPE_INFO
2020-09-13T22:22:35: Driver indi_rpicam: snooping on Telescope Simulator.GEOGRAPHIC_COORD
2020-09-13T22:22:35: Driver indi_rpicam: snooping on Telescope Simulator.TELESCOPE_PIER_SIDE
2020-09-13T22:22:35: Driver indi_rpicam: snooping on Rotator Simulator.ABS_ROTATOR_ANGLE
2020-09-13T22:22:35: Driver indi_rpicam: snooping on Focuser Simulator.ABS_FOCUS_POSITION
2020-09-13T22:22:35: Driver indi_rpicam: snooping on Focuser Simulator.FOCUS_TEMPERATURE
2020-09-13T22:22:35: Driver indi_rpicam: snooping on CCD Simulator.FILTER_SLOT
2020-09-13T22:22:35: Driver indi_rpicam: snooping on CCD Simulator.FILTER_NAME
2020-09-13T22:22:35: Driver indi_rpicam: snooping on SQM.SKY_QUALITY
2020-09-13T22:22:35: Client 6: new arrival from 127.0.0.1:51018 - welcome!
Child process 1772 died
2020-09-13T22:22:45: Driver indi_rpicam: indi_rpicam: /home/astroberry/Projects/indi-3rdparty/indi-rpicam/raw12tobayer16pipeline.cpp:45: virtual void Raw12ToBayer16Pipeline::acceptByte(uint8_t): Assertion `bcm_pipe->header.omx_data.raw_width == 6112' failed.
2020-09-13T22:22:45: Driver indi_rpicam: stderr EOF
<delProperty device="RPI Camera"/>
2020-09-13T22:22:45: Driver indi_rpicam: Terminated after #0 restarts.
FIFO: stop indi_rpicam -n "RPI Camera"

----------------------------- Update! ------------------------

Second my Fault. I had not completely removed the old config. I saw this, because the log showed, my camera is using the wrong library. After removing all old project data and a rebuild, I got it working and I can take pictures.
BUT: The Picture is only gray, as you can see here :
grafik

@lboclboc
Copy link
Contributor

That is strange, can you upload the fits file you think? Also, do you have the automatic debayer option turned on i kstars?

@kduchrow
Copy link

No i haven't. I turned it on, and i looks like it is working.
I haven't enought time to get a proper fokus, but I have two testimages.
I will test it further today eve.
Test_Images.zip

@lboclboc
Copy link
Contributor

Ok, in the second image I can clearly see the bayer raster indicating that the image is really being fetched from the camera ok but its very dark. Can you try to increase the exposure time and/or gain perhaps?
(sorry for asking but of course you don't have the lens cap on?)

@kduchrow
Copy link

Hi,
yes I removed the lens cap.
I had some trouble with the exposure setting. But I got a test picture that might help.
Light_001.zip

Changing exposue time and gain looks also good. It is not possible to change the ISO is this right ?
Furthermore the image is only in grayscale or do i using the wrong viewer or do I need to configure it?

P.S. : It would be very nice if there is a liveview possible maybe in lower resolution?

@lboclboc
Copy link
Contributor

lboclboc commented Sep 14, 2020

The reason you image is grayscale is probably because you have not turned on the "automatic debayer" in kstars, so you see the BGGR pixels with their values in grayscale only.
I agree about liveview but I am not sure how that should work with INDI and kstars. The uploading of a whole raw picture for sure takes a long time.

@lboclboc
Copy link
Contributor

I think this ticket can be closed now.

@knro knro closed this as completed Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants