Posts

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.VisualBasicImports System.IO.PortsImports System.Threading
PublicClassvinsms' vinod kotiya , www.vinodkotiya.comShared readNow AsNewAutoResetEvent(False)Shared port AsSerialPort

PublicSharedFunction sendSMS(ByVal cell AsString, ByVal message AsString, ByVal portname AsString) AsStringDim 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 + "
" + recievedDataIf recievedData.Contains("0,2") ThenReturn log + "
No network"EndIf
            recievedD…

Google+ Followers