Package: python-gsmmodem-stk
GSM modem module for Pythonpython-gsmmodem is a module that allows easy control of a GSM modem attached
to the system. It also includes a couple of useful commandline utilities for
interacting with a GSM modem.Its features include:simple methods for sending SMS messages, checking signal level, etceasy-to-use API for starting and responding to USSD sessions and making voice
callshandling incoming phone calls and received SMS messages via callback methodssupport for SMS PDU and text modesupport for tracking SMS status reportswraps AT command errors into Python exceptions by defaultmodular design; you easily issue your own AT commands to the modem (with
error  checking), or read/write directly from/to the modem if you prefercomprehensive test suiteBundled utilities:GSMTerm: an easy-to-use serial terminal for communicating with an
attached GSM modem. It features command completion, built-in help for many AT
commands, history, context-aware prompt, etc.sendsms.py: a simple command line script to send SMS messagesidentify-modem.py: simple utility to identify attached modem. Can also be
used to provide debug information used for development of python-gsmmodem.How to use this packageGo toexamples/directory in this repo.RequirementsPython 3.3 or laterpySerialHow to install this packageThere are multiple ways to installpython-gsmmodem-stkpackage:Automatic installation of the latest “stable” release from PyPIpip install python-gsmmodem-stkpipwill automatically download and install
all dependencies, as required. You can also utiliseeasy_installin the
same manner as usingpipabove.If you are utilisingpython-gsmmodem-stkas part of another project,
add it to yourinstall_requiressection of yoursetup.pyfile and
upon your project’s installation, it will be pulled in automatically.Manual installation of the latest “stable” release from PyPIDownload apython-gsmmodem-stkarchive fromPyPI, extract it and install the package with command:python setup.py installNote thatpython-gsmmodem-stkpackage relies onpySerialfor serial communications:https://github.com/pyserial/pyserialInstallation of the latest commit from GitHubClone from GitHub:git clone https://github.com/strokovnjaka/python-gsmmodem.git
cd python-gsmmodem/
python setup.py installNote thatpython-gsmmodem-stkpackage relies onpySerialfor serial communications:https://github.com/pyserial/pyserialTesting the packageTo run all unit tests, do:python setup.py testUnit test code coverage information may be generated by usingcoverage. You can execute it directly from
setup.py by doing:python setup.py coverageThis will run all unit tests and report on code coverage statistics.Building documentationThis package containsSphinx-based documentation.
To manually build or test the documentation locally, do the following:git clone https://github.com/strokovnjaka/python-gsmmodem.git
cd python-gsmmodem
pip install .[doc]
cd doc
make htmlFor true isolation, you may wish to run the above commands within avirtualenv, which will help you manage
this development installation.License informationCopyright (C) 2013 Francois Aucamp
See AUTHORS for all authors and contact information.License: GNU Lesser General Public License, version 3 or later; see COPYINGincluded in this archive for details.FAQList all modem portsYou can simply list all ttyUSB devices before and after pluging the modem in.ls /dev/ttyUSB*Device or resource busy errorCheck running processes. The device could be occupied by another program or another instance of gsmmodem which is still running in the background. Runsudo lsof | grep tty, try to locate the problematic process andsudo kill <PID>.