All Projects → adammck → Pygsm

adammck / Pygsm

Licence: other
Send and receive SMS via a GSM modem in Python

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Pygsm

Twofactor gateway
🔑 Second factor provider using an external messaging gateway (SMS, Telegram, Signal)
Stars: ✭ 76 (-30.91%)
Mutual labels:  sms
Faxserver
Send and Receive Faxes Using The Twilio Programmable Fax API.
Stars: ✭ 92 (-16.36%)
Mutual labels:  sms
Hpomb
HPomb closed-source project for SMS , Call & Mail bombing available for Window , Linux , MacOS And Android( Termux )
Stars: ✭ 102 (-7.27%)
Mutual labels:  sms
Vonage Java Sdk
Vonage Server SDK for Java. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
Stars: ✭ 75 (-31.82%)
Mutual labels:  sms
Stayfit
📱 🏃 🍎 Fitness application that’s used to keep track of your physical fitness data, daily calorie count, invite friends to work out together and ultimately get healthy.
Stars: ✭ 90 (-18.18%)
Mutual labels:  sms
Jamspymer
SMS, Call, Mail, Telegram бомбер с открытым исходным кодом
Stars: ✭ 95 (-13.64%)
Mutual labels:  sms
Way2sms Api
Way2sms Unofficial PHP API
Stars: ✭ 70 (-36.36%)
Mutual labels:  sms
Pulse Sms Ios
The official iOS app for Pulse SMS.
Stars: ✭ 108 (-1.82%)
Mutual labels:  sms
Sms Bomber
A very, very simple sms bomber written in python and now java. You can adjust the amount of texts sent, and the interval at which they are sent (if you want any). For educational purposes only.
Stars: ✭ 91 (-17.27%)
Mutual labels:  sms
Pulse Sms Web
The official web app for Pulse SMS - built on Vue.js.
Stars: ✭ 101 (-8.18%)
Mutual labels:  sms
Ni bomber
💥 advanced sms bomber in python to kill the phone
Stars: ✭ 77 (-30%)
Mutual labels:  sms
Tbomb
This is a SMS And Call Bomber For Linux And Termux
Stars: ✭ 1,287 (+1070%)
Mutual labels:  sms
Spamsms
SPAM SMS (-UPDATE 2020!-)
Stars: ✭ 94 (-14.55%)
Mutual labels:  sms
Vonage Dotnet Sdk
Nexmo REST API client for .NET, ASP.NET, ASP.NET MVC written in C#. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
Stars: ✭ 76 (-30.91%)
Mutual labels:  sms
Django Notifs
Modular Notifications (InApp, Email, SMS, CustomBackend etc) for Django
Stars: ✭ 105 (-4.55%)
Mutual labels:  sms
Retro Go
Retro emulation for the ODROID-GO
Stars: ✭ 73 (-33.64%)
Mutual labels:  sms
Smart sms
The easiest way to integrate SMS service in China
Stars: ✭ 92 (-16.36%)
Mutual labels:  sms
Raspisms
RaspiSMS est un système de gestion et d'envoi de SMS par ordinateur, initialement conçu pour les Raspberry Pi
Stars: ✭ 107 (-2.73%)
Mutual labels:  sms
React Native Sms Verifycode
A React Native component for filling in SMS verification codes or passwords, for android and iOS
Stars: ✭ 107 (-2.73%)
Mutual labels:  sms
30 Days Of Python 3.6
This is a soon-to-be archived project version of 30 Days of Python. The original tutorial still works but we have an updated version in the works right now.
Stars: ✭ 98 (-10.91%)
Mutual labels:  sms

