Coder Social home page Coder Social logo

Comments (2)

pablo18393 avatar pablo18393 commented on June 6, 2024 1

Hello @MathewHDYT ,
thank you for the detailed explanation, it is very helpful.
I defined the OTA callback as you said, the issue is no longer happening (I tried 20 times with no issues).
Have a Merry Christmas.
Regards

from thingsboard-client-sdk.

MathewHDYT avatar MathewHDYT commented on June 6, 2024

The re-connection attempts are not made by the library, but in the aforementioned example the re-connection attempts have to be made by the user utilizing the library.

In the case of the example it is the main method which reconnects. This is the case because reconnecting is different for every device and reconnecting directly in the library would be very hard and bug prone to implement and not really have a real advantage.

For now would it be possible to adjust the internal timeout in the OTA_Callback .

const OTA_Update_Callback callback(&progressCallback, &updatedCallback, CURRENT_FIRMWARE_TITLE, CURRENT_FIRMWARE_VERSION, &updater, 20, FIRMWARE_PACKET_SIZE, 10U * 1000U * 1000U);

This will wait 10 seconds between each rerequest of the same chunk if it failed and attempts to download the same chunk 20 times.

While that is happening ensure that the connection is attempted, if you are using the example it should print Connecting to: demo.thingsboard with token.

from thingsboard-client-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.