Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class SMSSender
- Public WithEvents Port As New System.IO.Ports.SerialPort
- Public Shared Sub SendSMS()
- Delay(2)
- SMSSender.Port.Write("at+cmgs= 43" & vbCrLf) 'Länge des PDU-Strings übermitteln.
- Delay(2)
- SMSSender.Port.Write("0001000B811057167913F5000022C337B90CBAD7E5E43268D60EB341E6307B3E4683CA69F7B97C2E8BCBEE10" & Char.ConvertFromUtf32(26) & vbCrLf)
- End Sub
- Public Shared Sub Delay(ByVal dblSecs As Double)
- Const OneSec As Double = 1.0# / (1440.0# * 60.0#)
- Dim dblWaitTil As Date
- Now.AddSeconds(OneSec)
- dblWaitTil = Now.AddSeconds(OneSec).AddSeconds(dblSecs)
- Do Until Now > dblWaitTil
- Loop
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement