Link to home
Start Free TrialLog in
Avatar of rivaborn
rivaborn

asked on

Problem with reading SMS from GSM Modem

I have an enfora GSM 1218 Modem. I am writing an application that reads SMS off the modem. The application also detects phone calls to the modem and logs the calling number. SMS messages come from mobile phones and the internet (SMSC).

Currently I am using a combination of +CMGL and +CMGR to read the SMS messages. I am using +CLCC to detect ringing and to retrieve the calling number.

This requires that I continously poll the GSM modem.

I would like to use the +CMTI notifications to simplify the reading of SMS. I have tried +CNMI=2, 1 but I am not receiving any notifications.

When I log onto the phone with Hyperterminal +CTMI notifications are shown with this CNMI setting.

My program goes into a loop that reads the GSM phone com port, but receives nothing.

What am I doing wrong?
Avatar of imarshad
imarshad
Flag of Pakistan image

In which language are you developing?

Imran
Avatar of rivaborn
rivaborn

ASKER

C++

Using Visual Studio .net 2003
Solved!

The problem was in my serial port code and it arose from an incomplete understanding of serial port programming.

In summary I was not trapping serial port events.

I will paste a sample of working code as soon as I have everything working satisfactorilly - hopefully tomorrow.
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial