LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-10-2007, 09:12 PM   #1
bingo
Member
 
Registered: Apr 2006
Distribution: Slackware
Posts: 57

Rep: Reputation: 15
Serial commands via shell script


I'm working on a simple security system for a relative's business, and I'd like a simple way to invoke a modem dial in a shell script. The modem is on /dev/ttyS0, and right now I'm just using pppd to dial, but I need something to just dial and hangup after about 10 seconds. Minicom works for sending manual commands, but I'm unsure about how to automate this. Any ideas? Thanks! ...Steve
 
Old 06-10-2007, 10:49 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
C-Kermit is perfect for dealing with serial ports & modems, and is very scriptable.
--- rod.
 
Old 06-15-2007, 09:56 PM   #3
bingo
Member
 
Registered: Apr 2006
Distribution: Slackware
Posts: 57

Original Poster
Rep: Reputation: 15
Thanks for the feedback... since my requirements are so simple, I've been trying to use cu and chat, with no luck. What would a command line dial command look like? I can open a connection with cu, and send a dial command, but it isn't working for me to do this together with the -c option. Thoughts? ...Steve
 
Old 06-16-2007, 12:14 AM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi, Bingo -

I have actually used "cu" and "tip" and "uucp" and the like in Lifetimes Past.

Trust me - theNbomr is right. If you want simple modem control of a serial TTY port, then Kermit is your best choice. For scripts, or for interactive use.

'Hope that helps .. PSM
 
Old 06-16-2007, 12:19 AM   #5
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by paulsm4
Hi, Bingo -

I have actually used "cu" and "tip" and "uucp" and the like in Lifetimes Past.

Trust me - theNbomr is right. If you want simple modem control of a serial TTY port, then Kermit is your best choice. For scripts, or for interactive use.

'Hope that helps .. PSM
I was wondering if wvdial could be started and then shutdown with CTRL-C from a shell script to "just dial and hangup after about 10 seconds".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
help with shell script commands Andrew0 Linux - Newbie 1 04-15-2006 12:55 PM
Alias or shell script to confirm 'exit' commands from a shell rose_bud4201 Programming 2 03-08-2006 02:34 PM
Shell Script Commands shandy^^^ Programming 16 02-09-2006 10:16 AM
Commands/Shell script ?? paraiso Linux - Newbie 11 04-21-2005 10:58 AM
Use a shell script to do login and other commands jpan Linux - General 15 01-12-2005 06:52 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration