Questions regarding Fota Example in Multitech Github site.

Home Forums mDot/xDot Questions regarding Fota Example in Multitech Github site.

Tagged: , ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31677
    Ajay K
    Participant

    I was hoping to get a bit of understanding on the what the timeToStart method could return in the code below.

    1) What does this method return when no FOTA transmission is yet queued on the conduit?

    2) Also what is the largest value timeToStart method can return and this question is more with regards to managing sleep cycles or thread sleep period for the main thread, since we use Watchdog timer.

    3) I am assuming when timeToStart method returns zero, I am assuming it stays zero until the FOTA transfer is complete or the FOTA transfer times out? Is the mdot only going to switch to Class C Mode when this method return a zero value?

    4) Finally is 5 minutes the ideal time to do uplink transmits during FOTA transfers based on the fota example or is it better to avoid uplinks altogether for a smooth FOTA transfer?

    // the Dot can't sleep in class C mode
     // it must be waiting for data from the gateway
     // send data every 30s
     if (Fota::getInstance()->timeToStart() != 0) {
         logInfo("waiting for 30s");
         ThisThread::sleep_for(30s);
     } else {
       // Reduce uplinks during FOTA, dot cannot receive while transmitting
       // Too many lost packets will cause FOTA to fail
       logInfo("FOTA starting in %d seconds", Fota::getInstance()->timeToStart());
       logInfo("waiting for 300s");
       ThisThread::sleep_for(300s);
     }

    Thanks,
    Ajay

    #31678
    Ajay K
    Participant

    Any thoughts multitech team?

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.