Skip to content

matthewnaruzny/ws_sim868

Repository files navigation

ws_sim868

Interface module for the Waveshare GSM/GPRS/GNSS Pi Hat

PyPI - License GitHub Actions Workflow Status PyPI - Version

Features

  • HTTP GET and POST requests
  • Automatically start Modem if turned off
  • Receive GNSS Location

Instalation

pip install ws-sim868

Overview

Examples:

HTTP Get Request

from ws_sim868.modemUnit import ModemUnit
import time

if __name__ == "__main__":
    m = ModemUnit()
    m.apn_config('super', '', '')
    m.network_start()
    res = m.http_get("http://example.com")
    print(res)

    while True:
        time.sleep(0.5)

Get Location

from ws_sim868.modemUnit import ModemUnit
import time

if __name__ == "__main__":
    m = ModemUnit()
    m.gnss_start()

    while True:
        time.sleep(3)
        print(m.get_gnss_loc())

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages