Solved

send sms using a gprs modem

Posted on 2006-10-22
4
2,401 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

759 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

24 Experts available now in Live!

Get 1:1 Help Now