Skip to content
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

Missing Chunks and Payload Offset Errors During Download. Cannot download any files completely using MAVSDK Java in android studio. #2474

Open
AtiqAakash opened this issue Dec 17, 2024 · 6 comments

Comments

@AtiqAakash
Copy link

AtiqAakash commented Dec 17, 2024

Title: Missing Chunks and Payload Offset Errors During Download

Description:

I'm trying to make an android app to download the log files from the cubepilot. So I tried the mavsdk examples for downloading log file. I also tried mavsdk ftp to download any files located in the cube. But cannot download any file completely.

I'm experiencing an issue with payload offsets and missing chunks during the download process in our app using MAVSDK. Specifically, I'm seeing discrepancies in the payload offsets, with the warning message:

io.mavsdk.androidclient W Got payload offset: 4541, next offset: 5736

------ and then never downloads the next offset.

Additionally, we are getting missing chunk errors that seem to occur during the download of data.

Expected Behavior:

The download process should handle the payloads correctly, with consistent offsets and no missing chunks during the data transfer.

Actual Behavior:

The payload offsets are inconsistent, and there are missing chunks, resulting in errors and incomplete downloads.

payload offset
erros

I'm trying the app in herelink controller.

Any help or insight into resolving this issue would be greatly appreciated!

@julianoes
Copy link
Collaborator

Thanks for the issue.

I'm trying to make an android app to download the log files from the cubepilot.

I will have to try to reproduce this, so I need to replicate your setup. Can you tell me what software you run on the CubePilot and what version and how you connect to it?

@AtiqAakash
Copy link
Author

AtiqAakash commented Dec 18, 2024

Thank you for your reply and for looking into this issue. Here are the details of my setup:

  1. CubePilot Software and Version:

    • I am using the CubePilot Orange Plus
    • Firmware: PX4 versions tested include:
      • 1.14.0
      • 1.15.0
      • 1.15.2
  2. Connection Details:

    • I am connecting to the CubePilot using a Herelink controller.
    • The Herelink runs Android 7.1.2.
  3. Android App Details:

    • App developed with MAVSDK version 2.1.0 and MAVSDK server version 2.1.13.
    • Minimum SDK version: 21.
    • Using Java for development.

I can also paste my code here if that would help you debug further. Please note that I’m completely new to Android development and Java, so it’s possible I might have implemented something incorrectly. Your guidance would be greatly appreciated!

@julianoes
Copy link
Collaborator

Thanks for the info! I suspect this is within the C++ library, so I'll try to reproduce without Herelink first and then add more things in if required.

@julianoes
Copy link
Collaborator

julianoes commented Dec 19, 2024

Trying to reproduce this, so downloading some ulog files with PX4 v1.15.3+, on main branch:

  • Pixhawk connected via USB: ✔️
  • Pixhawk Telem1 connected via FTDI cable at 57600 baudrate: ✔️
  • Pixhawk Telem1 via SiK radio: ✔️
  • Pixhawk Telem1 via Herelink -> Tethering back to desktop: ✔️

Now, on v2 branch:

  • Pixhawk Telem1 via Herelink -> Tethering back to desktop: ✔️

I'm wondering what version you're exactly using:

MAVSDK server version 2.1.13

This version doesn't exist. Given you're MAVSDK-Java version is 2.1.0 would mean that you're likely on server v2.12.2

The last fix I can see would be:
#2235
which went into v2.5.0, so you should have that one.

I'm not sure what exactly is going on to be honest 😕.

I would suggest that you try with the latest version of MAVSDK-Java which updates mavsdk_server under the hood. If it still happens there, it would be great if you could create a small example (can be a fork of the MAVSDK-Java example) for me to run and debug on Herelink. Thanks.

@AtiqAakash
Copy link
Author

Hello Julianoes,

Thank you so much for your super fast effort!

I'll definitely try that and update you. Unfortunately this is my last day at office before the vacation and all my development environment is in the office. So unfortunately I have to try this and update you next year.

Til then happy christmas!

@julianoes
Copy link
Collaborator

No worries, happy holidays!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants