Correct way to reset the modem
-
Hi people, Intro: The modem on the server is init'ed to pickup the line after first RING (ATS0=1). Another modem calls, performs some actions, informs the server that it is going to disconnect, and disconnects. After the server has received the info msg about disconnect, it sends "+++ATH" to the modem and waits for "NO CARRIER". After that it re-opens the connection with the COM port, re-init'ing the modem. No TAPI here, just plain AT commands. The problem: The disconnection scenario works for some modems, and doesn't for others. The server application hangs up while waiting for "NO CARRER", i.e it never receives this message. Incoming calls are not handled at this moment. The qustion: What is the correct way to re-open the connection with the modem, successfully hanging up the connection? Regards, Serge (Logic Software, Easy Projects .NET site)
-
Hi people, Intro: The modem on the server is init'ed to pickup the line after first RING (ATS0=1). Another modem calls, performs some actions, informs the server that it is going to disconnect, and disconnects. After the server has received the info msg about disconnect, it sends "+++ATH" to the modem and waits for "NO CARRIER". After that it re-opens the connection with the COM port, re-init'ing the modem. No TAPI here, just plain AT commands. The problem: The disconnection scenario works for some modems, and doesn't for others. The server application hangs up while waiting for "NO CARRER", i.e it never receives this message. Incoming calls are not handled at this moment. The qustion: What is the correct way to re-open the connection with the modem, successfully hanging up the connection? Regards, Serge (Logic Software, Easy Projects .NET site)
And this has to do with C# or even .NET how? It's not a problem with whatever language/framework/platform you use, but a problem with modem commands and should be asked in an appropriate forum (and CodeProject might not be the best place for more hardware-related questions). To note, however, not all modems work the same. Win-modems (software-driven piles of rubbish) and firmware modems do work rather differently, and some modems may work differently than their counterparts (perhaps even by the same manufacturer). These are usually minor differences, but that could be your problem here.
Microsoft MVP, Visual C# My Articles
-
And this has to do with C# or even .NET how? It's not a problem with whatever language/framework/platform you use, but a problem with modem commands and should be asked in an appropriate forum (and CodeProject might not be the best place for more hardware-related questions). To note, however, not all modems work the same. Win-modems (software-driven piles of rubbish) and firmware modems do work rather differently, and some modems may work differently than their counterparts (perhaps even by the same manufacturer). These are usually minor differences, but that could be your problem here.
Microsoft MVP, Visual C# My Articles
Heath, Heath Stewart wrote: And this has to do with C# or even .NET how? The application is written in C# and .NET. Also, a number of people (you being the 1st) have quite an experience in many fields, so I was hoping I can get a professional answer here in this very forum. Moreover, I do know about modem differences. I'm just stuck with this problem for the last 3 days. I tried quite a number of aproaches, but with now result. Just thought somebody here has met the same challenge. Regards, Serge (Logic Software, Easy Projects .NET site)
-
Heath, Heath Stewart wrote: And this has to do with C# or even .NET how? The application is written in C# and .NET. Also, a number of people (you being the 1st) have quite an experience in many fields, so I was hoping I can get a professional answer here in this very forum. Moreover, I do know about modem differences. I'm just stuck with this problem for the last 3 days. I tried quite a number of aproaches, but with now result. Just thought somebody here has met the same challenge. Regards, Serge (Logic Software, Easy Projects .NET site)
Serge Lobko-Lobanovsky wrote: The application is written in C# and .NET. Like I said in my previous post, this doesn't matter. Whether you wrote it in C# (or any other language targeting the CLR), C, C++, Perl, or any other language, the problem would be the same. This forum is for C# questions. Even ASP.NET questions written in C# (that have to do with ASP.NET issues) are redirected to the ASP.NET forum (it's more specialized). You may have a slight chance of finding the answer here, but you'll have a much better chance by using google to find some modem forums, mail lists, or newsgroups. You'll have much better success there.
Microsoft MVP, Visual C# My Articles
-
Hi people, Intro: The modem on the server is init'ed to pickup the line after first RING (ATS0=1). Another modem calls, performs some actions, informs the server that it is going to disconnect, and disconnects. After the server has received the info msg about disconnect, it sends "+++ATH" to the modem and waits for "NO CARRIER". After that it re-opens the connection with the COM port, re-init'ing the modem. No TAPI here, just plain AT commands. The problem: The disconnection scenario works for some modems, and doesn't for others. The server application hangs up while waiting for "NO CARRER", i.e it never receives this message. Incoming calls are not handled at this moment. The qustion: What is the correct way to re-open the connection with the modem, successfully hanging up the connection? Regards, Serge (Logic Software, Easy Projects .NET site)
You may need a comma after the "+++" Escape Sequence command. Many modems expect a pause at this point. Each modem manufacturer interprets the AT commands somewhat differently and it is sometimes difficult to find a command that will work for all modems. I recommend that you perform a Google search using terms like: "AT Command", Reset, Escape, and DTR. If you know the manufacturer of the modem chipset (like Rockwell or U.S. Robotics) you can go to their website and get the AT Command Document that explains exactly how their AT Commands work. For your purposes it may be better to reset the modem by dropping DTR (requires certain state set by AT&D command), but is takes less time. (Check me on that.) Regards,