Layanan pesan singkat atau Surat masa singkat (bahasa Inggris: Short Message Service disingkat SMS) adalah sebuah layanan yang dilaksanakan dengan sebuah telepon genggam untuk mengirim atau menerima pesan-pesan pendek. Pada mulanya SMS dirancang sebagai bagian daripada GSM, tetapi sekarang sudah didapatkan pada jaringan bergerak lainnya termasuk jaringan UMTS.
Sebuah pesan SMS maksimal terdiri dari 140 bytes, dengan kata lain sebuah pesan bisa memuat 140 karakter 8-bit, 160 karakter 7-bit atau 70 karakter 16-bit untuk bahasa Jepang, bahasa Mandarin dan bahasa Korea yang memakai Hanzi (Aksara Kanji / Hanja). Selain 140 bytes ini ada data-data lain yang termasuk. Adapula beberapa metode untuk mengirim pesan yang lebih dari 140 bytes, tetapi seorang pengguna harus membayar lebih dari sekali.
SMS bisa pula untuk mengirim gambar, suara dan film. SMS bentuk ini disebut MMS.
Pesan-pesan SMS dikirim dari sebuah telepon genggam ke pusat pesan (SMSC dalam bahasa Inggris), di sini pesan disimpan dan mencoba mengirimnya selama beberapa kali. Setelah sebuah waktu yang telah ditentukan, biasanya 1 hari atau 2 hari, lalu pesan dihapus. Seorang pengguna bisa mendapatkan konfirmasi dari pusat pesan ini.
SMS Gateway merupakan pintu gerbang bagi penyebaran Informasi dengan menggunakan SMS. Anda dapat menyebarkan pesan ke ratusan nomor secara otomatis dan cepat yang langsung terhubung dengan database nomor-nomor ponsel saja tanpa harus mengetik ratusan nomor dan pesan di ponsel anda karena semua nomor akan diambil secara otomatis dari database tersebut. Selain itu, dengan adanya SMS Gateway anda dapat mengcustomisasi pesan-pesan yang ingin dikirim. Dengan menggunakan program tambahan yang dapat dibuat sendiri, pengirim pesan dapat lebih fleksibel dalam mengirim berita karena biasanya pesan yang ingin dikirim berbeda-beda untuk masing-masing penerimanya.
SMS Gateway adalah jenis sms dua arah. Menariknya bahwa semua tarif yang diberlakukan adalah tarif sms normal sesuai dengan apa yang diberlakukan oleh operator. Karena sifatnya yang dua arah, maka jenis sms ini sangat cocok digunakan sebagai SMS Center sebuah organisasi atau perusahaan dalam rangka meningkatkan kualitas komunikasi antara anggota komunitas organisasi atau pegawai di dalam perusahaan.
Selain itu, dengan adanya SMS Gateway, Anda dapat mengatur pesan-pesan yang ingin dikirim. Dengan menggunakan program tambahan yang dapat dibuat sendiri, pengiriman pesan dapat lebih fleksibel dalam mengirim berita karena biasanya pesan yang ingin dikirim berbeda-beda untuk masing-masing penerimanya (kustomisasi pesan).
Kebutuhan Hardware
Untuk kebutuhan SMS Gateway tidak terlalu belebihan dan juga fleksibel karena bisa dibuat dengan :
1. PC maupun Notebook. Yang mutlak dibutuhkan adalah sebuah komputer tentunya ada USB atau port serial COM
2. Sebuah ponsel atau modem yang mendukung AT Command
3. Kabel data (Kabel berantarmuka serial yang dapat menghubungi ponsel dengan PC) atau dapat munggunakan InfraRed dan piranti lunak sebagai SMS Gateway.
Untuk menggunakan InfraRed anda membutuhkan sebuah ponsel yang juga memiliki fasilitas tsb, tapi tidak dianjurkan untuk kebutuhan SMS gateway karena komunikasi dengan InfraRed tidak terlalu baik (jika tergeser gampang putus).
Kebutuhan Software
Disini penulis menggunakan bahasa pemrograman Visual Basic 6.0 dan untuk pengertian perintah yang dipakai menggunakan AT Command. AT Command adalah perintah-perintah yang digunakan dalam komunikasi dengan serial port. Dengan AT Command kita dapat mengetahui vendor dari Handphone yang digunakan, kekuatan sinyal, membaca pesan yang ada pada SIM Card, megirim pesan, mendeteksi pesan SMS baru yang masuk secara otomatis, menghapus pesan pada SIM Card dan masih banyak lagi.
Dalam program SMS Gateway yang akan kita buat nanti, tidak semua perintah AT Command digunakan. Kita hanya menggunakan beberapa perintah AT yang ada hubungannya dengan sistem kerja dari program SMS Gateway. Adapun perintah yang akan digunakan adalah sebagai berikut :
Command - Keterangan
AT Mengecek apakah Handphone telah terhubung
AT+CMGF Untuk menetapkan format mode dari terminal
AT+CSCS Untuk menetapkan jenis encoding
AT+CNMI Untuk mendeteksi pesan SMS baru masuk secara otomatis
AT+CMGL Membuka daftar SMS yang ada pada SIM Card
AT+CMGS Mengirim pesan SMS
AT+CMGR Membaca pesan SMS
AT+CMGD Menghapus pasan SMS
ATE1 Mengatur ECHO
ATV1 Mengatur input dan output berupa naskah
AT+CGMI Mengecek Merek HP
AT+CGMM Mengecek Seri HP
AT+CGMR Mengecek Versi Keluaran HP
AT+CBC Mengecek Baterai
AT+CSQ Mengecek Kualitas Sinyal
AT+CCLK? Mengecek Jam (waktu) pada HP
AT+CALM=< n > Mengecek Suara/dering HP saat di Telepon (ada Telepon Masuk)
‘n’ adalah adalah angka yang menunjukkan jenis dering
0 = berdering
1 dan 2 = Silent (Diam)
AT^SCID Mengecek ID SIM CARD
AT+CGSN Mengecek Nomor IMEI
AT+CLIP=1 Menampilkan nomor telepon pemanggil
AT+CLCC Menampilkan nomor telepon yang sedang memanggil
AT+COPN Menampilkan Nama Sumua Operator di dunia
AT+COPS? Menampilkan nama operator dari SIM yang digunakan
AT+CPBR=< n > Membaca nomor telepon yang disimpan pada buku telepon (SIM CARD)
‘n’ adalah nomor urut penyimpanan
AT+CPMS=< md > Mengatur Memori dari HP
‘md’ adalah memori yang digunakan
ME = Memori HP
SM = Memori SIM CARD
Langkah-langkah pengcodingan:
Nah sekarang buka Program Microsoft Visual Basic Anda dan ikuti langkah berikut ini:
1. Buka aplikasi VB 6 anda dan pilih standard exe lalu open
2. Tambahkan 1 modul dengan cara klik menu project - add module lalu tambahkan koding dibawah ini :
Option Explicit
Public Function RemoveInternationalDiallingCode _
(ByVal tTelNumber As String) As String
RemoveInternationalDiallingCode = "0" & Mid(tTelNumber, 4)
End Function
Public Function GetSMSNum(ByVal tSMSNotification As String) As String
Dim lCRPos As Long
lCRPos = InStrRev(tSMSNotification, vbCr)
If lCRPos > 0 Then GetSMSNum = Mid(tSMSNotification, lCRPos - 2, 2)
If Left(GetSMSNum, 1) = "," Then GetSMSNum = Right(GetSMSNum, 1)
End Function
Public Function ReadSMS(comms As MSComm, _
ByVal tSMSNum As String, tMessage As String, _
tSender As String, tDate As String, _
tTime As String, bRead As Boolean) As Boolean
Dim tChar As String * 1
Dim i As Long
Dim tRead As String
Dim lQuoteNum As Long
Dim tDateTime As String
Dim tData As String
Const TIMEOUT = 10000
On Error GoTo ErrHandler
tData = "AT+CMGR=" & tSMSNum & vbCr
comms.InBufferCount = 0
comms.Output = tData
tData = ""
i = timeGetTime
Do While timeGetTime - i <= TIMEOUT And InStr(tData, "OK" & vbCrLf) = 0 And InStr(tData, "ERROR" & vbCrLf) = 0
DoEvents
If comms.InBufferCount > 0 Then
tChar = comms.Input
tData = tData & tChar
End If
Loop
If InStr(tData, "ERROR") = 0 And tData <> "" Then
For i = 1 To Len(tData)
tChar = Mid(tData, i, 1)
If tChar = """" Then lQuoteNum = lQuoteNum + 1
If lQuoteNum = 1 And tChar <> """" Then tRead = tRead & tChar
If lQuoteNum = 3 And tChar <> """" Then tSender = tSender & tChar
If lQuoteNum = 5 And tChar <> """" Then tDateTime = tDateTime & tChar
If lQuoteNum = 6 And tChar <> """" Then tMessage = tMessage & tChar
Next i
bRead = (tRead = "REC READ")
tDate = Left(tDateTime, 8)
tTime = Mid(tDateTime, 10, 8)
tMessage = Mid(tMessage, 3)
tMessage = Mid(tMessage, 1, InStr(tMessage, vbCr) - 1)
ReadSMS = True
End If
Exit Function
ErrHandler:
ReadSMS = False
End Function
Public Function DeleteAllSMSes(comms As MSComm) As Boolean
Dim i As Long
For i = 1 To 15
DeleteAllSMSes = InStr(TransmitAndReceiveData(comms, "AT+CMGD=" & i & vbCr), "OK")
Next i
End Function
Public Function DeleteSMS(comms As MSComm, ByVal lSMSNum As Long) As Boolean
DeleteSMS = InStr(TransmitAndReceiveData(comms, "AT+CMGD=" & lSMSNum & vbCr), "OK")
End Function
Public Function SendSMS(comms As MSComm, ByVal tSMSNum As String, ByVal tMessage As String) As Boolean
SendSMS = InStr(TransmitAndReceiveData(comms, "AT+CMGS=" & """" & tSMSNum & """" & vbCr & tMessage & Chr(26)), "OK")
End Function
Public Function TestModem(comms As MSComm) As String
TestModem = TransmitAndReceiveData(comms, "AT")
End Function
Public Function ManufacturerInfo(comms As MSComm) As String
ManufacturerInfo = TransmitAndReceiveData(comms, "AT+CGMI")
End Function
Public Function ModelInfo(comms As MSComm) As String
ModelInfo = TransmitAndReceiveData(comms, "AT+CGMM")
End Function
Public Function FirmwareInfo(comms As MSComm) As String
FirmwareInfo = TransmitAndReceiveData(comms, "AT+CGMR")
End Function
Public Function IMEIInfo(comms As MSComm) As String
IMEIInfo = TransmitAndReceiveData(comms, "AT+CGSN")
End Function
Public Function IMSIInfo(comms As MSComm) As String
IMSIInfo = TransmitAndReceiveData(comms, "AT+CIMI")
End Function
Public Function EF_CCIDInfo(comms As MSComm) As String
EF_CCIDInfo = TransmitAndReceiveData(comms, "AT+CCID")
End Function
Public Function NetworkRegStatus(comms As MSComm) As String
NetworkRegStatus = TransmitAndReceiveData(comms, "AT+CREG?")
End Function
Public Function AvailablePLMNs(comms As MSComm) As String
AvailablePLMNs = TransmitAndReceiveData(comms, "AT+COPS?")
End Function
Public Function NetworkFieldStrength(comms As MSComm) As String
NetworkFieldStrength = TransmitAndReceiveData(comms, "AT+CSQ")
End Function
Public Function MainCellMainParams(comms As MSComm) As String
MainCellMainParams = TransmitAndReceiveData(comms, "AT+CCED=0")
End Function
Public Function TransmitAndReceiveData(comms As MSComm, ByVal tData As String) As String
Dim lTime As Long
Const TIMEOUT = 10000
tData = tData & vbCr
With comms
.InBufferCount = 0
.Output = tData
tData = ""
lTime = timeGetTime
tData = ""
Do While timeGetTime - lTime <= TIMEOUT And InStr(tData, "OK") = 0 And InStr(tData, "ERROR" & vbCrLf) = 0
DoEvents
If .InBufferCount > 0 Then tData = tData & .Input
Loop
End With
TransmitAndReceiveData = tData
End Function
4. Tambahkan komponen mscomm punyanya microsoftPublic Function RemoveInternationalDiallingCode _
(ByVal tTelNumber As String) As String
RemoveInternationalDiallingCode = "0" & Mid(tTelNumber, 4)
End Function
Public Function GetSMSNum(ByVal tSMSNotification As String) As String
Dim lCRPos As Long
lCRPos = InStrRev(tSMSNotification, vbCr)
If lCRPos > 0 Then GetSMSNum = Mid(tSMSNotification, lCRPos - 2, 2)
If Left(GetSMSNum, 1) = "," Then GetSMSNum = Right(GetSMSNum, 1)
End Function
Public Function ReadSMS(comms As MSComm, _
ByVal tSMSNum As String, tMessage As String, _
tSender As String, tDate As String, _
tTime As String, bRead As Boolean) As Boolean
Dim tChar As String * 1
Dim i As Long
Dim tRead As String
Dim lQuoteNum As Long
Dim tDateTime As String
Dim tData As String
Const TIMEOUT = 10000
On Error GoTo ErrHandler
tData = "AT+CMGR=" & tSMSNum & vbCr
comms.InBufferCount = 0
comms.Output = tData
tData = ""
i = timeGetTime
Do While timeGetTime - i <= TIMEOUT And InStr(tData, "OK" & vbCrLf) = 0 And InStr(tData, "ERROR" & vbCrLf) = 0
DoEvents
If comms.InBufferCount > 0 Then
tChar = comms.Input
tData = tData & tChar
End If
Loop
If InStr(tData, "ERROR") = 0 And tData <> "" Then
For i = 1 To Len(tData)
tChar = Mid(tData, i, 1)
If tChar = """" Then lQuoteNum = lQuoteNum + 1
If lQuoteNum = 1 And tChar <> """" Then tRead = tRead & tChar
If lQuoteNum = 3 And tChar <> """" Then tSender = tSender & tChar
If lQuoteNum = 5 And tChar <> """" Then tDateTime = tDateTime & tChar
If lQuoteNum = 6 And tChar <> """" Then tMessage = tMessage & tChar
Next i
bRead = (tRead = "REC READ")
tDate = Left(tDateTime, 8)
tTime = Mid(tDateTime, 10, 8)
tMessage = Mid(tMessage, 3)
tMessage = Mid(tMessage, 1, InStr(tMessage, vbCr) - 1)
ReadSMS = True
End If
Exit Function
ErrHandler:
ReadSMS = False
End Function
Public Function DeleteAllSMSes(comms As MSComm) As Boolean
Dim i As Long
For i = 1 To 15
DeleteAllSMSes = InStr(TransmitAndReceiveData(comms, "AT+CMGD=" & i & vbCr), "OK")
Next i
End Function
Public Function DeleteSMS(comms As MSComm, ByVal lSMSNum As Long) As Boolean
DeleteSMS = InStr(TransmitAndReceiveData(comms, "AT+CMGD=" & lSMSNum & vbCr), "OK")
End Function
Public Function SendSMS(comms As MSComm, ByVal tSMSNum As String, ByVal tMessage As String) As Boolean
SendSMS = InStr(TransmitAndReceiveData(comms, "AT+CMGS=" & """" & tSMSNum & """" & vbCr & tMessage & Chr(26)), "OK")
End Function
Public Function TestModem(comms As MSComm) As String
TestModem = TransmitAndReceiveData(comms, "AT")
End Function
Public Function ManufacturerInfo(comms As MSComm) As String
ManufacturerInfo = TransmitAndReceiveData(comms, "AT+CGMI")
End Function
Public Function ModelInfo(comms As MSComm) As String
ModelInfo = TransmitAndReceiveData(comms, "AT+CGMM")
End Function
Public Function FirmwareInfo(comms As MSComm) As String
FirmwareInfo = TransmitAndReceiveData(comms, "AT+CGMR")
End Function
Public Function IMEIInfo(comms As MSComm) As String
IMEIInfo = TransmitAndReceiveData(comms, "AT+CGSN")
End Function
Public Function IMSIInfo(comms As MSComm) As String
IMSIInfo = TransmitAndReceiveData(comms, "AT+CIMI")
End Function
Public Function EF_CCIDInfo(comms As MSComm) As String
EF_CCIDInfo = TransmitAndReceiveData(comms, "AT+CCID")
End Function
Public Function NetworkRegStatus(comms As MSComm) As String
NetworkRegStatus = TransmitAndReceiveData(comms, "AT+CREG?")
End Function
Public Function AvailablePLMNs(comms As MSComm) As String
AvailablePLMNs = TransmitAndReceiveData(comms, "AT+COPS?")
End Function
Public Function NetworkFieldStrength(comms As MSComm) As String
NetworkFieldStrength = TransmitAndReceiveData(comms, "AT+CSQ")
End Function
Public Function MainCellMainParams(comms As MSComm) As String
MainCellMainParams = TransmitAndReceiveData(comms, "AT+CCED=0")
End Function
Public Function TransmitAndReceiveData(comms As MSComm, ByVal tData As String) As String
Dim lTime As Long
Const TIMEOUT = 10000
tData = tData & vbCr
With comms
.InBufferCount = 0
.Output = tData
tData = ""
lTime = timeGetTime
tData = ""
Do While timeGetTime - lTime <= TIMEOUT And InStr(tData, "OK") = 0 And InStr(tData, "ERROR" & vbCrLf) = 0
DoEvents
If .InBufferCount > 0 Then tData = tData & .Input
Loop
End With
TransmitAndReceiveData = tData
End Function
5. Set boudrate dan lainnya sesuai dengan setingan HP atau modem anda lalu pada form load isikan perintah inisialisasi modem/hp.
6. Silahkan test send sms dengan menggunakan fungsi SendSMS dan silahkan coba-coba fungsi lainnya.
7. Selamat mencoba.
Source : http://seven-technology.blogspot.com/
kita juga punya nih artikel mengenai 'SMS GATEWAY', silahkan dikunjungi dan dibaca , berikut linknya
ReplyDeletehttp://repository.gunadarma.ac.id/bitstream/123456789/4003/1/1.%20DOKUMEN%20PRESENTASI.pdf
terimakasih
Do you want to start a business or looking for a startup? Are you looking for a WhatsApp reseller panel to start your business? You have come to the right place to have the service of the WhatsApp reseller panel. GetItSMS is providing the services of a WhatsApp Reseller Panel to help entrepreneurs. With this service, they can start a new business as the world is choosing the best bulk SMS service for their businesses. WhatsApp bulk SMS service has become one of the top services after marketing a business in the market. If you are looking for a WhatsApp reseller service provider in India or in any part of the country. We will provide you with the best service to start your business in India.
ReplyDeleteJaipur the city of heritages! The city is also called Pink City, being one of the most popular tourist’s attractions all over the world has created opportunities for all types of businesses in Jaipur. Whether they are travel agencies, hotels or services of tourist guides, Bulk SMS in Jaipur can help them to approach all those customers that need them. Cities like Jaipur are hubs for all types of businesses small or large so all companies want to promote their services. Promoting your service through multimedia may be expensive for your business even though all these need an audience to see your still or motion advertising. If your targeted audience doesn’t come to all these platforms your time and money will be wasted and this is a big worry for you!
Our link extras up to 42 kV are described by safe arrangements with dependable capacities for long haul activity. Our Medium voltage cable accessories designing experience and persistent item advancement empower us to offer items that meet future necessities for dependable frameworks.
ReplyDelete