-
Notifications
You must be signed in to change notification settings - Fork 214
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
Driver indi_pentax: select: Bad file descriptor #775
Comments
Quick update... I updated Kstars to -git and indilib to -git version from the Arch Linux AUR. Initially I had trouble with both my Nikon and Pentax cameras as EKOS logs showed that the drivers couldn't not start. It turns out that one problem seemed to stem from claiming the USB port in the machine. I solved this by unmounting the SD cards which it seems got auto mounted. <- this is an OS thing that I should probably disable in the future In the log file for the Pentax Native Driver test I get the same thing:
Using the Legacy Driver, these appear in the logs:
I don't recall which driver I tested or mode I was in with the camera but I have also got logs containing this:
The camera is a Pentax K1 mkII which used to work both in MSC and PTP modes. Now, each mode has seems to be having issues |
I get |
@karlrees Can you please check this issue? Is it possible to have this driver running under arm64 given the external dependencies? We need amd64 and arm64 builds at least. |
It's been a long time since I looked at the code. I had thought it was working with arm64, but maybe something changed. What probably needs to happen for arm64 is that the indi-pentax driver needs to be told not to look for the libricohcamerasdk library (which was used for PTP mode), and to expect only to be able to use the pktriggercord-based library (for MSC mode only). |
Given that PTP mode is no longer maintained (if I understood correctly), maybe the driver can be updated to only operate with pktriggercoord ? |
I installed on arm64 tonight, and the bad file descriptor message is actually unrelated to PTP mode. The driver will try to connect to PTP mode first, and then if it cannot connect (or if the library is unavailable), it tries MSC mode. If it still cannot connect, it is supposed to then give an error message suggesting that the user switch the camera to MSC mode, and be done. Unfortunately, what happens instead is that after giving the error message, it starts spurting out so many bad file descriptor errors that the original error message is never seen. I will dig in more closely to see what happens. In the interim, I can confirm that the messages do not appear if you are already connected via MSC mode when you start the driver. |
Thank you for the update @karlrees Hopefully a fix can be released soon! |
I think I solved it - looks like a memory deallocation problem with the libpktriggercord driver. On the plus side, there are a few minor enhancements that I'll pull into the libpktriggercord driver as well. Hopefully I'll have time to do it all this weekend. |
@karlrees Any update on this issue? |
Probably I found a solution for K1 II too in #936 Should be a common problem with ioctl and if so it may be fixed with |
Ok that's a workaround but users would have to apply this directly. There is no way to do this programatically within the driver without escalated privileges? |
Investigating this now. Looks like it's possible to run |
Well, it was fast actually. Put it in CMakeLists here: 03ca7ca |
Describe the bug
As the title says: bad file descriptor; KStars/EKOS unable to connect to my Pentax K1 II camera
To Reproduce
Follow instructions on the README.md file to install
Expected behavior
Connection to camera and EKOS control
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Log Files
The text was updated successfully, but these errors were encountered: