代码下载:
内有2文件, Rs232.vb & WaveComModem.vb
Rs232.vb为串口通讯类,
WaveComModem.vb为短信猫控制类
用法简单:
Dim Wave As New WaveComModem(串口号, 例如 8 )
Wave.SendMsg(电话号码+86x, 正文)
Wave.Close()
或者收短信:
Dim L = Wave.ReadMsg
For Each E As WaveComModem.RevMessage In L
Console.WriteLine(E.Message)
Next
RevMessage结构定义:
Structure RevMessage
Dim ID As Integer '标识号
Dim Sender As String '发送者
Dim SendDate As Date '发送日期
Dim Message As String '正文
End Structure
发表评论