Ensuring reliable cell connection and retrying?


Sierra support confirm 17.11 fixe issue with AirVantage push. My application just open a session at startup and push every xx minut.

In 17.06/17.07 I was not choice to close and restart session every 06h…

With 17.11 all work fine


Awesome, that’s good news Francis.

We just upgraded to 17.11 and that was very smooth. We have added a retry timer if our AVSession returns failed, the retry timer power cycles the radio after waiting 2 minutes, 4 mins, 8 mins, or 16 mins depending on how many retries it’s attempted. When we turn off the radio we release the session, which probably doesn’t matter, and when we turn on the radio again we force the state to ‘no connection’ again in order for our loop to validate our connection.

Hoping to test this over the next 24 hours or so on 4 MangOH red units.

A side note - we confirmed that our connections had all died after 12 hours in the past… which doesn’t seem like a coincidence. The way to get them back was to power cycle the radios on the units.


One question : what code do you use to turn on off the radio ?


I confirm for the 12 hours


@Francis.duhaut Use the le_mrc API as specified here: http://legato.io/legato-docs/latest/le__mrc__interface_8h.html


Please have a look on this topic it’s very important
It work fine for me


Legato 17.11 is not enough to solve completely your problem, modify the model app as indicate on my previous message.


@Francis.duhaut Which problem are you referring to? Keeping the device online (this topic) and getting AirVantage updates to work (the other topic you posted a link to) are completely separate concerns.


With my small experience the legato 17.11 and a modification of model app have solve all my connection problem.

With legato 17.06 and old model app I lost connection every 12h and the heartbeat was not working good.

Now all is perfect with same app.


To keep alive the connection I use the heartbeat with a small value (30mn)


Just as a heads up, we ran into a new problem overnight on one of our units… Not sure if it will appear on our other units or not, but the avPublisher claims that it ran out of memory. It may be us causing a memory leak somewhere, but this is new after our latest update to 17.11 legato.


One further thing that’s new today after upgrading to 17.11 is one of our units is succesfully publishing, but AirVantage is showing ‘no communication available’. We can see that we have the right number of data points that have been received by AV, but we just don’t see the data on the platform.


Can you copy the code used to push your data?


Hey @Francis.duhaut,

Our publishing app is derivative of this repository: https://github.com/mangOH/RedSensorToCloud. The only change we made is some retries in the AvSessionStateHandler callback.


Try to remove your retry in the Handler
How is set the hearbeat on the system (frequency) ? Try with a Hearbeat set to 01H without retry


Hey Francis - we updated our heartbeat and that appeared to have solved our problem! I believe that since we had not set the heartbeat the MangOH was sending ‘register update’ every second since it didn’t have a default set. We changed our heartbeat to 20 minutes and now we have had systems online for almost 4 days.

Thanks very much!



Good news if the heartbeat solve your problem.
For information 2 thing are missing in legato source on github:

atAirvantage and atQmiLinker are missing and this app are not included into the final build.

This app are in charge of at command for AirVantage (AT+WDSC AT+WDSI). Included the AT command to set the heartbeat.

If some people are interested I have a cwe binary for legato 17.11 included this 2 app (for wp85)


Looks like we are still having some issues here. The heartbeat seemed to have helped us, but all of our units (4 of them at different times in 24 hrs) have begun going offline again. The units seem to be stuck in some infinite loop of trying to register to the network after every heartbeat. @dclark75 @dfrey - should I consider eliminating whatever service does this? Or am I stuck with having a timer that reboots the unit every 6 hours for safety’s sake - we have our first proof of concept deployment on Friday.



I am going to test with this on some more and see why you are seeing communication stop - If you have any logs (from using logread -f) feel free to pass those along. For now you can go in AV and select the Configure communication and turn off the heartbeat for now. With this setting off i was having no problems for weeks around xmas with AV communication. I will let u know here when/if i find any bugs with AV communication with the heartbeat enabled.


Thanks @dclark75.

We have run into another problem with our connection to AV, which may be related to the heartbeat… We get Registration Expired, which kills our units (also makes it impossible to do remote reboots).


We have added a ‘kicker’ app that reboots the hardware every 6hrs now so that we can avoid these kind of hiccups.