Thread View: comp.os.linux.misc
3 messages
3 total messages
Started by Jon Thackray
Tue, 19 Jul 1994 20:25
Forcing DTR low on modem to hangup from Linux?
Author: Jon Thackray
Date: Tue, 19 Jul 1994 20:25
Date: Tue, 19 Jul 1994 20:25
13 lines
1546 bytes
1546 bytes
I've been trying to get a 'hangup' program to run after PPP terminates, to hang up the modem. SLIP (via the DIP program) use the '+++' and 'ATH' commands, but these don't seem to work if the modem is busy receiving data. (I think the manual says that '+++' needs a 1 second gap) What's the best way to force DTR low (it is DTR, isn't it?), so that the modem is /guaranteed/ to go offline ...? Would I need to add a call to the kernel to be able to do this, or could it be done from user mode? Cheers, Jon. -- // Jon Thackray, 18 Windmill Wood, Amersham, Bucks. (0494) 721234.
Re: Forcing DTR low on modem to hangup from Linux?
Author: Rob Janssen
Date: Wed, 20 Jul 1994 07:55
Date: Wed, 20 Jul 1994 07:55
20 lines
1800 bytes
1800 bytes
In <30hcgo$rc@froggy.demon.co.uk> jrmt@froggy.demon.co.uk (Jon Thackray) writes: >I've been trying to get a 'hangup' program to run after PPP terminates, >to hang up the modem. SLIP (via the DIP program) use the '+++' and 'ATH' >commands, but these don't seem to work if the modem is busy receiving data. >(I think the manual says that '+++' needs a 1 second gap) >What's the best way to force DTR low (it is DTR, isn't it?), so that the >modem is /guaranteed/ to go offline ...? Would I need to add a call to the >kernel to be able to do this, or could it be done from user mode? Normally, just closing the port should do that. When it doesn't, make sure the HUPCL bit is set in the termios structure. Rob -- ------------------------------------------------------------------------- | Rob Janssen | AMPRnet: rob@pe1chl.ampr.org | | e-mail: pe1chl@rabo.nl | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU | -------------------------------------------------------------------------
Re: Forcing DTR low on modem to hangup from Linux?
Author: Al Longyear
Date: Wed, 20 Jul 1994 15:05
Date: Wed, 20 Jul 1994 15:05
27 lines
2074 bytes
2074 bytes
jrmt@froggy.demon.co.uk (Jon Thackray) writes: >I've been trying to get a 'hangup' program to run after PPP terminates, >to hang up the modem. SLIP (via the DIP program) use the '+++' and 'ATH' >commands, but these don't seem to work if the modem is busy receiving data. >(I think the manual says that '+++' needs a 1 second gap) >What's the best way to force DTR low (it is DTR, isn't it?), so that the >modem is /guaranteed/ to go offline ...? Would I need to add a call to the >kernel to be able to do this, or could it be done from user mode? If you specify that you have a "modem" connection (with the modem parameter), the pppd process will enable the HUPCL parameter for the serial device. This seems to work for most people in that when the last opener closes the serial device, the "Hang UP" sequence is performed by the serial.c code in the kernel by dropping the DTR signal. Do you have any other openers on the serial device? This will only work if pppd is the only process to have the serial device open. There is a "disconnect" parameter which may be used, similar to the "connect" parameter, to run a program to disconnect the link. -- Al Longyear longyear@netcom.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads