且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

有人知道如何使用Sms进行通知编程吗?

更新时间:2022-12-07 18:29:04

好笑,我这个周末刚刚完成.
我正在使用此设备 [ winsock应用程序并执行ping操作 [ gammu [ GSM_SendSMS [ ^ ]或创建自己的封装了AT命令的库,您只(可能)需要2条AT命令,即:AT + CMGF(设置操作模式)和AT + CMGS(实际)发送短信的命令)

我记得这里有一篇很好的文章,解释了有关串行通信的详细信息.我会先搜索它,然后为您更新答案.

好吧,这是文章 [
Funny I just finished doing this this weekend.
I''m using this device[^].
The device has their own RTOS, so after you build the application you can deploy it there.
Anyway, all I do is just setting up a cyclic timer and when the timer expires it will check website (in your case ping it), and send SMS.

But you can also create winsock application and do the ping-ing stuff[^], and send SMS.
If you want to send SMS, you can do either way: using "SMS lib" like gammu[^] and simply use GSM_SendSMS[^] or you create your own lib that encapsulates AT command, you only need (maybe) 2 AT commands, that are: AT+CMGF (set operating mode) and AT+CMGS (actual command to send SMS)

I remember there''s a very good article here explaining details about serial communication. I''ll search for it first and update the answer for you.

Well, this is the article[^]