在安信可的A6、A7模块出来之前,SIM800、SIM900系列是市场上应用最为广泛的GSM & GPRS模块。
虽然WIFI、ZIGBEE等组网越来越广泛,但是GSM&GRPS依旧有无法替代的优势,那就是有GSM&GPRS信号的地方就可以使用。想象你在深山老林里采集气象数据或者监视某些自动化设备的运行状态,扯个光纤宽带然后开个WIFI热点? 那么你需要问问电业部门愿不愿意给你扯电,还有网络服务商愿不愿意给你布线。当然了,你愿意出个十几二十万的布线费,估计也有可能请动两尊大神。但是如果你采用2G方案呢,GSM/GPRS信号已经覆盖了一般的山林,你弄套设备,在配个蓄电池就可以开工啦。
SIM900A 的控制
SIM900A的控制非常简单,使用AT指令。具体AT指令可以参考SIM900A的手册,或者参考ETSI(欧洲电信标准协会)的相关文档,比如:
- GSM 03.04
Digital cellular telecommunications system;
Signalling requirements relating to routeing of calls to mobile subscribers
- GSM 07.05
Digital cellular telecommunications system (Phase 2+);
Use of Data Terminal Equipment - Data Circuit terminating;
Equipment (DTE - DCE) interface for Short Message Service (SMS) and Cell Broadcast Service (CBS)
- GSM 07.07
Digital cellular telecommunications system (Phase 2+);
AT command set for GSM Mobile Equipment (ME)
等等
以打电话为例,我在Arduino上用如下简单代码即可实现:
void setup() {
Serial.begin(115200);
}
void loop() {
delay(8000);
Serial.print("AT\r");
delay(2000);
Serial.print("ATD135142XXXXXX;\r");
delay(10000);
Serial.print("ATH\r");
}
一个以前的应用实例
额,其实我买sim900A主要是想玩些物联网方向的应用的。但是却跑偏了
请原谅为啥我的板子看起来比较难看,主要是这个模块对电源电流啥的要求太苛刻了,于是串了个IN4007的二极管,并了1000uf的电容,一个470uf的电容,这样才能连上网。
我想干啥呢,就是之前用一个手机卡注册过一些业务,部分操作需要收取校验码,但是找遍手头破手机不是没有电池就是没有充电器,好不容易发现一个能点亮的手机,还是移动定制机,无法使用联通卡。总不能为了这点破事买个新手机,或者去营业厅剪成小卡。愁煞我也!然后发现手头有个sim900A的模块,可以通过AT指令操作。那么就用它来看看能不能胜任这个任务吧。
看,我能用自己写的程序读出短信并解析了
写了个简单对话框程序,这样看起来像模像样了
对话框程序还能发短信,这是我收到的哦
当时做这个程序遇到的一个难点就是中文短信编解码的问题,那个PDU格式可是极其复杂的。
总结
SIM900A 是个很好玩的模块哦
能收能发短信,能打电话
之前我讲过用微信开关灯的例子,如果换成用sim900A则更简单,发个短信:关灯
灯就关了。
另外,发短信功能是挺好玩,但是不要用来做群发器啊,否则你懂的。
还有,这是几年前做的小例子,设备早跑角落里吃灰了,懒得重新为文章配图,直接用以前的吧 😀
Interesting project and lab! I regonize yor hard work.Let me know your next comming project from your post. I use google translate to attention your post. I am a new use on Steemit.I follow you.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Posting yang bagus.....
Folow me saya masih baru di steemit...
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
nice post @oflyhigh
follow me and voteup @hattaarshavin
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
難怪近日來那麼多廣告短信推廣STEEM的..........
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
呃,不是我干的
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
你相信不是其他的廣告? XD
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
this is interesting, we r currently going through some projects, I might share this with my colleagues.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
這和貓池一樣,可以弄台搶IPHONE
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
please,follow and vote me
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
不明觉厉
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
good
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
没想到高飞大神还玩硬件。我学校毕业以后都没有碰过这些玩意
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
你是做通信研究的?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit