Sending SMS problem

prosys

Member
Joined
Aug 7, 2008
Messages
13
Programming Experience
Beginner
if any sample code for sending sms from mobile to another mobile through vb.net?

hi all!,
i am developing a application for a hospital in VB.net. they want to send patient result to their mobile nos.
my question is any way to send sms using MSCOM?
if yes pl. send the details or links regarding above..

i tried this urls for coding.
vb.net AT commands to send SMS - CodeProject
http://discussion.forum.nokia.com/fo...d.php?t=124447
Creating Call Events in an Emulation Environment

if any sample code for sending sms from mobile to another mobile through vb.net application?
 
Dear All!
i `m developing an application in vb.net for sending SMS to the clients.
i`m using the Motorola E8 GSM modam for this purpose. AT commands works fine when using the command in HyperTerminal,but i use this my vb.net; it doesn`t work.

herewith i attached my code. Reply me as soon as possible.
sample code with sendSMS function;

Public Function SendSMS() As Boolean
If SMSPort.IsOpen = True Then
'sending AT commands
SMSPort.WriteLine("AT")
SMSPort.WriteLine("AT+CMGF=1" & vbCrLf) 'set command message format to text mode(1)
SMSPort.WriteLine("AT+CSCA=""+91984300040""" & vbCrLf) 'set service center address for vodafone tamilnadu
SMSPort.WriteLine("AT+CMGS= + TextBox1.text + " & vbCrLf) ' enter the mobile number whom you want to send the SMS
_ContSMS = False
SMSPort.WriteLine("+ TextBox2.text +" & vbCrLf & Chr(26)) 'SMS sending
MessageBox.Show(":send")
SMSPort.Close()
End If
End Function
 

Attachments

  • Send SMS vb.net.zip
    15.1 KB · Views: 35
"Does not work" ... means?

What I see: You query IF the port is open, but your snippet does not open it (closes it in the end if it was open). Maybe you simply need to open the port first?
 
I see that you open the port.
Though I still do not understand, what "does not work" means.
Errors? Data sent, but no action by the phone. Phone sends data, but SMS doesnt arrive?

BTW: If you use "WriteLine", you can/have to ommit the "vbCrLF" because it's included anyway. Maybe that's the problem?
 
yeah.
that is problem. port is open, but no action by the phone, phone sends data, but SMS doesn't arrive.

any solution for this? can you assist. thanks for you reply
 
Back
Top