473,768 Members | 8,216 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MSComm. Exception from HRESULT: 0x800A1F4C

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:c9ad72e6 d3]
do
{

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

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

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

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
*-----------------------*
Nov 16 '05 #1
1 3871
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

"caid" wrote:
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:c9ad72e6 d3]
do
{

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

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

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

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
*-----------------------*

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2162
by: RSB | last post by:
Hi Every one, i am using the try Catch block.. and the Exception object has a Message Property but i want to Catch the Error Number so that based on the Error number i can display Different error message.... try{ }
0
1984
by: BizWorld | last post by:
I am using a com component in my web application. when i call a method of com component. it gives the following error only ComException HRESULT: 0xC0000005 If i run this com component in VB 6 exe in stand alone application. it runs fine. It looks like Interop assembly is generating this error. i am using
1
3529
by: Peter Krikelis | last post by:
Hi, I am trying to develope a User Control Library that features MScomm control. I test my user control in a test application. When I run the application I receive the following: An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in axinterop.mscommlib.dll
3
7852
by: Lekyan | last post by:
I have problem setting the password for an ADAM user using C#. I used the SetPassword code given in the Microsoft page, changed several parameters, but ran into an exception. I wonder if other people have solved this problem. But I have searched Google groups for a couple days but still couldn't get a solution. I copied the code from: ...
1
7464
by: Recep TARAKÇI | last post by:
hi everbody i am using visual basic 2005. i am write a modem control program and get callerID value. i am send a AT command to modem. Dim mscomm1 As New MSCommLib.MSComm mscomm1.CommPort = 3 mscomm1.PortOpen = True
2
17372
by: sgr | last post by:
Hello I'm making an application that uses an excel worksheet, My problem appears when I open the worksheet to see the data (then I close it and save the changes) and I try to insert a new row from my application appears the error: System.Runtime.InteropServices.COMException(0x800401A8): Exception HRESULT: 0x800401A8 Thanks for all
6
5288
by: cmdolcet69 | last post by:
I get tis error message as soon as i a step into the comm1.Output = Packet(i) line of code. Below is my code could someone run this and see if they get the smae message? Public Sub GetIndicator_Info() Dim Len As Byte = 6 Dim Cmd As Byte = 7 Dim loPass_byte As Byte = 28
0
1705
by: cmdolcet69 | last post by:
I get the following error message when I output to the mscomm: An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in COM.exe Additional information: Exception from HRESULT: 0x800A1F52. No one has been able to tell me why this isn't working. I know VB 2003 doesn't have serial control however I need to send this with the mscomm. It will break at the line : comm1.Output = Packet(i)
4
14410
by: fergc | last post by:
Hi.. I'm learning visual basic, so I installed the Visual Studio 2008 Express Edition to do the school projects, but when I try to look at the properties of my project I can't.. this is what appears in all the properties tabs Error trying to load the page. The system can not find the file specified. (Exception HRESULT: 0x80070002) can anyone help please?
0
9576
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10175
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9961
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9843
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6656
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5283
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5425
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3534
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2808
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.