Ringbeller IoT Modem Library
Project description
Ringbeller IoT - Python bindings
Prerequisites
Requirements:
- Raspberry Pi OS (Buster)
- Python3.7
Install dependencies
# Install SWIG and dependencies
$ sudo apt-get install -y swig python3.7 python3.7-dev
# Install python dependencies
$ python3.7 -m pip install --user --upgrade pip setuptools wheel twine
# Install audio packages
$ sudo apt-get install -y libasound2-dev libsndfile1-dev
Installation
# Local installation
$ make install
# Installation via PyPI
$ pip3 install --upgrade rbIotModem
Usage
# Import modem library.
from rbIotModem import rbIotModem
# Instantiate modem library.
ec25 = rbIotModem.EC25()
API
This module exposes the following functions
-
ec25.initialize(int verbose, bool debug, string serialPort, string audioDevice)
Setverbose
logging level.
Setdebug
simulation value.
SetserialPort
name.
(Optional) Set input/outputaudioDevice
name. -
ec25.on()
Turns on and connects to the modem. -
ec25.off()
Turns off modem. -
ec25.restart()
Restarts modem. -
ec25.connect()
Connects to the modem. -
ec25.disconnect()
Disconnects from the modem. -
ec25.configure()
Turns on modem.
Connects to the modem.
Configures modem. -
ec25.sendSMS(string number, string message)
Sends an SMS containingmessage
tonumber
. -
ec25.receiveSMS()
Returnssms
with unread SMS. -
ec25.placeVoiceCall(string number)
Places an outgoing voice call tonumber
. -
ec25.receiveVoiceCall()
Receives an incoming voice call. -
ec25.getCallStatus()
ReturnsTrue
when call is ongoing. -
ec25.endCall()
Ends an active voice call. -
ec25.beginAudioPlayback(string playbackFile)
PlaysplaybackFile
to the active voice call. -
ec25.waitForAudioPlayback()
Waits until audio stops playing (blocking function). -
ec25.endAudioPlayback()
Stops playing audio to the active voice call. -
ec25.beginAudioRecording(string recordFile)
Records audio from the active voice call torecordFile
. -
ec25.endAudioRecording()
Stops recording audio from the active voice call. -
ec25.sendMMS(MmsConfiguration mmsConfig, string recipient, string cc, string bcc, string title, string attachment)
Sets MMS configuration settings tommsConfig
.
Sends an MMS withtitle
andattachment
torecipient
,cc
&bcc
. -
ec25.getKeypadInput(int length, string audioFile)
(Optional) PlaysaudioFile
to the active voice call.
Returns keypadinput
oflength
.
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
Built Distribution
File details
Details for the file rbIotModem-1.3.1.tar.gz
.
File metadata
- Download URL: rbIotModem-1.3.1.tar.gz
- Upload date:
- Size: 508.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.21.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75e996ea84b4c77cb002591c1763bf70878c9ae70235bfca945b882b12365bf5 |
|
MD5 | 63fcce6a922a69ffea05127611466b41 |
|
BLAKE2b-256 | 4e630d8a2abb144f2df5a077d959df0994399569f9c93f07dfe7061eb7f9cbaf |
File details
Details for the file rbIotModem-1.3.1-py3-none-any.whl
.
File metadata
- Download URL: rbIotModem-1.3.1-py3-none-any.whl
- Upload date:
- Size: 506.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.21.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8b631abc0bee9fc6884ef95c3d7346355aa976b955d54b707519444fa1c5058 |
|
MD5 | 50a5ab5fb3824df625d7742e3a5189a3 |
|
BLAKE2b-256 | 2e7940c94c54b398c9b5212a45c3fd831e36556a8c0864a5142f729d22517cae |