hologram-python icon indicating copy to clipboard operation
hologram-python copied to clipboard

Connection status is unique to each instance of the sdk

Open DomAmato opened this issue 5 years ago • 0 comments
trafficstars

Describe the problem

If you were to create two instances of the HologramCloud object and connect with one of them one would show a status of CLOUD_CONNECTED and the other would be CLOUD_DISCONNECTED. While its a contrived example we should be smarter about monitoring the actual state. We also have unreachable states because nothing changes the status outside of the connect and disconnect functions and neither of them does anything with error handling

Expected behavior

If possible doing network.getConnectionStatus() should return the current connection status through a more involved process. Because some modems have a single serial connection querying them during a PPP session might not be possible be we could also check for an active PPP session and query the ppp0 interface to determine the status more reasonably.

Actual behavior

If you connect outside a script it will just return 0 because the status value is instanced

Steps to reproduce the behavior

Do sudo hologram connect run a script that tries to query the connection status

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • Python SDK installed via PyPI or GitHub:
  • SDK version (use command below):
  • Python version:
  • Hardware (modem) model:

DomAmato avatar Jul 11 '20 01:07 DomAmato