Ensuring reliable cell connection and retrying?


#6

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


#7

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.


#8

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


#9

I confirm for the 12 hours


#10

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


#11

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


#12

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


#13

@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.


#14

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.


#15

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


#16

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.


#17

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.


#18

Can you copy the code used to push your data?


#19

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.


#20

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


#21

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!


#22

Hello

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)


#23

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.


#24

Brandon,

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.


#25

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).

image

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