×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    3

    how to receive n send sms through vb.net w/o human interaction?

    I have developed code that reads, sends n delete the sms but i want it automated i.e i want whenever any message is received my code should retrieve it automatically n search the data that sms want n f/w it to the requested number... how to do this without human interaction? code is developed in vb.net, using dku5 cable n nokia pc suite 6.8!

    here is sending function of my code..

    Private Sub cmdsendSMS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdsendSMS.Click
    If Not SendSMS(txtNumber.Text, txtMessage.Text) Then
    Call MsgBox("SMS send failed.", vbOKOnly, "SMS Error")
    End If
    End Sub

    Private Function SendSMS(ByVal Number As String, ByVal message As String) As Boolean
    SendSMS = False
    On Error GoTo Error1


    'Get data of first parameter set, mostly the right one

    Dim params_GSM As IGSMParameters
    params_GSM = GetParameterSet(1)

    If params_GSM Is Nothing Then Exit Function

    Dim submitObj As NokiaCLMessaging.IGSMSubmit
    Dim smsEntry As NokiaCLMessaging.ShortMessageItem



    'Create new short message
    smsEntry = New NokiaCLMessaging.ShortMessageItem
    smsEntry.Type = SHORTMESSAGE_TYPE_GSM_SUBMIT
    submitObj = smsEntry.TypeProperties

    submitObj.Message = message
    submitObj.DestinationAddress = Number
    submitObj.ServiceCenterAddress = params_GSM.ServiceCenterAddress
    submitObj.ProtocolID = params_GSM.ProtocolID


    submitObj.DataCodingScheme = CODING_SCHEME_TEXT


    submitObj.ValidityPeriodRelative = params_GSM.ValidityPeriodRelative
    MsgBox("Total Message length : " & Len(message))
    'Send message
    Call smsObj.SendSMS(SHORTMESSAGE_ROUTE_TYPE_ANY, submitObj)

    MsgBox("Msg sent successfully")
    SendSMS = True
    Exit Function

    Error1:
    MsgBox("Source: " & Err.Source & vbCrLf _
    & "ErrorDescription: " & Err.Description _
    & vbCrLf & "HelpContext: " & Err.HelpContext, _
    vbExclamation, "Error")
    End Function

  2. #2
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,796

    Re: how to receive n send sms through vb.net w/o human interaction?

    @Moderator,

    Please Move this thread to Messenging.

    BR
    Croozeus
    Pankaj Nathani
    www.croozeus.com

  3. #3
    Registered User
    Join Date
    Sep 2010
    Posts
    1

    Re: how to receive n send sms through vb.net w/o human interaction?

    hi
    please , can you put the recived sms code for me ???

Similar Threads

  1. to receive and send sms from and to mobile and PC in java
    By manoj_2580 in forum PC Suite API and PC Connectivity SDK
    Replies: 4
    Last Post: 2010-10-22, 16:21
  2. Replies: 4
    Last Post: 2010-06-11, 14:07
  3. Send SMS Problem. Cannot Get SMSC Address. Due to Strange SIM Card?
    By cksong in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2007-07-02, 16:13
  4. How to send and receive message via VB.net ?
    By ahsoon80 in forum PC Suite API and PC Connectivity SDK
    Replies: 0
    Last Post: 2005-02-24, 01:23
  5. Replies: 4
    Last Post: 2003-05-09, 05:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×