Saturday, March 14, 2015

DD-WRT Router For You

I was need to filter all DD-wrt supported devices by my criteria.
I'm looking any 256MB RAM, USB 3.0 device with existing firmware from DD-WRT.

So, you open supported devices page http://www.dd-wrt.com/wiki/index.php/Supported_Devices and playing with browser's console...

First, inject jQuery (Google Analytics style).
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = '//code.jquery.com/jquery-2.1.3.min.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

Now, review below snippet
$('table.wikitable').each(function() {
    var table = $(this)
    ,   brand = table.prevAll('h3:first').find('span.mw-headline').text()
    ,   devices = [];

    table.find('tbody tr:has(td)').each(function() {
        var tds = $(this).children();
        /* 
         0 - model
         1 - H.W. rev
         2 - FCC ID
         3 - Patform & Frequency [MHz]
         4 - RAM [MB]
         5 - Flash [MB]
         6 - Wireless NIC
         7 - WLAN standard [802.11]
         8 - mini PCI
         9 - Serial port
        10 - JTAG port
        11 - Eth. port count
        12 - Power Input [V/A]
        13 - Special Features Notes
        14 - min required DD-WRT version
        15 - Notes for Running DD-WRT
        */
    
        if (
            $.trim($(tds[4]).text()) >= 256     // RAM 256MB+
    && !$(tds[14]).is(':contains(TBD)') // not TBD firmware
    && $(tds[13]).is(':contains(3.0)')  // USB 3.0
   ) {

            devices.push(
                brand
                + ' ' + $.trim($(tds[0]).text())
                + ' (Rev=' + $.trim($(tds[1]).text()) + ')'
                + ' (CPU=' + $.trim($(tds[3]).html()).replace(/<br>/g, ' ') + ')'
                + ' (RAM=' + $.trim($(tds[4]).text()) + 'MB)'
                + ' (Flash=' + $.trim($(tds[5]).text()) + 'MB)'
                + ' (Ports=' + $.trim($(tds[11]).html()).replace(/<br>/g, ' ') + ')'
                + ' (Features=' + $.trim($(tds[13]).html()).replace(/<br>/g, ' ') + ')'
                + ' (DD-WRT=' + $.trim($(tds[14]).html()).replace(/<br>/g, ' ') + ')'
            );
        }
    });

    if (devices.length) {
        console.warn('Total '+ devices.length +' devices for '+ brand);
        for (var i in devices) {
            console.log(devices[i]);
        }
        console.log('');
    }
});

And result will be as follows
Total 4 devices for Asus
Asus RT-AC56U (Rev=-) (CPU=Broadcom BCM4708A0 @800) (RAM=256MB) (Flash=128MB) (Ports=4 LAN 1 WAN) (Features=2 USB 2.0/3.0 Gbit switch) (DD-WRT=rt-ac56u build 21061 20130325)
Asus RT-AC68P (Rev=-) (CPU=Broadcom BCM4709 @1000) (RAM=256MB) (Flash=128MB) (Ports=4 LAN 1 WAN) (Features=2 USB 2.0/3.0 Gbit switch) (DD-WRT=rt-ac68u build 22490 20131008)
Asus RT-AC68U (Rev=-) (CPU=Broadcom BCM4708A0 @800) (RAM=256MB) (Flash=128MB) (Ports=4 LAN 1 WAN) (Features=2 USB 2.0/3.0 Gbit switch) (DD-WRT=rt-ac68u build 22490 20131008)
Asus RT-N18U (Rev=-) (CPU=Broadcom BCM47081 @800) (RAM=256MB) (Flash=128MB) (Ports=4 LAN 1 WAN) (Features=1 USB 2.0  1 USB 3.0  Gbit switch) (DD-WRT=rt-n18u build 24118 20140523)

Total 2 devices for Buffalo
Buffalo WXR-1900DHP (Rev=-) (CPU=Broadcom BCM4709@1000) (RAM=512MB) (Flash=128MB) (Ports=4 LAN 1 WAN) (Features=2 USB 2.0/3.0 Gbit switch) (DD-WRT=wxr-1900dhp build 24461 20140623)
Buffalo WZR-1166DHP (Rev=-) (CPU=Broadcom BCM4708A0@800) (RAM=256MB) (Flash=128MB) (Ports=4 LAN 1 WAN) (Features=1 USB 3.0   Gbit switch) (DD-WRT=wzr-1166dhp build 22118 20130724)

Total 2 devices for D-Link
D-Link DIR-880L (Rev=A1) (CPU=Broadcom BCM4708A0@1000) (RAM=256MB) (Flash=128MB) (Ports=4 LAN 1 WAN) (Features=1 USB 2.0 1 USB 3.0 Gbit switch) (DD-WRT=dir880l build 26332 20150222)
D-Link DIR-890L (Rev=A1) (CPU=Broadcom BCM4709A0@1000) (RAM=256MB) (Flash=128MB) (Ports=4 LAN 1 WAN) (Features=1 USB 2.0 1 USB 3.0 Gbit switch Dual 5GHz radio) (DD-WRT=dir890l build 26332 20150222)

Total 7 devices for Netgear
Netgear AC1450 (Rev=v1) (CPU=Broadcom BCM4708A0 @800) (RAM=256MB) (Flash=128MB) (Ports=4 LAN 1 WAN) (Features=1 USB 2.0 1 USB 3.0 Gbit switch) (DD-WRT=netgear- ac1450 build 25139 20141022)
Netgear R6200 (Rev=v2) (CPU=Broadcom BCM47081A0 @800) (RAM=256MB) (Flash=128MB) (Ports=4 LAN 1 WAN) (Features=1 USB 3.0 Gbit switch) (DD-WRT=WIP)
Netgear R6250 (Rev=v1) (CPU=Broadcom BCM4708A0 @800) (RAM=256MB) (Flash=128MB) (Ports=4 LAN 1 WAN) (Features=1 USB 3.0 Gbit switch) (DD-WRT=netgear- r6250 build 23082 20131212)
Netgear R6300 (Rev=v2) (CPU=Broadcom BCM4708A0 @800) (RAM=256MB) (Flash=128MB) (Ports=4 LAN 1 WAN) (Features=1 USB 2.0 1 USB 3.0 Gbit switch) (DD-WRT=netgear- r6300v2 build 23082 20131212)
Netgear R6700 (Rev=v1) (CPU=Broadcom BCM4709A0 @1000) (RAM=256MB) (Flash=128MB) (Ports=4 LAN 1 WAN) (Features=1 USB 3.0 Gbit switch) (DD-WRT=netgear- r6700 build 25251 20141103)
Netgear R7000 (Rev=v1) (CPU=Broadcom BCM4709A0 @1000) (RAM=256MB) (Flash=128MB) (Ports=4 LAN 1 WAN) (Features=1 USB 2.0 1 USB 3.0 Gbit switch) (DD-WRT=netgear- r7000 build 23082 20131212)
Netgear R8000 (Rev=v1) (CPU=Broadcom BCM4709A0 @1000) (RAM=256MB) (Flash=128MB) (Ports=4 LAN 1 WAN) (Features=1 USB 2.0 1 USB 3.0 Gbit switch Dual 5GHz radio) (DD-WRT=WIP)

Latest version availale at GitHub https://gist.github.com/alexey-bass/8f4f66b0237247613007

Update (2015-04-27)
I bought used Asus RT-AC56R from eBay for $62! Awesome deal :-)
Recommended firmware for modern Asus routers here http://asuswrt.lostrealm.ca/about.

No comments:

Post a Comment