User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 456,583 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,610 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 71722 | Replies: 30
Reply
Join Date: May 2005
Location: Guatemala
Posts: 4
Reputation: AhCacao is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
AhCacao's Avatar
AhCacao AhCacao is offline Offline
Newbie Poster

Re: sending sms using vb.net

  #11  
May 31st, 2005
The other way, is by using a GSM modem. Brands are WaveCom Fastrack, Multitech and SonyEricson. The latest, called GM28 and distributed by www.toppcompanies.com is the one I found most reliable (I´ve tested the others).
If you go for a modem, you will have to use MSCOMM to communicate with the modem via Serial Port. The connection parameters will vary with each model. Then you will have to transmit AT commands to the modems to have them send and receive SMS.
To help you decide which method to use, read the next reply...
Reply With Quote  
Join Date: May 2005
Location: Guatemala
Posts: 4
Reputation: AhCacao is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
AhCacao's Avatar
AhCacao AhCacao is offline Offline
Newbie Poster

Re: sending sms using vb.net

  #12  
May 31st, 2005
The SMPP option gives you these advantages and disadvantages:
- Massive amounts of SMS. Perfect for SMS spammers.
- Lower costs, depending whether your provider charges you for SMPP and how much.
- Providers rarely release access to SMPP to individuals. Sometimes not even companies.
The GSM Modem option gives you these other advantages:
- Freedom from the provider. Just insert the SIM and you are ready.
- It will handle (outgoing or incoming) only 1 message every 4.5 seconds.

Sample code... sorry is too much. But will gladly gide you to the pieces of the puzzle.
Reply With Quote  
Join Date: May 2005
Location: Guatemala
Posts: 4
Reputation: AhCacao is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
AhCacao's Avatar
AhCacao AhCacao is offline Offline
Newbie Poster

Re: sending sms using vb.net

  #13  
May 31st, 2005
Oh.. and before I forget, there is also the posibility of ONLY Sending messages, by using PHP via HTTP. I know there is a way create your own internet explorer with vb, which I have not done yet. Therefore, all you need is to send the appropiate code to the URL provided by the carrier. For this, you will need to find out if your carrier allows SMS via HTTP, and if they will give you access to it. I have the PHP protocol needed for this somewhere. I´ll post it here later.
Reply With Quote  
Join Date: Jun 2005
Posts: 9
Reputation: vrushalinz1 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
vrushalinz1 vrushalinz1 is offline Offline
Newbie Poster

Re: sending sms using vb.net

  #14  
Jun 3rd, 2005
Well i can say i have done smething of this kind in VB before.U better go thru Hayes Commands which are used for sending and recieving SMS.
Reply With Quote  
Join Date: Jul 2005
Posts: 1
Reputation: dharshan is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
dharshan dharshan is offline Offline
Newbie Poster

Re: sending sms using vb.net

  #15  
Jul 19th, 2005
hye guys
Thers an easy way to send sms from ur .NET application
all u need is a web service that provides this,
well most of them are not for free, although u can use trial licences that let u send around 5 - 10 sms's for free
u can try out Stike Iron ( 10 sms free for trial licence)

http://ws.strikeiron.com/SMSTextMessaging?WSDL

just add the web reference to this wsdl from ur VS and thats as easy as it gets

Happy sms 'ing

PS: i have a sample application if anyone wants mail me:dharshan.ks@gmail.com

Cheers
Reply With Quote  
Join Date: Dec 2005
Posts: 2
Reputation: NetDev is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
NetDev NetDev is offline Offline
Newbie Poster

Re: sending sms using vb.net

  #16  
Dec 30th, 2005
Below is simple code:

Imports System.Web.Mail
.
.
.
Dim toPhoneNumber As String = "DestinationPhoneNumber";
Dim login As String = "YouredomainUsername"
Dim password As String = "YourPassword"
Dim compression As String = "Compression Option goes here "
Dim body As String = "Your Message"
Dim mail As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage

mail.To = toPhoneNumber + "@sms.domainname.com"
mail.From = login + "@domain.com"
mail.Subject = compression
mail.Body = body
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", login)
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", password)


System.Web.Mail.SmtpMail.SmtpServer = "domain.com";
System.Web.Mail.SmtpMail.Send(mail)

or u can find out on this link below:
http://www.ipipi.com/help/send_text_...ing_vb_net.htm
Reply With Quote  
Join Date: Feb 2006
Posts: 1
Reputation: 2cworth is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
2cworth 2cworth is offline Offline
Newbie Poster

Re: sending sms using vb.net

  #17  
Feb 8th, 2006
You can go to

http://www.emant.com/681002.page

where there is the free sms component emantsms and an example program.
Reply With Quote  
Join Date: Jan 2006
Location: Its the internet... i am everywhere lol
Posts: 274
Reputation: f1 fan is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 11
f1 fan f1 fan is offline Offline
Posting Whiz in Training

Re: sending sms using vb.net

  #18  
Feb 9th, 2006
There is one way to send for free without using an sms gateway but you have to know the carrier the person is on. You can then send an email. Most are in the form of mobilenumber@carrierssmsemail.tld For example verizon is mobilenumber@vtext.com and most major carriers have similar.
Reply With Quote  
Join Date: Sep 2006
Location: SOUTH AFRICA
Posts: 2
Reputation: Jeanred is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Jeanred's Avatar
Jeanred Jeanred is offline Offline
Newbie Poster

