MSComm. Exception from HRESULT: 0x800A1F4C

C

caid

Hi there.

I'm writing a C# app (in VS.NET 2003) that sends a binary sms using
MSComm. I got it going with a gsm modem, but ideally we want to use a
cellphone as the sending device. However, when I use a cellphone
(Nokia 7210) with the same code, I get the above exception.

The first communication with the phone is as follows:

com_.Output = "ATZ;E\n";
GetReturnText( "OK" , 2 );


In GetReturn Text, the exception is thrown while attempting to get the
response from the phone.
[code:1:c9ad72e6d3]
do
{

// If there is data waiting, buffer it in our own string buffer.
if (com_.InBufferCount > 0)
buffer +=(string) com_.Input; <====EXCEPTION THROWN HERE

// Look for response from device.
found = (buffer.IndexOf(text) > -1);

} while (!ElapsedTime & !found);
[/code:1:c9ad72e6d3]

When sending the same input data using Hyperterminal, the message is
sent normally, with no error.

Any suggestion why this might be happening?

Thanks in advance

Caid[/code]

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
 
G

Guest

I am just working on same thing.
I would like to write a class which could receive and send SMS message
directly through a wavecomm modem connected to serial in my pc.
Do you know any class for a gsm protocol to communicate with gsm modem?
Are you writing it alone?

please help

Przemo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top