python-gsmmodem短信发送和接收库
Python实现的短信发送/接收库,支持多种型号的短信猫。主要功能有:
发送短信、检测信号强度
基于回调的来电和短信处理方法
支持短信状态报告追踪
使用Python异常包裹AT命令错误
模块化代码,具有良好的扩展能力
提供了一些简单的调试工具。
示例
短信接收和回复
#!/usr/bin/env python """\ Demo: handle incoming SMS messages by replying to them Simple demo app that listens for incoming SMS messages, displays the sender's number and the messages, then replies to the SMS by saying "thank you" """ from __future__ import print_function import logging PORT = '/dev/ttyUSB2' BAUDRATE = 115200 PIN = None # SIM card PIN (if any) from gsmmodem.modem import GsmModem def handleSms(sms): print(u'== SMS message received ==\nFrom: {0}\nTime: {1}\nMessage:\n{2}\n'.format(sms.number, sms.time, sms.text)) print('Replying to SMS...') sms.reply(u'SMS received: "{0}{1}"'.format(sms.text[:20], '...' if len(sms.text) > 20 else '')) print('SMS sent.\n') def main(): print('Initializing modem...') # Uncomment the following line to see what the modem is doing: logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG) modem = GsmModem(PORT, BAUDRATE, smsReceivedCallbackFunc=handleSms) modem.smsTextMode = False modem.connect(PIN) print('Waiting for SMS message...') try: modem.rxThread.join(2**31) # Specify a (huge) timeout so that it essentially blocks indefinitely, but still receives CTRL+C interrupt signal finally: modem.close(); if __name__ == '__main__': main()
评论
python-gsmmodem短信发送和接收库
Python实现的短信发送/接收库,支持多种型号的短信猫。主要功能有:发送短信、检测信号强度基于回调的来电和短信处理方法支持短信状态报告追踪使用Python异常包裹AT命令错误模块化代码,具有良好的扩
python-gsmmodem短信发送和接收库
0
发送短信 API
使用该接口发送文本短信至一个或多个收件人。阅读本文档前请先阅读 API 通用说明。接口定义接口名:sms.message.sendHTTP Method:POSTContent-Type:application/json请求参数 (Body)参数名类型是否必填描述示例值tostring | stri
合一云
0
Miaodisms短信发送模块
基于giiwa和秒嘀的短信发送模块。下载giiwa http://giiwa.org。实现了giiwa的Sms.ISender接口,在giiwa中的其他应用模块可以直接调用giiwa框架的Sms.se
Miaodisms短信发送模块
0
Selma短信发送插件
Selma是FireFox浏览器和Thunderbird邮件客户端软件上一个用来发送短信的扩展,不能是通过国外一些网站来提供服务的,目前支持的网站有:-Innosend.de-SMS77.de-sms
Selma短信发送插件
0
sms-integration短信发送框架
sms-integration 是一个基于SMGP3.4协议、CMPP协议的短信发送框架。特性 支持SMGP3.4协议、CMPP协议依赖<dependency><groupId>
sms-integration短信发送框架
0
SendCloud短信发送平台
SendCloud短信服务平台是基于云端技术提供的触发短信高效送达、短信追踪及其他服务的短信发送平台。为企业客户提供便利的API接口来调用服务,让短信准确迅速到达用户手机短信收件箱并获得丰富的追踪数据。
闪达科技
0