Solution Re: sending sms using vb.net

  #19  
Sep 7th, 2006
HI,
Here is code for a dll file for VB.NET 2005 that I am currently using to send SMS Messages. Receiving SMS Messages are not done yet, but I will post it when it is done. This Code will work with FARGO Maestro 100 GSM Modem (WAVECOM)

Please note that this code use threading ...
 
 
Option Explicit On
Imports System
Imports System.Threading
Imports System.ComponentModel
Imports System.Windows.Forms
Imports System.IO.Ports
 
 
 
PublicClass SMSCOMMS
Private WithEvents SMSPort As SerialPort
Private SMSThread As Thread
Private ReadThread As Thread
Shared _Continue As Boolean = False
Shared _ContSMS As Boolean = False
Private _Wait As Boolean = False
Shared _ReadPort As Boolean = False
Private WithEvents DBServer As Postgres
Public Event Sending(ByVal Done As Boolean)
Public Event DataReceived(ByVal Message As String)
 
Public Sub New(ByRef COMMPORT As String)
SMSPort = New SerialPort
With SMSPort
.PortName = COMMPORT
.BaudRate = 9600
.Parity = Parity.None
.DataBits = 8
.StopBits = StopBits.One
.Handshake = Handshake.RequestToSend
.DtrEnable = True
.RtsEnable = True
.NewLine = vbCrLf
End With
DBServer = New Postgres()
ReadThread = New Thread(AddressOf ReadPort)
End Sub
 
Public Function SendSMS(ByVal CellNumber As String, ByVal SMSMessage As String) As Boolean
Dim MyMessage As String = Nothing
'
'Check if Message Length <= 160
If SMSMessage.Length <= 160 Then
MyMessage = SMSMessage
Else
MyMessage = Mid(SMSMessage, 1, 160)
End If
'MsgBox("Sending " & MyMessage & " to " & CellNumber)
If IsOpen = True Then
SMSPort.WriteLine("AT+CMGS=" & CellNumber & vbCr)
_ContSMS = False
While _ContSMS = False
Application.DoEvents()
End While
SMSPort.WriteLine(MyMessage & vbCrLf & Chr(26))
_Continue = False
RaiseEvent Sending(False)
End If
End Function
 
 
Private Sub ReadPort()
Dim SerialIn As String = Nothing
Dim RXBuffer(SMSPort.ReadBufferSize) As Byte
Dim SMSMessage As String = Nothing
Dim Strpos As Integer = 0
Dim TmpStr As String = Nothing
While SMSPort.IsOpen = True
If (SMSPort.BytesToRead <> 0) And (SMSPort.IsOpen = True) Then
While SMSPort.BytesToRead <> 0
SMSPort.Read(RXBuffer, 0, SMSPort.ReadBufferSize) 'SMSPort.BytesToRead
SerialIn = SerialIn & System.Text.Encoding.ASCII.GetString(RXBuffer)
' Handle Internal Events
' For Received Characters
If SerialIn.Contains(">") = True Then
_ContSMS = True
End If
If SerialIn.Contains("+CMGS:") = True Then
_Continue = True
RaiseEvent Sending(True)
_Wait = False
SerialIn = String.Empty
ReDim RXBuffer(SMSPort.ReadBufferSize)
End If
 
End While
RaiseEvent DataReceived(SerialIn)
SerialIn = String.Empty
ReDim RXBuffer(SMSPort.ReadBufferSize)
End If
End While
End Sub
 
 
Public ReadOnly Property IsOpen() As Boolean
Get
If SMSPort.IsOpen = True Then
IsOpen = True
Else
IsOpen = False
End If
End Get
End Property
 
Public Sub Open()
If IsOpen = False Then
SMSPort.Open()
ReadThread.Start()
End If
End Sub
 
Public Sub Close()
If IsOpen = True Then
SMSPort.Close()
End If
End Sub
 
 
 
 
EndClass
 

Usage Of The Above Code Should be straight Forward, But Here Goes

In a Windows Form App

Option Explicit On
 
'Other Imports
Imports SMSCOMMS
' Rest of stuff
 
'Declarations
Public WitheEvents SMSEngine as SMSCOMMS
 
Public Sub Main()
   SMSEngine = New SMSCOMMS("COM1")
    SMSEngine.Open()
    SMSEngine.SendSMS("000000000","THIS IS YOUR MESSAGE")
End Sub
 
Public Sub Form_Close()
 SMSEngine.Close()
End Sub
 

I Hope this helps
Reply With Quote  
Join Date: Oct 2006
Posts: 1
Reputation: jeffmoretti is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
jeffmoretti jeffmoretti is offline Offline
Newbie Poster

Re: sending sms using vb.net

  #20  
Oct 6th, 2006
I found a link to a page showing how to send text messages in .NET. Its in C# instead of VB.NET, but it should still help. Plus, the web service being used, webservicex, is a free unlimited service, so that should definitely be worth taking a look at if you need a free SMS web service.

Here's the link:

http://www.codeproject.com/cs/webser...sThroughWS.asp

Hope this helps!

Jeff
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb VB.NET Marketplace
Currently Active Users Viewing This Thread: 2 (1 members and 1 guests)

upstream

Thread Tools Display Modes

Similar Threads
Other Threads in the VB.NET Forum

All times are GMT -4. The time now is 6:29 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC