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

问题描述:

是否有人知道如何使用C ++发出基本的ping命令,以及如何链接到GSM调制解调器以向手机发送消息?

-每5秒钟进行一次ping连接,例如www.google.com,如果断开连接或网络断开..那么它将仅从gsm调制解调器向手机发送一条消息,说您的网络断开"了吗?

-一个简单的C ++命令编程

does anyone knows how to make a basic ping command using C++ and also link to the GSM modem for sending messages to mobile phone??

- pings for connection such as www.google.com every 5 second and if it disconnect or the network is down.. then it will send a message just once from the gsm modem to the mobile phone saying that "your network is down"?

- a simple C++ command programming

好笑,我这个周末刚刚完成.
我正在使用此设备 [ 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[^]