Ringbeller IoT Modem Library
Project description
Ringbeller IoT - Python bindings
Prerequisites
Requirements:
- Raspberry Pi OS (Buster)
- Python3.7
Install dependencies
# Install audio packages
$ sudo apt-get install -y libasound2-dev libsndfile1-dev
Installation
$ pip3 install 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(string &sms)
Setssms
with unread SMS. -
ec25.placeVoiceCall(string number)
Places an outgoing voice call tonumber
. -
ec25.receiveVoiceCall()
Receives an incoming voice call. -
ec25.getCallStatus()
Returns true 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(string &input, int length, string audioFile)
(Optional) PlaysaudioFile
to the active voice call.
Receives keypad-input oflength
and stores it ininput
.
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
Hashes for rbIotModem-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32965d1cf4bb543808268b855e93e61b79eef5a7272cc81551071c90eca7acba |
|
MD5 | 12088f311882b75a85198925a1a21bfc |
|
BLAKE2b-256 | 0c93c0e0586ff3b08261e8c6bd1edba89100dbef26322cdcb7a609867e59367a |