The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Bash: Exiting while true loop when terminal is not the focus window acclaypool Shell Programming and Scripting 2 02-25-2008 02:02 PM
Script to launch terminal window? omerta SUN Solaris 5 06-30-2005 02:48 PM
Dial-Out & Dial-In Connections in OpenServer 5.0.6. thecobolguy SCO 1 04-28-2005 04:43 AM
Find and activate a terminal window cmp1jrv SUN Solaris 0 01-27-2005 08:48 AM
Terminal 'Local Echo' lost on Modem Dial-out mybeat UNIX for Advanced & Expert Users 2 04-12-2002 04:22 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-29-2004
Registered User
 

Join Date: Oct 2003
Location: Rio de Janeiro - Brazil
Posts: 37
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
How do I dial a number from the terminal window?

Hi Folks,


Just for the record: I am a Mac User.

But I believe my question is a simple UNIX FBSD question.

My problem: I need to learn how to "pick up" the telephone line and dial a number from an Unix shell or shell script execution.

My modem is at /dev/cu.modem

Why I need it?

I have an eletronic circuit in my office that is talking to a program in my computer. In case something goes wrong in the circuit, I would like my computer to dial me at my cell phone.

I have succesfullly done it using the efax command, using an AppleScript that accesses a shell via "do shell script blah, blah, blah". In fact the script tries to send me a fax at my cell phone.

I believe that there should be an Unix command built into my system that would let me to do this simple task.

Thanks for your help,


Bernardo Höhl - Rio de Janeiro - Brazil
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-29-2004
seg seg is offline
Registered User
 

Join Date: Aug 2003
Posts: 59
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
If you want to dial via a shell script perhaps echoing the AT commands to the device might work. echo "ATAH" > /dev/cu.modem. Not sure though.

Your best bet would be to find a dialer that would be used for dialing an ISP to connect the computer to the internet and modify the settings to dial your cellphone.

Google and Sourceforge.net are your best bets for that.

-Seg
Reply With Quote
  #3 (permalink)  
Old 12-29-2004
Registered User
 

Join Date: Oct 2003
Location: Rio de Janeiro - Brazil
Posts: 37
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Hi Seg!

Thanks for posting.

Unfortunately your "echo" tip did not work.

I have also successfully applescripted the program "Internet Connect", as you sugested. And it worked.

As I said, the best I have achieved is using built in eFax. And I believe eFax is using some resource I could be using directly... Daemon? Protocol?

But for my education, I would like to learn how to do it the right way.

Any variations I could try on echoeing?

Thanks again.
Reply With Quote
  #4 (permalink)  
Old 12-29-2004
seg seg is offline
Registered User
 

Join Date: Aug 2003
Posts: 59
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
I don't think there is a 'right way', just get by with what you've got. Glad you got it to work.

-Seg
Reply With Quote
  #5 (permalink)  
Old 12-29-2004
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,253
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
I'm not a mac user, but there are typically programs called "cu" or "tip" to do this on most versions of unix.
Reply With Quote
  #6 (permalink)  
Old 12-29-2004
Registered User
 

Join Date: Oct 2003
Location: Rio de Janeiro - Brazil
Posts: 37
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
No manual entry for cu or tip...
Reply With Quote
  #7 (permalink)  
Old 12-29-2004
seg seg is offline
Registered User
 

Join Date: Aug 2003
Posts: 59
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
http://bama.ua.edu/cgi-bin/man-cgi?tip+1
Reply With Quote
  #8 (permalink)  
Old 12-29-2004
Registered User
 

Join Date: Oct 2003
Location: Rio de Janeiro - Brazil
Posts: 37
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Seg,

Thanks for the link. But what I meant in my last post was that I don't have cu or tip in my system.
Reply With Quote
  #9 (permalink)  
Old 12-29-2004
seg seg is offline
Registered User
 

Join Date: Aug 2003
Posts: 59
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Since you haven't taken the inititive to go out and get those programs then my best advice is to stick with what you've got.

-Seg
Reply With Quote
  #10 (permalink)  
Old 12-29-2004
Registered User
 

Join Date: Oct 2003
Location: Rio de Janeiro - Brazil
Posts: 37
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Are you suggesting me to download the source, compiling and installing them on my OS?

Thanks!

I didn't think of that...
Reply With Quote
  #11 (permalink)  
Old 12-29-2004
Registered User
 

Join Date: Oct 2003
Location: Rio de Janeiro - Brazil
Posts: 37
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
I have downloaded a small app called ZTerm that is something like a terminal window to access the modem.

One very interesting thing I noticed now:

As I open the ZTerm app and another regular Terminal, each window side by side, and I type on the regular terminal window:

# echo "ATDT0," > /dev/cu.modem

and hit enter

The "ATDT0," appears on the ZTerm window. That means that my device is "listening" to my echo command. Right?

As I go back to ZTerm window, and hit enter, I mean just enter, not the entire command line, the modem dials "zero".

I think my dificulty is to include the enter in the "ATDT0," string, using the regular terminal window.

I tried (on the regular terminal window) placing a "\" just after the comma, and including an "enter" in the string, but this only caused the carrier to move one line down in the ZTerm window.

I guess I can do it once I can input the "enter" in the modem string.

Any clues?
Reply With Quote
  #12 (permalink)  
Old 12-29-2004
seg seg is offline
Registered User
 

Join Date: Aug 2003
Posts: 59
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Didnt you already solve this whole issue by using the dialer built into your Apple OS?

Why are you beating a dead horse?
Reply With Quote
  #13 (permalink)  
Old 12-29-2004
Registered User
 

Join Date: Oct 2003
Location: Rio de Janeiro - Brazil
Posts: 37
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Just want to understand the OS's mechanisms, want to learn.

GUI solutions are not as robust as shell solutions...

A simple screensaver can ruin a GUI solution sometimes.

Please forgive for being so persistent.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes


The 50 most popular UNIX and Linux searches.
Google Search Cloud for The UNIX and Linux Forums
"inappropriate ioctl for device" 421 service not available, remote server has closed connection ^m autosys awk trim bash eval bash exec bash for loop boot: cannot open kernel/sparcv9/unix close_wait command copy/move folder in unix curses.h cut command in unix dead.letter find grep find null character in a unix file grep multiple lines grep or grep recursive inaddr_any inappropriate ioctl for device logrotate.conf lynx javascript mailx attachment mget mtime ping port remove first character from string in k shell replace space by comma , perl script scp recursive segmentation fault(coredump) sftp batch sftp script snoop unix stale nfs file handle syn_sent tar exclude unix unix .profile unix com unix date command unix forum unix forums unix interview questions unix mtime unix simulator unix.com vi tab size vi+substitute+end+of+line+character while loop within while loop shell script


All times are GMT -7. The time now is 11:42 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10