Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Function to disconnect a modem

Status
Not open for further replies.

jgoodman00

Programmer
Jan 23, 2001
1,510
Does anyone know the function which is used to disconnect a modem. To complicate things further, we use internet connection sharing, & I want to be able to kill the connection on the host from the client.

This might seem really pointless, but it is because ICS doesn't automatically disconnect. James Goodman
j.goodman00@btinternet.com
 
How about sending "ATH" as a control string? You have to send the escape sequence (usually "+++", then wait one second) first, of course. Rick Sprague
 
Could you explain that in detail please, because I have never done anything like this before & have no idea what you meant :). All I can assume is that the ATH & the +++ is the disconnect command for the modem, but I don't actually know how you propose to send it to the modem.... James Goodman
j.goodman00@btinternet.com
 
I'm sorry. I didn't read your original question carefully enough (guess I was just tired). You're using the modem for an Internet connection. That means YOU don't own the modem; Dial-Up Networking on the other machine does. I don't think you can send the command string I was suggesting.

I guess you'd have to get the TCP/IP DLLs on the other machine to shut down. I'm not very familiar with this, but I would think that they would do this on their own, provided the connection from ICS on your machine was terminated. Since ICS is supposed to be transparent to programs, my guess would be that you'd shut down your local connection to ICS the same way you'd shut down a TCP/IP connection. But I'm afraid I don't know how to do this.

Is this failure of ICS to disconnect the modem a documented fact? Maybe you've got a local listener process still running, and that's keeping the connection alive. Check your Task List for other Internet-related programs that might be getting started inadvertently. I hate to say it, but you might even have a Trojan Horse virus that's keeping the connection open. Rick Sprague
 
You might have to create some type of server/client relationship between the machine that owns the modem and the computer u wanna shutdown the modem from, then on the server side of that application (machine that owns the modem) you can send the command from there

Client----TCP/IP-----Server-------ATH CMD-----Modem Gordon R. Durgha
gd@vslink.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top