Skip to content

MAVSDK 3.5.0 has issues with mavsdk-server and camera definition fetching #2588

Open
@rayw-dronesense

Description

@rayw-dronesense

Tried dropping prebuilt .so and header files from mavsdk_server_android-arm64.tar @ https://github.com/mavlink/MAVSDK/releases/tag/v3.5.0 into mavsdk_server and locally build, since we do not yet have a MAVSDK 3.x based Java SDK.

Ran into a couple of issues:

  • mavsdk_server_run is not returning 'true', so Java_io_mavsdk_mavsdkserver_MavsdkServer_runNative is breaking early here
        if (!mavsdk_server_run(mavsdk_server, native_connection_url, mavsdk_server_port)) {
            return false;
        }
  • bypassing this by ignoring the return value instead of returning false here, allows connecting to the drone; however, tinyxml seems to be erroring out when getting to camera definition,
2025-05-27 11:38:57.205 19034-19254 Mavsdk                  com.dronesense.pilot.blue            E  Cannot open file "/data/data/com.dronesense.pilot.blue
2025-05-27 11:38:57.205 19034-19254 Mavsdk                  com.dronesense.pilot.blue            D  Cache hit for camera_definition-ILX-LR1_Sony-65505.xml
2025-05-27 11:38:57.205 19034-19254 Mavsdk                  com.dronesense.pilot.blue            E  Failed to open "/data/data/com.dronesense.pilot.blue
2025-05-27 11:38:57.205 19034-19254 Mavsdk                  com.dronesense.pilot.blue            I  Using cached file "/data/data/com.dronesense.pilot.blue
2025-05-27 11:38:57.205 19034-19254 Mavsdk                  com.dronesense.pilot.blue            E  tinyxml2::LoadFile failed: Error=XML_ERROR_FILE_READ_ERROR ErrorID=5 (0x5) Line number=0
2025-05-27 11:38:57.205 19034-19254 Mavsdk                  com.dronesense.pilot.blue            E  Failed to load camera definition: "/data/data/com.dronesense.pilot.blue
2025-05-27 11:38:57.209 19034-19546 Mavsdk                  com.dronesense.pilot.blue            W  Invalid positive gimbal ID: 1

Same config works correctly with MAVSDK 2.14.x / MAVSDK-Java 2.1.6,

2025-05-27 12:38:30.318 29393-30509 Mavsdk                  com.dronesense.pilot.blue            I  Download file: http://192.168.144.20:80/api/payload-manager/pm/a7r_192.168.144.20_usb2-1.4.2_Sony:ILX-LR1:D516000F47CB.xml using cURL...
2025-05-27 12:38:30.318 29393-30509 Mavsdk                  com.dronesense.pilot.blue            I  Downloading camera definition from: http://192.168.144.20:80/api/payload-manager/pm/a7r_192.168.144.20_usb2-1.4.2_Sony:ILX-LR1:D516000F47CB.xml
2025-05-27 12:38:30.482 29393-30509 Mavsdk                  com.dronesense.pilot.blue            I  Downloaded file, result Success
2025-05-27 12:38:30.482 29393-30509 Mavsdk                  com.dronesense.pilot.blue            D  Successfully loaded camera definition

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions