I’ve found the best approach for debugging these issues is to start removing dependencies (largest to smallest) until you see the behaviour you want (even better if you have an automated spec/unit test). After that you can investigate the dependency in isolation. I would start by removing the dependency on the AirVantage service by removing calls to
le_avdata (or you could mock them out with simple print routines).
If you have unit tests, I would suggest making a new
git branch where you remove one dependency in each commit. Then you can use
git bisect to run your tests against each of these commits and identify when things are within the spec again.
Pay close attention to which services are connecting/disconnecting and in what order. There is command to essentially perform an
ls of all service connections/bindings (different from
app status) along with their state (running, stopped etc). I can’t recall this command but perhaps @dfrey or an old forum post could show it.