Showing posts from July, 2010

How to send sms using AT command with GSM GPRS Modem

Here is a quick tutorial to demonstrate How to send sms using AT command with GSM GPRS Modem. designed in visual wed developer 2010 with ajax and vb code behind.

In APP_Code folder create a file named vinsms.vb

Imports Microsoft.VisualBasic Imports System.IO.Ports Imports System.Threading
PublicClassvinsms ' vinod kotiya , Shared readNow AsNewAutoResetEvent(False) Shared port AsSerialPort

PublicSharedFunction sendSMS(ByVal cell AsString, ByVal message AsString, ByVal portname AsString) AsString Dim log AsString = "" Try '"Enter the port name your phone is connected to 
            port = EstablishConnection(portname) Dim recievedData AsString = ExecuteCommand("AT", 300)             log = log + "
" + recievedData             recievedData = ExecuteCommand(" AT+CREG?", 300)             log = log + "
" + recievedData If recievedData.Contains("0,2") Then Return log + "
No network" EndIf

Google+ Followers