⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testwavecomm.vb

📁 通过串口发送短信的模块,采用vb.net编写
💻 VB
字号:
Imports ATSMS

Public Class TestWaveComm

    Private oGsmModem As GSMModem

    Private Sub TestWaveComm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        oGsmModem = New GSMModem
        oGsmModem.Port = "COM6"
        oGsmModem.BaudRate = 115200
        oGsmModem.Parity = Common.EnumParity.None
        oGsmModem.StopBits = Common.EnumStopBits.One
        oGsmModem.FlowControl = Common.EnumFlowControl.Hardware
        oGsmModem.DataBits = 8

        Try
            oGsmModem.Connect()
            If oGsmModem.IsConnected Then
                MsgBox(oGsmModem.PhoneModel)
                MsgBox(oGsmModem.IMEI)
                MsgBox(oGsmModem.IMSI)
                MsgBox(oGsmModem.SendSMS("0126868739", "test msg"))
            End If
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical)
        End Try

    End Sub
End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -