artyom-beilis / OpenLiveStacker

Live Stacker Project - C++ backend and frontend
GNU General Public License v3.0
31 stars 3 forks source link

Unable to load Canon RP #81

Closed sharon92 closed 6 months ago

sharon92 commented 6 months ago

I get the following error for canon EOS Rp connected via OTG:

cppcms::json::bad_cast: invalid type error converting from null to number

Any chance I am doing something wrong?

I am using Android 12 on realme 7 pro.

Looking forward to use the app!

artyom-beilis commented 6 months ago

1st of all make sure you set the camera to manual mode "M".

https://github.com/artyom-beilis/OpenLiveStacker/wiki/Open-Live-Stacker-Manual#dslrgphoto2

Once you open camera it should make a single shot to get frame format information.

artyom-beilis commented 6 months ago

If it does not solve do following:

  1. close app, disconnect camera
  2. restart app
  3. check "enable camera debugging"
  4. connect DSLR in M mode
  5. open camera with gphoto and open the camera
  6. select format if appears, press stream

Now get the logs from: Android/media/org.openlivestacker/OpenLiveStacker/debug/

sharon92 commented 6 months ago

@artyom-beilis Log.txt1

2024-01-02 23:27:28; cppcms_http, info: POST /api/camera (http_api.cpp:294) 2024-01-02 23:27:28; stacker, info: GOT: { "id" : null, "operation" : "open" } (ctl_app.h:29) 2024-01-02 23:27:34; cppcms_http, info: Timeout on connection for URI: unknown from (http_api.cpp:185)

Log.txt

2024-01-02 23:28:32; ols, info: Service created (android_main.cpp:74) 2024-01-02 23:28:32; ols, info: Starting service (android_main.cpp:92) 2024-01-02 23:28:32; cppcms, warning: The default system locale is 'C', the encoding is set to US-ASCII. It is recommended to specify the locale name explicitly (service.cpp:973) 2024-01-02 23:28:32; cppcms_http, info: GET /?lat=15,46&lon=73,80&android_view=1 (http_api.cpp:294) 2024-01-02 23:28:32; cppcms_http, info: GET /media/css/style.css (http_api.cpp:294) 2024-01-02 23:28:33; cppcms_http, info: GET /media/js/jsdb.js (http_api.cpp:294) 2024-01-02 23:28:33; cppcms_http, info: GET /media/js/code.js (http_api.cpp:294) 2024-01-02 23:28:33; cppcms_http, info: GET /api/camera (http_api.cpp:294) 2024-01-02 23:28:33; cppcms_http, info: GET /media/img/facicon.png (http_api.cpp:294) 2024-01-02 23:28:38; cppcms_http, info: Timeout on connection for URI: unknown from (http_api.cpp:185) 2024-01-02 23:28:39; cppcms_http, info: Timeout on connection for URI: unknown from (http_api.cpp:185) 2024-01-02 23:28:39; cppcms_http, info: Timeout on connection for URI: unknown from (http_api.cpp:185)

Gphoto

GP2 LOG:gp_port_open:Opening USB port... GP2 LOG:gp_libusb1_open:() GP2 LOG:gp_libusb1_open:claiming interface 0 GP2 LOG:gp_libusb1_open [libusb1.c:510]:'libusb_claim_interface (port->pl->dh, port->settings.usb.interface)' failed: Resource busy (-6) GP2 LOG:gp_port_set_error [gphoto2-port.c:1191]:Could not claim interface 0 (Device or resource busy). Make sure no other program (gvfs-gphoto2-volume-monitor) or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device. GP2 LOG:gp_camera_free:Freeing camera... GP2 LOG:gp_port_free:Freeing port... GP2 LOG:gp_port_close:Closing port... GP2 LOG:gp_filesystem_reset:resetting filesystem GP2 LOG:gp_filesystem_lru_clear:Clearing fscache LRU list... GP2 LOG:gp_filesystem_lru_clear:fscache LRU list already empty GP2 LOG:delete_all_folders:Internally deleting all folders from '/'... GP2 LOG:lookup_folder:Lookup folder '/'... GP2 LOG:lookup_folder:Found! / is 0xb40000769cd52250 GP2 LOG:recurse_delete_folder:Recurse delete folder 0xb40000769cd52250// GP2 LOG:delete_all_files:Delete all files in folder 0xb40000769cd52250//

artyom-beilis commented 6 months ago

This is the key:

GP2 LOG:gp_port_set_error [gphoto2-port.c:1191]:Could not claim interface 0 (Device or resource busy). Make sure no other program (gvfs-gphoto2-volume-monitor) or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.

Looks like either something else uses the camera can it be auto start by other app?

sharon92 commented 6 months ago

@artyom-beilis there is a pop up message which asks if I should allow the camera to access my storage. I ignored it this time and now it works!

artyom-beilis commented 6 months ago

Excellent. I think I need to add this to wiki!

sharon92 commented 6 months ago

@artyom-beilis thanks I am really excited to test it on the dark sky mountains next week!

artyom-beilis commented 6 months ago

Documentation is updated: https://github.com/artyom-beilis/OpenLiveStacker/wiki/Open-Live-Stacker-Manual#dslrgphoto2

Thanks for detailed report!

I am really excited to test it on the dark sky mountains next week!

I strongly recommend to get used to the app before you get to dark location - so you know how to use it, set controls properly use stacking configuration, histogram, etc.

Every stacking software has its learning curve

sharon92 commented 6 months ago

Yes I have been going through it. Does it require tracking equipment? From the docs it seems so, I was hoping that OLS also aligns the images.

artyom-beilis commented 6 months ago

I was hoping that OLS also aligns the images.

It does. And you don't have to use tracking mount. But of course it limits max exposure time you can use. But more than feasable with short focal lengths or high binning.

sharon92 commented 6 months ago

Cool! I will try 10s exposures over 1 hour with 35mm lens :) Will try testing it tonight in the city lights to get the feel :)

sharon92 commented 6 months ago

@artyom-beilis I made a post here https://www.reddit.com/r/astrophotography/s/TKxAtBqfUy