Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 272111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:16:00+00:00 2026-05-12T00:16:00+00:00

I have got a Wavecom Supreme GSM modem. I wrote a simple application that

  • 0

I have got a Wavecom Supreme GSM modem. I wrote a simple application that communicates with the modem and reads text messages it receives.

My application queries the modem for information about the number of messages it stores in its memory and if the number is greater than 0, it reads the messages deleting them from the modem’s memory. I query the modem this way every few seconds.

Unfortunately, however, the modem hangs every few minutes and does not respond to any AT commands I send to it. The only solution I came up with to unlock the communication is to close the serial port and open it anew. Then everything is fine for next few minutes after which serial port has to be reopened again when the modem hangs.

It can of course be the modem’s fault, but I’m wondering whether the way I communicate with it is OK.

Firs of all, I open the modem’s serial port for asynchronous operations. Then I set the DCB structure as follows:

GetCommState(PortHandle, DCB);
DCB.BaudRate := 115200;
DCB.ByteSize := 8;
DCB.Parity := NOPARITY;
DCB.StopBits := ONESTOPBIT;
DCB.EvtChar := #13;
SetCommState(PortHandle, DCB);
SetCommMask(PortHandle, EV_RXFLAG);

//the modem does not respond without setting these:
EscapeCommFunction(PortHandle, SETDTR);
EscapeCommFunction(PortHandle, SETRTS);

And then all I do is send AT commands and wait for modem’s response. I do not use any flow control. Everything I do is wait for comm event, read the data from the serial port’s queue when the modem responds and write some AT commands followed by the #13 character to query the modem for messages.

I think I may have set the DCB structure improperly, for as you can see, I do not modify some of its fields. Because my knowledge on serial port is not enough, I do not know how to set the RTS and DTR control (enabled/disabled/handshake/toggle).

If you noticed some obvious mistakes in this way of handling modem, I would be grateful if you explained me what I had done wrong. If everything is fine, on the other hand, maybe you have got an idea why the modem hangs?

Thank you in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T00:16:01+00:00Added an answer on May 12, 2026 at 12:16 am

    Typically the DCB settings are the first things you should verify. The modem documentation should mention the serial port settings. If not search online with the model number of your modem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Are you running on OS 3.0? I saw the same… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer It looks like you need to register Apache::Session::Memcached with Apache::Session::Wrapper,… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer Use DATENAME or DATEPART: SELECT DATENAME(dw,GETDATE()) -- Friday SELECT DATEPART(dw,GETDATE())… May 12, 2026 at 1:19 am

Related Questions

I have got a python script which is creating an ODBC connection. The ODBC
I have got a C function in a static library, let's call it A,
I have got a table in MS Access 2007 with 4 fields. Labour Cost
I have got a template class as follows: class MyClass<T> { T field; public
I have got a collection. The coll has strings: Location=Theater=2, Name=regal, Area=Area1 and so

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.