diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-02-12 06:00:38 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-02-12 06:00:38 +0000 |
commit | 3d9ed4425c9ee015f1384dfb5c4288ce5a15025d (patch) | |
tree | d604d47ed0783b1cb44ec9a1efb3c5cfb88fc203 /scripts | |
parent | 09634919d3524e15cce41331fe2504031bb19a9c (diff) | |
download | master-187ad058-3d9ed4425c9ee015f1384dfb5c4288ce5a15025d.tar.gz master-187ad058-3d9ed4425c9ee015f1384dfb5c4288ce5a15025d.tar.bz2 master-187ad058-3d9ed4425c9ee015f1384dfb5c4288ce5a15025d.zip |
add support for netgear dg834 and the almost identical sphairon jdr454wb: new images, automatic boot loader patcher, updated flash script (dlink.pl renamed to adam2flash.pl) - Thanks to Jonathan McDowell (Noodles)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3221 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/adam2flash.pl (renamed from scripts/dlink.pl) | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/dlink.pl b/scripts/adam2flash.pl index ace6476e92..bd0fa69a61 100755 --- a/scripts/dlink.pl +++ b/scripts/adam2flash.pl @@ -39,20 +39,27 @@ my $probe = IO::Socket::INET->new(Proto => 'udp', my $setip = unpack("N", inet_aton($ip)); $setip > 0 or usage(); +my @packets; +foreach my $ver ([18, 1], [22, 2]) { + push @packets, pack("vCCVNV", 0, @$ver, 1, $setip, 0); +} print STDERR "Looking for device: "; -my $packet = pack("vCCVNV", 0, 22, 2, 1, $setip, 0); my $broadcast = sockaddr_in(5035, INADDR_BROADCAST); my $scanning; my $box; $SIG{"ALRM"} = sub { return if --$scanning <= 0; - $probe->send($packet, 0, $broadcast); + foreach my $packet (@packets) { + $probe->send($packet, 0, $broadcast); + } print STDERR "."; }; $scanning = 10; -$probe->send($packet, 0, $broadcast); +foreach my $packet (@packets) { + $probe->send($packet, 0, $broadcast); +} print STDERR "."; while($scanning) { |