Using Net::Telnet in Perl to connect to an adsl modem
Hello,
First of all, congratulations on this forum! Very mice material!
This is my fist thread and it has to do with connecting to an adsl modem and executing some commands.
Heres what I do:
But it does not work. Nothing gets printed on input.txt file.
My guess is that something goes wrong with the waitfor() subs as the connection hungs-up after exiting, as I cannot connect again.
Below is a copy-paste of the output when doing it manually.
Thanks in advance!
George.
Last edited by Ravendark; 09-08-2009 at 12:31 PM..
Hiya,
I'm trying to write a shell script to enter a bunch of loooooong configuration commands (to set ip, gateway etc.) for a quite outdated modem. It must be accessed via telnet. Here the preliminary code:
#!/bin/bash
(echo "open 192.168.1.254"; sleep 10
echo "Administrator";... (1 Reply)
I am writing perl script to configure Cisco device but Variables inside Net::Telnet::Cisco Module doesn't work and passed to device without resolving.
Please advise.
here is a sample of script:
use Net::Telnet::Cisco;
$device = "10.14.199.1";
($o1, $o2, $o3, $o4) = split(/\./,$device);... (5 Replies)
I'm trying to learn how to get my script to execute the enter button when it telnets into a router and the router displays output but you need to press the space bar or enter button to continue displaying my output of the router.
How is this done? (0 Replies)
in "cmd" command i want to copy the ouput of the command excuted to a particular file in a directory.
How to do this..??
Ex : $telnet->cmd(String => 'allip:acl=a1;',Prompt => '/</');
i want to copy o/p of the command "allip:acl=a1;" in a log file in a particular directory.
Plz suggest.. (1 Reply)
Hi,
Can anybody help me in writing command "waitfor" for string
"C:\WINNT\Profiles\mfcf0508>" while using net::Telnet module.
I tried the below format :
$telnet->waitfor('/"C\:\WINNT\Profiles\mfcf0508>".*$/i');
Getting error as : pattern match timed-out
Plz help me (3 Replies)
Hello all,
granted that I am an absolute beginner with Solaris, I'd like to use my adsl modem, t's a Zyxel prestige 630.
I managed to install and configure it under Ubuntu using the drivers from Conexant AccessRunner ADSL USB modems with Linux ; is there a chance to do the same under Solaris 10... (0 Replies)
Hi,
I have USB Siemens Santis 100 ADSL modem.I need driver for this modem on Solaris 10.Please help me with some info.Platform is x86.Thanks. (2 Replies)
Hello There,
I configure my Modem as follow.
Step1.
# admintool &
Then from Browse --> Serial Port
i select tta port and Edit --> Modify
From that i select Template : Modem:Dial Out
Baud Rate: 9600
Ok
Step 2
# tip /dev/cua/a
connected (1 Reply)