Skip to main content

python wrapper for the em73xx series of 4G modems present in recent Lenovo Thinkpads

Project description

Python utility to interact with the telephone functionality of the Sierra Wireless EM73xx modems, present in Lenovo Thinkpads (tested on a Thinkpad X250) and possibly others.

Install

Either retrieve from pypi using pip:

$ pip install em73xx

or clone this repo, and install using setup.py:

$ git clone https://github.com/smcl/py-em73xx
$ cd py-em73xx
$ python setup.py install

Documentation

(TODO, haha!)

Examples

Find which device the modem using the find_device.sh script - here it’s /dev/ttyACM0:

$ ./find_device.sh
/dev/ttyACM0 - Sierra_Wireless_Inc._Sierra_Wireless_EM7345_4G_LTE_013937006578445
/dev/input/event14 - SunplusIT_Inc_Integrated_Camera
/dev/video0 - SunplusIT_Inc_Integrated_Camera

Initialising the modem:

from em73xx import Modem

em7345 = Modem("/dev/ttyACM0", pin="1234", debug=True)

receiving/reading SMS messages:

messages = em7345.getSMS()

sending an SMS message:

em7345.sendSMS("775123456", "test message from em73xx!")

getting a GPS fix (None returned if failed):

gps = em7345.getGPS()
if gps:
    print(gps.latitude)
    print(gps.longitude)

TODO

  • write documentation - methods, types, etc

  • add more functionality, sms and gps alone won’t cut it. poking around with the at commands text file in /docs should help

  • there’s heaps of info returned by the XLCSLSR command, investigate if there’s anything useful we can provide

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

em73xx-0.10.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file em73xx-0.10.tar.gz.

File metadata

  • Download URL: em73xx-0.10.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for em73xx-0.10.tar.gz
Algorithm Hash digest
SHA256 dcb6a0bee39fad34468e9586a0f0b92b19c3191ac87a1078c9b53dc4515e3f76
MD5 ee8c7309fdd9cef49c4f14690d0ba8e8
BLAKE2b-256 902ab70d7a7f66a2514176dec6c1445e17295aaa5c7591241260119f5ac2e864

See more details on using hashes here.

Supported by

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