Closed laheller closed 1 year ago
You can't.
I open the camera in Java API first and than assume it is open in C++ API - using same device id. (Since Java uses same library under the hood it works)
Java
And I pass extracted CamID (actually same 0) to C++ code
Here I assume it is open: https://github.com/artyom-beilis/OpenLiveStacker/blob/main/src/asi_camera.cpp#L543
@artyom-beilis
Hm, that's weird. I mean that we cannot pass the FD. In the meantime I decompiled their zwocamera.jar Java library using the Jadx Gui tool and there is something about the FD in the Java Source:
Basically they provide the ASIUSBManager.getUSB( ) static method, but I was not able to found any reference to this method, so it is really a big question to me, what they do with the FD and how the pass it to the native API. But obviously they must somewhere/somehow pass it, otherwise the native API cannot access the USB device...
1st of all take the SDK they gave me at the forum: https://bbs.astronomy-imaging-camera.com/d/16533-general-error-on-attept-to-open-asi120-camera-on-some-devices/2
Official one is broken.
2nd there is no way to pass FD - just open camera from app directly and than use opened camera from C++
@artyom-beilis Thank you!
Hi @artyom-beilis
Just a question: In the Android application if you want to call ZWO API from C++, how do you pass the USB device file descriptor to the native API ? I am developing my own application and currently I am stuck with this issue.
Best Regards,
Ladislav