Skip to content

Connection status is unique to each instance of the sdk #42

@DomAmato

Description

@DomAmato

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfor issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions