send sms using a gprs modem

micky_ng used Ask the Experts™
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.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®


Dear Experts...

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

Using MSComm32.ocx must send AT GSM commands to the modem.
This page will be useful to get the basics :

Full list & specifications of AT GSM commands are at ETSI page :
( 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

// 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
    ls_data += ole_1.object.Input
LOOP Until (Pos (ls_data, "OK") > 0)

// Close port
ole_1.object.PortOpen = FALSE


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.


Hi... Sir...

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

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial