.NET Framework Bookmark and Share   
 index > .NET Framework Networking and Communication > Serial port AT+CMGW command working fine while using breakpoint but not while debugging?
 

Serial port AT+CMGW command working fine while using breakpoint but not while debugging?

I am using wireless modem to send receive sms in my C# windows application.
I am trying to save sms to memory first and then send it like follwing:
When i executes this command:
AT+CMGW=66
(where '66' is PDU code length)

It gives me this, so far so good:
>

Then I enters PDU code + enter:
0011010B813032329896F500081D3400730061006100640020006B00680061006E002000240020006900730020002000250020006300680075002000610064006D0069

It gives me this, in which '26' shows me the memory index this message has been saved to:
+CMGW: 26
OK

But the probelm is, above code does work fine when I uses breakpoint and sees step by step execution. And when I simple runs the code executing same AT commands, modem doesnt responses after entering PDU code + <enter key>.

Please help me.......Or if I want to send sms without saving it to memory in PDU format so how can I?
Saad Khan
I guess you're reading for a response before the modem has sent it. You need to keep reading until you get the full response. Keep reading until you hit a newline at least (though there will be a multi-line responses in some cases).
http://www.alanjmcf.me.uk/ Please follow-up in the newsgroup. If I help, mark the question answered
Alan J. McFarlane

You can use google to search for other answers

Custom Search

More Threads

• Network stream problems (PLEASE HELP!)
• SMTP Email Sink
• Where can I find help on this
• https: using server authentication Frame Work 1.1
• Efficient Webcrawler / Webspider
• System.Net.Mail.Attachment.Add is only working in Debug Mode???
• Networking
• How Do I Use HTTP Headers in C#?
• how to download site in a temp folder
• Ftp "Create Directory" and "Upload File"