Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
News

Telecommunication Scripting Languages? 7

ronzo asks: "I need to write some scripts/programs that call out to a site (modem), login in, send or receive files using kermit or xmodem. Previously I have done this using a language called db/c and did it all through standard in/out. I want to use a open source solution, because this needs to run on a linux box. I've started looking at perl, but the input/keyin type commands seem a little limiting. Any suggestions or ideas? " I thought some kermit clients had a scripting language that you could use to implement something like this. Althogh this IS possible in Perl, I KNOW something to do this exists so writing something to do this from scratch would more than likely be a waste of time.
This discussion has been archived. No new comments can be posted.

Telecommunication Scripting Languages?

Comments Filter:
  • by Zurk ( 37028 )
    I believe its fairly easy to do it in C..ive dont it myself on DOS so it should be equally easy for linux. just use the x/y/zmodem libraries to d/l or u/l stuff and send text i/o to/from the ttyS ports. KPPP does stuff like this anyway - look at the source,.
  • get it from the Tcl archives, or via www.scriptics.com
  • by Anonymous Coward
    you could look at Expect.pm for perl which
    try's to emulate the functionality provided
    by Expect (which is tcl based).

    I acutally used a Expect script to login
    to my last employer's PPP account. It was
    quite flexible.
  • He mentioned file transfer in his request, so Perl's Expect.pm is the best tool. His perl script can do any necessary directory examination and manipulation as well as the comm activity.
  • I wrote some software a couple years ago using USR voice modems (it was a public number, call up, choose a number from the menu, and have some weather data for one of our stations read back to you). It was done in perl, with out own simple module for doing basic handling. If you don't want to try your hand at it yourself, I'm sure there are several modules out there for it (several have suggested Expect.pm so far).

    That program was done in a total of about 150 lines for the main portion of it, and another 100-150 lines in our communications module.

    I've moved on, and haven't called it in over a year, but if you are ever in the Corpus Christi, TX area, try it out--it should be at (512) 992-WIND (Windinfo, service of the Conrad Blucher Institute for Surveying Science, Division of Nearshore Research).

  • TSIA
  • You are definitely looking for Expect.

    Expect is a TCL extension (TCL is a goofy little embeddable language with only one datatype- string. Fortunately it's not limited to scalar strings, though; it has arrays and lists (but not hashes).

    Expect just plain and simple rocks for automating anything. TCL is a snap to learn, and Expect doesn't add too many new commands. There IS a down side, though.

    The authors of the program turn a buck via having woefully inadequate documentation with Expect, and telling you to buy the O'Reilley book if you ever hope to make good use of Expect. Well, that might seem like strong-arm tactics, but let me tell you, that $25 O'Reilley book has saved me probably years off of my life :)

    To sum, you're looking for Expect. It's not really free, but it IS worth it.
    --Sync

A morsel of genuine history is a thing so rare as to be always valuable. -- Thomas Jefferson

Working...