Solved

send sms using a gprs modem

Posted on 2006-10-22
4
2,406 Views
Last Modified: 2013-12-26
Hi expert...

I am developing an application using PB 6.5 for sending sms using a gprs modem (iTegno 3000).
How can I connect my application with the modem.

thanks
0
Comment
Question by:micky_ng
  • 2
  • 2
4 Comments
 

Author Comment

by:micky_ng
ID: 17793508
Dear Experts...

I am trying to use MSComm32.ocx now. Do you have an example for sending sms trought a gprs modem ?

thanks
0
 
LVL 6

Expert Comment

by:tr1l0b1t
ID: 17818011
0
 
LVL 6

Accepted Solution

by:
tr1l0b1t earned 250 total points
ID: 17818208
Using MSComm32.ocx ...you must send AT GSM commands to the modem.
This page will be useful to get the basics : http://www.traud.de/gsm/sms.htm

Full list & specifications of AT GSM commands are at ETSI page :
(http://webapp.etsi.org/key/key.asp?GSMSpecPart1=27&GSMSpecPart2=005)
...an extract :

SMS Commands SMS Text Mode
---------------------------------------
AT+CSMS   Select Message Service
AT+CPMS   Preferred Message Storage
AT+CMGF   Message Format
AT+CSCA   Service Centre Address
AT+CSMP   Set Text Mode Parameters
AT+CSDH   Show Text Mode Parameters
AT+CSCB   Select Cell Broadcast Message Types
AT+CSAS   Save Settings
AT+CRES   Restore Settings
AT+CNMI   New Message Indications to TE
AT+CMGL   List Messages
AT+CMGR   Read Message
AT+CMGS   Send Message
AT+CMSS   Send Message from Storage
AT+CMGW   Write Message to Memory
AT+CMGD   Delete Message

PB source code should be something like this (just pseudocode):

String ls_data

OLEObject ole_1
ole_1 = create OLEObject
ole_1.ConnecttoNewobject("MScommlib.Mscomm")

// Configure the communication's port
ole_1.object.CommPort = 1
ole_1.object.Settings = "9600, N, 8, 1"
ole_1.object.InputLen = 0

// Open it
ole_1.object.PortOpen = True

// Send data
ole_1.object.Output = "AT " + char (13)

// Wait for "OK" response
Do
    ls_data += ole_1.object.Input
LOOP Until (Pos (ls_data, "OK") > 0)

// Close port
ole_1.object.PortOpen = FALSE

ole_1.DisconnectObject()

As you see, it's a very extensive subject  but I hope
you got the idea. I reccommend you to test AT commands with
Hyperterminal, then code the working sequence in PB.
Regards
0
 

Author Comment

by:micky_ng
ID: 17841097
Hi... Sir...

thanks very much for your detail description. It is very helpful.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now