Insta360Develop / CameraSDK-Cpp

CameraSDK-Cpp is a C++ library to control Insta360 cameras.
https://www.insta360.com
115 stars 16 forks source link

OneRS - SDK - GetAvailableDevices() not working #23

Closed fgeorges56 closed 1 year ago

fgeorges56 commented 1 year ago

Hi, I'm working with the OneRS. My computer has Ubuntu 22.04 Firmware version = 2.0.8.4 Settings > USB mode > Android It is connected to my computer via the original cable.

I'm trying to detect the camera via the SDK. I downloaded it here : https://www.insta360.com/fr/sdk/record linux version. Unfortunately, it seems the function ins_camera::DeviceDiscovery.GetAvailableDevices() returns nothing.

I call it in a script test_camera.cc

#include <iostream>
#include <camera/device_discovery.h>

int main(int argc, char* argv[]) {
    ins_camera::DeviceDiscovery discovery;
    auto list = discovery.GetAvailableDevices();
    std::cout << "device_count: " << list.size() << std::endl;
    for(int i = 0; i < list.size(); ++i) {
        std::cout << "device:" << list[i].serial_number << std::endl;
    }
    std::cout << "The end." << std::endl;
}

I compile it this way : g++ -I ./include ./example/test_camera.cc -Llib -Wl,-rpath,lib -lCameraSDK -ludev -o test_camera_compiled I execute it ./test_camera_compiled The output :

device_count: 0
The end.

How can I make it detect the camera ?

fgeorges56 commented 1 year ago

Found it. Needed to be root.

if not, the camera was not "claimed"

How to see it ; sudo lshw

                 *-usb:1 UNCLAIMED
                      description: Périphérique USB générique
                      produit: Insta360 ONERS
                      fabricant: Arashi Vision
                      identifiant matériel: 2
                      information bus: usb@1:2
                      version: 0.00
                      numéro de série: IRBEN2208VADX3
                      fonctionnalités: usb-2.00
                      configuration : maxpower=2mA speed=480Mbit/s
ricardosutana commented 1 year ago

Hi @fgeorges56

I compile the main.cc to check if everything was working... however I couldn't open the video streamer ( option 10).

Do you know how visualize the image from the camera? My camera is the insta360 one RS.

fgeorges56 commented 1 year ago

@ricardosutana nope, does not work for me either.

I am afraid the SDK is not really usable, for many functions...

ricardosutana commented 1 year ago

Hi @fgeorges56 check the issue #10. I found a way to capture the live stream