Knowing when GSM/CSD connection has broken
Pergunta
Background
I have a GSM modem connected through a COM port. I open the COM port using CreateFile
and I'm able to send various AT commands. I use ATD
to place a CSD (data) call or ATS0=1
to receive one.
Now the problem
How can I know that the connection has broken in the middle of a data call?
Actually, when a call is broken I get a NO CARRIER
message. But the problem is GSM modem mixes the commands/notifications with the actual data. So How can I know if this message is part of the data itself, or it's in fact a call-broken message from the modem?
Thanks, guys.
Solução
The CD signal (Carrier Detect) will turn off. Named RLSD in GetCommModemStatus() and WaitCommEvent(). That's the moral equivalent of std::bad_alloc when you work with a modem.