Re: Expect program?

Mark Conway Wirt (mark@intrepid.net)
Wed, 25 Oct 1995 10:39:32 -0400

This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.

--1204552575-1565226631-814631972:#4444
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Mon, 23 Oct 1995, Arno Griffioen wrote:

> Hi people!
>
> I'm looking for a configurable send-expect program to program some
> modems and perhaps use it for using pagers.... I have read some
> things about such a beast here, but I didn't save the messages :-(
>
> Could someone give me a pointer to such a program?
>
> Thanx
>
> Bye Arno.

This is a quick hack, so use it at your own risk. It's not very elegent,
but it works.

I've enclosed two scripts. The first will log into the portmaster, take
the modem off line, prompt for a return, then telnet to the modem. At
that point, you can send commands to the modem etc. It you're always
sending the same commands to the modem, you could hardwire the commands
into the script. When you're finished, close your telnet session and
you're back at the prompt. To put the modem back on line use the second
script.

To use the script, you will need to change the value of the $host
variable to the name of your portmaster.

--Mark

ps: Sorry, but I haven't had a chance to make these scripts robust at
all (error checking, etc.)

-------------------------------------------------------------------------
Mark Conway Wirt | Intrepid Technologies Inc.
mark@intrepid.net | Shepherdstown West Virginia
finger mark@intrepid.net for PGP | (304) 876-1199
http://www.intrepid.net/ | A Full-Service Internet Provider
-------------------------------------------------------------------------

--1204552575-1565226631-814631972:#4444
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=takeoff
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.3.89.9510251032.C4444@loki.intrepid.net>
Content-Description:

IyEvdXNyL2xvY2FsL2Jpbi9leHBlY3QgLWYNCg0KIyBTZXQgdGhlIGhvc3Qg
aGVyZQ0Kc2V0IGhvc3QgcG0xLnlvdXIuZG9tYWluLmNvbQ0KDQppZiB7ICRh
cmdjICE9IDF9IHsNCiAgICBzZW5kX3VzZXIgIlVzYWdlOiB0YWtlb2ZmIHBv
cnRcbiINCiAgICBleGl0DQp9DQoJDQpzZW5kX3VzZXIgIkxvZ2dpbmcgb250
byAkaG9zdC4uLlxuIg0KDQpzZW5kX3VzZXIgIlBsZWFzZSBFbnRlciBhIFBh
c3N3b3JkOiAiDQoNCnN0dHkgLWVjaG8NCmV4cGVjdCAtcmUgIiguKilcbiIN
CnN0dHkgZWNobw0KDQpzZXQgcGFzc3dvcmQgJGV4cGVjdF9vdXQoMSxzdHJp
bmcpDQoNCnNwYXduIHRlbG5ldCAkaG9zdA0KDQpleHBlY3QgIm9naW46Ig0K
c2VuZCAiIXJvb3RcciINCmV4cGVjdCAiYXNzd29yZDoiDQpzZW5kICIkcGFz
c3dvcmRcciINCmV4cGVjdCAiPiINCg0Kc2VuZCAic2V0IFtsaW5kZXggJGFy
Z3YgMF0gbW9kZW0gb2ZmXHIiDQoNCmV4cGVjdCAiPiINCnNlbmQgInNldCBb
bGluZGV4ICRhcmd2IDBdIGRldmljZSAvZGV2L25ldFxyIg0KDQpleHBlY3Qg
Ij4iDQpzZW5kICJzZXQgW2xpbmRleCAkYXJndiAwXSBzZXJ2aWNlX2Rldmlj
ZSB0ZWxuZXQgNjAwMFxyIg0KDQpleHBlY3QgIj4iDQpzZW5kICJyZXNldCBb
bGluZGV4ICRhcmd2IDBdXHIiDQoNCmV4cGVjdCAiPiINCnNlbmQgImV4aXRc
ciINCg0Kc3Bhd24gdGVsbmV0ICRob3N0IDYwMDANCg0KaW50ZXJhY3QNCg0K

--1204552575-1565226631-814631972:#4444
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=puton
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.3.89.9510251032.D4444@loki.intrepid.net>
Content-Description:

IyEvdXNyL2xvY2FsL2Jpbi9leHBlY3QgLWYNCiMgRXhwZWN0IHNjcmlwdCB0
byBwdXQgYSBtb2RlbSBiYWNrIGluIGFjdGl2ZSBtb2RlDQoNCiMgU2V0IHRo
ZSBob3N0IGhlcmUNCnNldCBob3N0IHBtMS55b3VyLmRvbWFpbi5jb20NCg0K
aWYgeyAkYXJnYyAhPSAxfSB7DQogICAgc2VuZF91c2VyICJVc2FnZTogcHV0
b24gcG9ydFxuIg0KICAgIGV4aXQNCn0NCgkNCnNlbmRfdXNlciAiTG9nZ2lu
ZyBvbnRvICRob3N0Li4uXG4iDQoNCnNlbmRfdXNlciAiUGxlYXNlIEVudGVy
IGEgUGFzc3dvcmQ6ICINCg0Kc3R0eSAtZWNobw0KZXhwZWN0IC1yZSAiKC4q
KVxuIg0Kc3R0eSBlY2hvDQoNCnNldCBwYXNzd29yZCAkZXhwZWN0X291dCgx
LHN0cmluZykNCg0Kc3Bhd24gdGVsbmV0ICRob3N0DQoNCmV4cGVjdCAib2dp
bjoiDQpzZW5kICIhcm9vdFxyIg0KZXhwZWN0ICJhc3N3b3JkOiINCnNlbmQg
IiRwYXNzd29yZFxyIg0KDQpleHBlY3QgIj4iDQpzZW5kICJzZXQgW2xpbmRl
eCAkYXJndiAwXSBsb2dpbiBuZXR3b3JrIGRpYWxpblxyIg0KDQpleHBlY3Qg
Ij4iDQpzZW5kICJzZXQgW2xpbmRleCAkYXJndiAwXSBtb2RlbSBvblxyIg0K
DQpleHBlY3QgIj4iDQpzZW5kICJzYXZlIFtsaW5kZXggJGFyZ3YgMF1cciIN
Cg0KZXhwZWN0ICI+Ig0Kc2VuZCAicmVzZXQgW2xpbmRleCAkYXJndiAwXVxy
Ig0KDQpleHBlY3QgIj4iDQpzZW5kICJleGl0XHIiDQoNCg0K
--1204552575-1565226631-814631972:#4444--