Hi Enslin!

Here is an example:

#Onscreen message and WUG argument, only for test
print "NOKIA GSM SMS from WUG\n";
print "S0=$ARGV[0]\n";

#Actual start of script, trying to open COM port
open( PORT, "+>COM1" ) or die "Can't open COM1: $!";

#We will send SMS as text
print (PORT "at+cmgf=1\n");
sleep 3;

#Network administrator - 1 (1234567 - local phone number)
print (PORT "at+cmgs=\"1234567\"\n");
sleep 3;

#Arguments from WhatsUp - I send 4 aruments (%n %u %d %t)
print (PORT "$ARGV[0] $ARGV[1] $ARGV[2] $ARGV[3]".chr(26));
sleep 3;

#Free line (ENTER)
print (PORT "\n");

#Wait some time before sending message to other people
sleep 15;

#************************next SMSs*****************
#Network administrator - 2
print (PORT "at+cmgs=\"7654321\"\n");
sleep 3;
print (PORT "$ARGV[0] $ARGV[1] $ARGV[2] $ARGV[3]".chr(26));
sleep 3;
print (PORT "\n");
sleep 15;
#************************next SMSs*****************


You need to compile this script by perl compiler (I have used ActivePerl-5.8.0.806).
Then make a program notification in WUG, which launches compiled perl script (.exe file).
Also don't forget about WUG parameters in notification.
I have written and checked this script on Windows 2000 Server.
Modem is NOKIA PremiCell 09i.
( That was the main reason why i need this script, because modem uses ctr+Z command at the end of each command. If yours don't use ctr+Z parameter ( chr(26) ),
then you can make Windows batch file to printout to the COM port.
Also keep in mind that if you have another type of modem AT commands could be different.)

Don't hesitate to contact me

Best Regards,

Ed.

P.S. Don't forget to preconfigure your modem, for ex. set up a SMS message center of your GSM operator (in Latvia - at+csca="+3719202020",145)




"Enslin van Blerk" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

15.10.2004 09:11

Please respond to
[EMAIL PROTECTED]

To
<[EMAIL PROTECTED]>
cc
Subject
RE: [WhatsUp Forum] GSM modem





Hi Ed

 

Will you be able to help me with this or give me an example of the perl script?

 

 

Enslin

 

-----Original Message-----
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Edgars Smilgzdruvs
Sent:
13 October 2004 10:38
To:
[EMAIL PROTECTED]
Subject:
Re: [WhatsUp Forum] GSM modem

 


I use NOKIAs modem with perl script. I have external notification (.exe file in perl) that sends WUG parametrs to the appropriate COM port (where modem is attached).

AT commands for message sending and also phone numbers are stored in the script.


Ed.


"Daniel Donnelly" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

12.10.2004 23:06


Please respond to
[EMAIL PROTECTED]


To
<[EMAIL PROTECTED]>
cc
 
Subject
Re: [WhatsUp Forum] GSM modem

 


   




Enslin,

I don't think it can send direct to a GSM. But if the modem came with
software to control and talk to it, and it accepts command line
options, you can have WUG call an external program in a Notification
and pass parameters. Batch files can be run in this way, too.

Daniel Donnelly

----- Original Message -----
From: "Enslin van Blerk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 07, 2004 7:33 AM
Subject: [WhatsUp Forum] GSM modem


> Good Day
>
> I am running windows XP with Perl for windows. I also have a GSM
modem
> (Wavecom Fastrack M1206B) Can anyone tell me if WUG can send the
SMS's
> directly to the GSM modem, and how would I do this. Will Perl help,
> script etc.
>
>  Thanks
> E
>


Please visit http://www.ipswitch.com/support/mailing-lists.html
to be removed from this list.

An Archive of this list is available at:
http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/

Reply via email to