caidaer

caidaer

  • NA
  • 7
  • 0

MSComm. Exception from HRESULT: 0x800A1F4C

Jan 16 2005 5:19 PM
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. 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); 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

Answers (3)