class GsmModem(builtin.object) | pyGSM is a Python module which uses pySerial to provide a nifty | interface to send and receive SMS via a GSM Modem. It was ported | from RubyGSM, and provides (almost) all of the same features. It's | easy to get started: | | # create a GsmModem object: | >>> modem = pygsm.GsmModem(port="/dev/ttyUSB0") | | # harass Evan over SMS: | # (try to do this before 11AM) | >>> modem.send_sms(REDACTED, "Hey, wake up!") | | # check for incoming SMS: | >>> print modem.next_message() | <pygsm.IncomingMessage from REDACTED: "Leave me alone!"> | | pyGSM is distributed via GitHub: | http://github.com/adammck/pygsm | | Bug reports (especially for | unsupported devices) are welcome: | http://github.com/adammck/pygsm/issues | | | | | Methods defined here: | | | init(self, *args, **kwargs) | Create a GsmModem object. All of the arguments are passed along | to serial.Serial.init when GsmModem.connect is called. For | all of the possible configration options, see: | | http://pyserial.wiki.sourceforge.net/pySerial#tocpySerial10 | | Alternatively, a single 'device' kwarg can be passed, which | overrides the default proxy-args-to-pySerial behavior. This is | useful when testing, or wrapping the serial connection with some | custom logic. | | NOTE: The serial connection isn't created until GsmModem.connect | is called. It might still fail (but should raise GsmConnectError | when it does so.) | | | boot(self, reboot=False) | (Re-)Connect to the modem and configure it in an (often vain) | attempt to standardize the behavior of the many vendors and | models. Should be called before reading or writing. | | This method isn't called during init (since 5f41ba6d), since | it's often useful to create GsmModem objects without writing to | the modem. To compensate, this method returns 'self', so it can | be easily chained onto the constructor, like so: | | >>> gsm = GsmModem(port="whatever").boot() | | This is exactly the same as: | | >>> gsm = GsmModem(port="whatever") | >>> gsm.boot() | | | command(self, cmd, read_term=None, read_timeout=None, write_term='\r', raise_errors=True) | Issue an AT command to the modem, and return the sanitized | response. Sanitization removes status notifications, command | echo, and incoming messages, (hopefully) leaving only the actual | response to the command. | | If Error 515 (init or command in progress) is returned, the | command is automatically retried up to 'GsmModem.max_retries' | times. | | | connect(self, reconnect=False) | Connect to the modem via pySerial, using the args and kwargs | provided to the constructor. If 'reconnect' is True, and the | modem is already connected, the entire serial.Serial object is | destroyed and re-established. | | Returns self.device, or raises GsmConnectError | | | disconnect(self) | Disconnect from the modem. | | | hardware(self) | Return a dict of containing information about the modem. The | contents of each value are entirely manufacturer-dependant, and | can vary wildly between devices. | | | next_message(self, ping=True, fetch=True) | Returns the next waiting IncomingMessage object, or None if the | queue is empty. The optional 'ping' and 'fetch' args control | whether the modem is pinged (to allow new messages to be | delivered instantly, on those modems which support it) and | queried for unread messages in storage, which can both be | disabled in case you're already polling in a separate thread. | | | ping(self) | Send the "AT" command to the device, and return true if it is | acknowledged. Since incoming notifications and messages are | intercepted automatically, this is a good way to poll for new | messages without using a worker thread like RubyGSM. | | | query(self, cmd, prefix=None) | Issue an AT command to the modem, and returns the relevant part | of the response. This only works for commands that return a | single line followed by "OK", but conveniently, this covers | almost all AT commands that I've ever needed to use. Example: | | >>> modem.query("AT+CSQ") | "+CSQ: 20,99" | | Optionally, the 'prefix' argument can specify a string to check | for at the beginning of the output, and strip it from the return | value. This is useful when you want to both verify that the | output was as expected, but ignore the prefix. For example: | | >>> modem.query("AT+CSQ", prefix="+CSQ:") | "20,99" | | For all unexpected responses (errors, no output, or too much | output), returns None. | | | query_list(self, cmd, prefix=None) | Issue a single AT command to the modem, checks that the last | line of the response is "OK", and returns a list containing the | other lines. An empty list is returned if a command fails, so | the output of this method can always be assumed to be iterable. | | The 'prefix' argument can optionally specify a string to filter | the output lines by. Matching lines are returned (sans prefix), | and the rest are dropped. | | Most AT commands return a single line, which is better handled | by GsmModem.query, which returns a single value. | | | reboot(self) | Disconnect from the modem, reconnect, and reboot it (AT+CFUN=1, | which clears all volatile state). This drops the connection to | the network, so it's wise to call GsmModem.wait_for_network | after rebooting. | | | send_sms(self, recipient, text) | Send an SMS to 'recipient' containing 'text'. Some networks will | automatically split long messages into multiple parts, and join | them upon delivery -- but some will silently drop them. pyGSM | does nothing to avoid this (for now), so try to keep 'text' | under 160 characters. | | | signal_strength(self) | Return an integer between 1 and 99, representing the current | signal strength of the GSM network, False if we don't know, or | None if the modem can't report it. | | | wait_for_network(self) | Block until the signal strength indicates that the device is | active on the GSM network. It's a good idea to call this before | trying to send or receive anything. | | | | | Data descriptors defined here: | | | network | Return the name of the currently selected GSM network. | | | service_center | Get or set the service center address currently in use by the | modem. Returns None if the modem does not support the AT+CSCA | command.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].