Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Correct way to reset the modem

Correct way to reset the modem

Scheduled Pinned Locked Moved C#
questioncsharpcomsysadminhelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Serge Lobko Lobanovsky
    wrote on last edited by
    #1

    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)

    H S 2 Replies Last reply
    0
    • S Serge Lobko Lobanovsky

      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)

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      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

      S 1 Reply Last reply
      0
      • H Heath Stewart

        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

        S Offline
        S Offline
        Serge Lobko Lobanovsky
        wrote on last edited by
        #3

        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)

        H 1 Reply Last reply
        0
        • S Serge Lobko Lobanovsky

          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)

          H Offline
          H Offline
          Heath Stewart
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • S Serge Lobko Lobanovsky

            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)

            S Offline
            S Offline
            Squeaker
            wrote on last edited by
            #5

            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,

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups