Skip to main content

Python package to control the Waveshare GSM/GPRS/GNSS Pi HAT

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ws_sim868-1.0.0b2.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

ws_sim868-1.0.0b2-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page