From: Roland G. <RGi...@a1...> - 2001-10-17 13:10:57
|
From=3A =22Andreas Lidberg=2C Halmstad Internet AB=22 =3Candreas=40hinet=2E= nu=3E =3E I am writing a system for controlling the status of our network = =3E (usingamong other things Net=3A=3ASNMP)=2E When something doesn=B4t r= eply = =3E as expected I want the system to send us (admins) a SMS with =3E an errormessage=2E=2E=2E =3E = =3E Now to the problem=3A =3E = =3E I am very new to Perl and actually to Unix/Linux in general and I = =3E am in need of some help=2E =3E I have NO idea of how to access the modem to do a dialup to a SMS = =3E Server and =3E to send the message=2E I do know how the message is supposed to look = =3E when sent =3E but I don=B4t know how to communicate with the modem=2E =3E = =3E I have gotten so far as to guess that IO=3A=3Aptty could be the right= = =3E way to walk=2C so thats why I am posting here=2E Well=2C actually you would want to use Expect to spawn an external modem = terminal program (typically =27tip=27) and let it handle communications = over the modem=2E Unfortunately I don=27t have any experience with modem= = dialup=2C so I cannot suggest something=2C you have to find out by yourse= lf = or continue asking around=2E What you need to do is to do it once manually and then write an Expect = script to repeat it=2E You start the program and take note what possible= = prompts you get=2E You type a sequence of characters and watch for the = systems answer=2C etc=2E Then you put that into a script using spawn()=2C= = send() and expect()=2E Now if you wanted to send the SMS via a webpage=2C that=27s something I = already have done and could give you a code example=2E=2E=2E Hope this helps=2C Roland -- RGiersig=40cpan=2Eorg |