Closed m-kostrzewa closed 3 years ago
I think the event handling in indi should cope with 1 or more images being added, which can happen if you do triggering outside of the usb protocol, (or even if someone presses the shutter button).
@m-kostrzewa Thank you for the detailed report!
@msmeissn I'm trying to do that now, but it appears that some cameras (e.g. my Canon 600D) the event GP_EVENT_CAPTURE_COMPLETE is never received while it is triggered for Nikon 3500D. Can you please check gphoto_read_exposure_fd and see what we're doing wrong? Right now the function returns after GP_EVENT_FILE_ADDED which works for the majority of cameras.
@m-kostrzewa Can you please apply this patch and see if it works in your case?
CAPTURE_COMPLETE is not reliable sadly. I would poll events with a short timeout and see if I get a GP_EVENT_TIMEOUT timeout back if I not expecting more pictures.
@msmeissn This is exactly what I did in the patch above! Will wait for @m-kostrzewa to test it out. Thank you for the feedback.
@knro thanks for swift reply. I tested your patch on sequences of 1sec and 15sec exposures. Works great.
@m-kostrzewa does it work for 30+ sec exposures as well?
@msmeissn This is exactly what I did in the patch above! Will wait for @m-kostrzewa to test it out. Thank you for the feedback.
Ah yes, looks good. :)
@knro tested on sequence of 60 sec exposures, it works
@k-ross tested it tonight on sequences of 180, 300, 600sec exposures. I've encountered some hiccups. Good news is that the happy path works great, and I think this bug is resolved.
The hiccups I encountered were mostly "sad path" edge cases. Some were encountered because I prefer to focus the camera using mobile phone WiFi app. When I'm done I turn the app off and reconnect INDI driver. There were also instances where Ekos sequence aborts/pauses made the camera "stuck". I haven't debugged it too much nor marked the logs in any way though... When I encounter these issues again I will report them properly. Here's my memory dump:
But as I said, I think this bug is mostly resolved. Thanks.
Hi guys , If someone would be able to explain how to 'patch' this problem that would be great! Because I am facing exact the same problem (with sony alpha a5000) and the only thread I found on internet is here. The problem is the same: ekos only donwloads every second photo and sometime , on start hangs with the first one.
Long time since I did the hack but here is the links I used then: https://github.com/ma1co/Sony-PMCA-RE/releases/tag/v0.17 https://github.com/ma1co/OpenMemories-Tweak/issues/169 Happy hacking :-)
@kleb0nas12
I built it manually months ago and can't remember the details, but the overall structure of what needs to be done is as follows
git apply
to apply code patch from the .zip filemake asdfasfasdf
command. This is also described in some README file in some repo.It's kinda cumbersome. If you have software development/IT experience it should help. Even then, building such big project for the first time is often frustrating :) and takes some time. If you hit any road blockers, don't be afraid to ask
Ideally, @knro merges his patch and it is released officially in newer version soon. But I imagine it's a breaking change for some other camera models. @knro what is stopping you from merging your patch?
Actually, as https://github.com/indilib/indi-3rdparty/issues/230 noticed, this patch is already merged to main branch.
So just needs to download the newest version of indi driver, @kleb0nas12
@knro may I close this issue?
I am using up-to-date indi drivers (sudo apt update doens't update/upgrade indi drivers?)
Right INDI packages already have this in. Check that you have INDI v1.8.7 installed.
Hello, I have the same problem with my Sony A7S. I'm new to open solutions and run an astroberry version on PI 4 under Raspberry OS. How can I be sure that my Indi version is the good one?
Thanks J. Ferraro Paris
Show apt list --installed
, look for indi
If version is too low, try
sudo apt-get update && apt-get upgrade
If version is still too low, report back. I haven't tried this yet :)
Thanks for you response... the first one since I try to solve this problem ! here is a capture for apt list --installed
And the same command after apt-get update && apt-get upgrade It's sounds to me that I don't have 1.8.7 version in both case
G. Ferraro
Hmm.. maybe newest version is not in apt repository yet...
In this case, you must build the software yourself.
Try following https://github.com/indilib/indi-3rdparty#building-individual-3rd-party-drivers-typically-recommended. However, instead of indi-eqmod, use indi-gphoto everywhere.
Remember, to
git clone --depth=1 https://github.com/indilib/indi-3rdparty
sudo apt-get install libnova-dev libcfitsio-dev libusb-1.0-0-dev zlib1g-dev libgsl-dev build-essential cmake git libjpeg-dev libcurl4-gnutls-dev libtiff-dev libftdi-dev libgps-dev libraw-dev libdc1394-22-dev libgphoto2-dev libboost-dev libboost-regex-dev librtlsdr-dev liblimesuite-dev libftdi1-dev
first
If you encounter problems let me know, I'll try to help
Thanks a lot. I put a request in the Astroberry section of the Indi Forum. I would prefer an official package... We have a forecast of 10 days raining here in Paris... and If needed I can use an ascom driver under widows!
G. Ferraro
Yes indeed. I reinstalled INDI on my raspberry pi , and it still 1.8.6
I open an issue in the astroberry section of the INDI forum, but I receive no reply. Perhaps it is due to the new year vacations?
G. Ferraro
I don't know, but there is still the same 1.8.6 version.
Describe the bug
I have Sony Alpha A5000 (ILCE-5000).
Only about every 3rd exposure done by Ekos using indi_sony_ccd driver actually moves the shutter and captures new data. Other exposures don't cause the shutter to open or close, and stale data is downloaded as preview (from the successful exposure).
I have investigated this issue and provide a hack/patch that works for me.
Additional keywords: freeze, frozen, stuck,
To Reproduce
Reproduce it using Kstars+Ekos.
In profile editor, add Sony DSLR device. I have Sony Alpha a5000 (ILCE-5000) connected via USB in PC direct mode. Run the profile.
Note, that no error is reported here.
This may or may not be relevant, but I also disabled LENR via telnet like so: https://github.com/ma1co/OpenMemories-Tweak/issues/205 This requires installing OpenMemories Tweak app on the camera itself. I initially suspected it to be the problem, but even though this hack works (LENR is disabled), it didn't solve this issue. I'm not sure if it is required for my patch to work.
During the investigationI ran some gphoto2 commands to try to replicate the issue manually:
You may notice, that even though I grab only one image, two files are downloaded (capt0000.arw and capt0001.arw). Sometimes it is1 file, sometimes 3, depending on the sequence of actions before. I can also run another pair of commands like above (bulb=1/bulb=0) immediately after without it getting stuck. This made me suspect that the issue is not withing libgphoto2, but with the indi driver. I thought that maybe the indi driver doesn't handle the situation where there are multiple files to be downloaded.
I have no idea why multiple files are generated to begin with. If someone could enlighten me, I'd appreciate it.
Expected behavior
Each preview should match the exposure. Each exposure should actually open/close the shutter and grab new data.
The following patch fixes the issue.
Desktop (please complete the following information):
Log Files
original logs
log_bugged.txt.
One of many original logs. I may have done some aborts in this log file so you may encounter some junk, however it's not the cause of the problem :) Here's the important bit: you will notice that only one GP_EVENT_FILE_ADDED event is handled per exposure. After it's handled, the control is returned to the caller. This means, that only one file can be downloaded per exposure. So the case of multiple files per exposure is not handled correctly.
For some reason, until all queued up files are downloaded, the shutter doesn't work.
Sometimes when I pressed some button on the camera at this moment, I would get the error message "writing to memory card unable to operate". I disabled saving to SD card via Ekos interface but it didn't help. So I suspect what the error message really means is "Waiting for client to handle all GP_EVENT_FILE_ADDED events".
To drain the queue, I have to schedule multiple exposures. Note, that even though "Starting exposure" log is produced, there's no shutter sound in most cases.
Excerpts:
logs after patch
log_patched.txt
After applying the aforementioned patch: all the files to be downloaded (GP_EVENT_FILE_ADDED events) are 'drained' until GP_EVENT_CAPTURE_COMPLETE. The last file's data is the one passed to the caller. Driver works as expected.
I was inspired by this comment: https://github.com/gphoto/gphoto2/issues/48#issuecomment-294225211
Excerpt: