diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-02-12 06:00:38 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-02-12 06:00:38 +0000 |
commit | c11b0e50212bdd5a360cae8835ab42cd153a35d6 (patch) | |
tree | 59ba95c12665a7ab7ee8c9ff80efc22102da14ca /openwrt/scripts | |
parent | 64544ce5225d04bcb62b6a10fe465ce560cb74a5 (diff) |
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@3221 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/scripts')
-rwxr-xr-x | openwrt/scripts/adam2flash.pl (renamed from openwrt/scripts/dlink.pl) | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/openwrt/scripts/dlink.pl b/openwrt/scripts/adam2flash.pl index ace6476e9..bd0fa69a6 100755 --- a/openwrt/scripts/dlink.pl +++ b/openwrt/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) { |