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="" 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="" 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!
-
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="" 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="" 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!
I've had a similar problem where StreamReader.ReadLine() gobbled up one too many line endings while waiting for input over a NetworkStream. I ended up writing my own ReadLine() function to solve this problem.