StreamReader.ReadLine() problem

i have been able to send AT commands to my gsm modem and got their response using streams.. im accessing serial communication port to connect to my gsm modem..

my problem now is when i issue the AT+CMGS="<destination number>" command my app hangs and the modem does not respond the '>' character.. it is as if it does not end reading the stream(?).. i dont know what's the problem with this one. i run it before in .NET 2003 and it works fine. when i upgraded to .NET 2005 beta, thats the time when i started encountering this problem..

added to that.. i think the problem also is with the response of AT+CMGS="<destination number>" command. it seems that the streamreader.readline() did not encounter an end of line or maybe an end of file(? not sure) because i tried issuing the command in the hyperterminal and the modem's response is '>' and it waits for user input, which in this case is the message...

can anybody help me with this? thank u so much!

[1010 byte] By [byang] at [2007-12-16]
# 1
Hi byang -
Sorry that it's taken this long to see this post! I'm moving this post to the .NET development general forum, where they can help you with your StreamReader problem.

Thanks,
Karen

KarenLiuMSFT at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 2

I know that this reply might be a bit on the late side, but thought I'd post a reply in case someone else experience the same problem. The reason is as you staded, the ReadLine method can't find the newline character. ReadByte or ReadExisting will work.

Best regards

Bj?rnar

Bjornar at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 3
If I remember correctly, you assigned the NewLine property some strange code (0x00C1?). See what happens if you don't...

nobugz at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 4
Can you please point me to where this thread was continued? I'm having a similar problem, but cannot find the thread.
TomRegan at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 5
This thread is hopelessly mangled and already marked as answered. Just start a new thread...
nobugz at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified