Pengetahuan Dasar Mengirim SMS dengan Visual Basic Net (VB.Net)

draft

Button1_Click()
SerialPort1.Open()
SerialPort1.WriteLine(“AT” & vbCrLf)
Threading.Thread.Sleep(100) delay
SerialPort1.WriteLine(“AT+CMGF=1” & Chr(13) & vbCrLf)’ set modem ke text mode
Threading.Thread.Sleep(100)

‘ jika no sms center sdh ada  dimodem 1 baris code ini ga perlu
SerialPort1.WriteLine(“AT+CSCA=” & Chr(34) & “+62no sms center” & Chr(34) & vbCrLf)
Threading.Thread.Sleep(100)
SerialPort1.WriteLine(“AT+CMGS= ” & Chr(34) & textBoxnoHP.text & Chr(34) & vbCrLf)
Threading.Thread.Sleep(100)
SerialPort1.WriteLine(“pesan” & Chr(26))
Threading.Thread.Sleep(100)
SerialPort1.Close()

end sub

 

*keterangan

‘chr 34 adalah karakter double quote( “  )

‘chr(26) adalah CTRL-Z

‘‘AT+CSCA   set no Service Centers SMS

Advertisements

About pccontrol

Berisi Tutorial Menggunakan PC untuk mengontrol Peralatan dengan cara mudah & praktis.

Posted on 10/04/2016, in Daftar isi, Visual Basic . Net. Bookmark the permalink. Leave a comment.

Komentar ,Saran atau Pertanyaan

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: