Results 1 to 13 of 13

Thread: Text Messages using VB

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Location
    London, England
    Posts
    213

    Text Messages using VB

    How can I use VB to send me a text message ? Can someone show me an example.

  2. #2
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616
    Do you mean a mobile phone SMS?
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

  3. #3
    Fanatic Member
    Join Date
    Feb 2002
    Location
    SE England
    Posts
    732
    I would be interested on how to send SMS messages using VB... If its possible?
    Leather Face is comin...


    MCSD

  4. #4
    Bouncy Member darre1's Avatar
    Join Date
    May 2001
    Location
    Peterborough, UK
    Posts
    3,828
    Originally posted by Leather
    I would be interested on how to send SMS messages using VB... If its possible?
    me too, i might investigate...
    Confucious say, "Man standing naked in biscuit barrel not necessarily ****ing crackers."

    Don't forget to format your code in your posts

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Location
    London, England
    Posts
    213
    Yes,

    I want to be able to send an SMS message to a mobile phone. Is this possible ?

  6. #6
    Hyperactive Member GlenW's Avatar
    Join Date
    Nov 2001
    Location
    Gateshead, England
    Posts
    479
    If anyone knows they will be my hero, or heroine.

  7. #7
    Bouncy Member darre1's Avatar
    Join Date
    May 2001
    Location
    Peterborough, UK
    Posts
    3,828
    i'm guessing you can do it with winsock yes?

    essentially the same.

    specifiy a phone no, send data...
    Confucious say, "Man standing naked in biscuit barrel not necessarily ****ing crackers."

    Don't forget to format your code in your posts

  8. #8
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616
    The SMS data specification (and it's hardware specific extensions - e.g. Logos and Ringtones) is available online.

    However, the only online systems that can broadcast these from a PC require a pay-per-use subscription.

    Many newer phones have a dataport built in and it is possible to interface through these and send your SMS through your phone connected to your PC - however there doesn't seem to be a standardised driver interface (an equivalent of winspool.drv for printers) so any code that uses this will need to be very highly configurable....

    ...hmmm, big project ahead....
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

  9. #9
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    Here you go....
    Attached Files Attached Files
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  10. #10
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    and once you connect your mobile to your serial port you can use the following code:


    Code:
    ' Set up the communications port
    MSComm1.CommPort = 1
    ' Com Port 1
    ' Set for 9600 baud, no parity, 8 data, and 1 stop bit.
    MSComm1.Settings = "9600,N,8,1"
    ' Tell the control to read entire buffer when Input is used
    MSComm1.InputLen = 0
    ' Open the port
    MSComm1.PortOpen = True
    ' Send an
    'AT' command to the phone
    MSComm1.Output = "AT" & Chr$(13) & Chr(10)
    ' The phone will respond with an 'OK'
    ' Set up the phone for a text message
    MSComm1.Output = "AT+CMGF=1" & Chr$(13) & Chr(10)
    ' The phone will respond with an 'OK'
    ' Prep for SMS, give destination type and destination address.
    ' Enter the destination type and destination address to prep for SMS
     ' e.g. AT+CMGS="+2145551212",129
    MSComm1.Output = "AT+CMGS= " & Chr(34) & "+2145551212" & Chr(34) & ",129" & Chr$(13) & Chr(10)
    ' The phone will return a'>' prompt, and await entry of the SMS message text.
    ' Now send the text to the phone and terminate with (Ctrl-Z)
    MSComm1.Output = "This is a test. WOW! "
    ' The phone will respond with a conformation containing the 'message reference number' eg. +CMGS:
    ' Close the port
    MSComm1.PortOpen = False
    'From a terminal, it would look like this:
    'AT
    'OK
    'AT CMGF = 1
    'OK
    'AT+CMGS="+15127752607",129 >This is a test. WOW!
    '+CMGS:
    '49
    'OK
    *all code liberated from various sources....i.e. not my own....
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  11. #11
    Bouncy Member darre1's Avatar
    Join Date
    May 2001
    Location
    Peterborough, UK
    Posts
    3,828
    Originally posted by MerrionComputin
    The SMS data specification (and it's hardware specific extensions - e.g. Logos and Ringtones) is available online.

    However, the only online systems that can broadcast these from a PC require a pay-per-use subscription.

    Many newer phones have a dataport built in and it is possible to interface through these and send your SMS through your phone connected to your PC - however there doesn't seem to be a standardised driver interface (an equivalent of winspool.drv for printers) so any code that uses this will need to be very highly configurable....

    ...hmmm, big project ahead....
    where are they available online?

    this is something that i would be interested in...write an SMS sending program = free SMS'ing?
    Confucious say, "Man standing naked in biscuit barrel not necessarily ****ing crackers."

    Don't forget to format your code in your posts

  12. #12
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616
    Smart messaging Specification version 2.0.0

    Note that you still need a phone to send the SMS message thus created so this does not free you from operator charges...

    HTH,
    Duncan
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

  13. #13
    Frenzied Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    1,026
    Has any1 gone any further on this one?

    Where to I get a serial cable for my phone? Can I adapt or make one from something?

    thnx,
    squirrelly1
    Now happily married and still crankin' away at the keyboard. Life is grand for a coder, no?

Posting Permissions

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



Click Here to Expand Forum to Full Width