- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Attached Devices Sorted by IP Number
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Attached Devices Sorted by IP Number
I have a good number of devices on my home network. I manage then with static DHCP reservations and I wanted to be able to get an Attached Device display in the web ui sorted by IP number. The attached changes to /www/DEV_show_device.htm implement that change. Changes are highlighted in yellow on pages 2 and 3. This works for firmware version V2.5.1.8.
A couple thoughts
1. This change requires Telnet access to ORBI and an editor such as vi. If you are not comfortable with your skills to do that, take the time to learn them. Editing a live system always requires great care.
2. The coding techniques used here are not original to me. They are from a collections of really great example by amazing coders available on the internet. Thanks to the many people who contribute to that body of freely available information.
3. The "better" answer would be to offer a sort click for every column in the Attached Devices wed ui but I really only need the IP address so I decided to just hard code this sort for my needs.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
Considering users have been asking Netgear for this for at least two years, WOW.
For those of us uncertain how Orbi's Linux is different from others we have used, would you mind sharing the procedure used to implement the change? My guess is the process is to (a) make a backup copy of this file in case I screw it up and have to go back, (b) edit the file. AND?????
This probably has to be done with each firmware release.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
@CrimpOn wrote:Considering users have been asking Netgear for this for at least two years, WOW.
For those of us uncertain how Orbi's Linux is different from others we have used, would you mind sharing the procedure used to implement the change? My guess is the process is to (a) make a backup copy of this file in case I screw it up and have to go back, (b) edit the file. AND?????
This probably has to be done with each firmware release.
Thanks
I struggled with that idea when I thought about my original post. My problem is there are too many variable for both tools and skills. For Telnet, I use PuTTY but there are many other good tools. Once you get Telnet working, log in as "admin" with your router password. Then at the prompt type "cd /www" to change directories. I would then "cp DEV_show_devices.htm DEV_show_devices.orig" to create a backup of the original file. Editing is the difficult part. The editor vi isn't the easiest to use. I am open to ideas. Maybe other members have ideas. The best idea, of course, would be to get NETGEAR to make this available in their firmware. 🙂
Scott
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
@SLK-Purdue wrote:
I struggled with that idea when I thought about my original post. My problem is there are too many variable for both tools and skills. For Telnet, I use PuTTY but there are many other good tools. Once you get Telnet working, log in as "admin" with your router password. Then at the prompt type "cd /www" to change directories. I would then "cp DEV_show_devices.htm DEV_show_devices.orig" to create a backup of the original file. Editing is the difficult part. The editor vi isn't the easiest to use. I am open to ideas. Maybe other members have ideas. The best idea, of course, would be to get NETGEAR to make this available in their firmware. 🙂
I use PuTTY as well (love it). Will brush up on vi before attempting this. (Have been using nano with my Raspberry Pi's and Linux Mint machines.) It is really annoying that the Nighthawk line has had the "click on a column" for years. Using different sort routines would not be a serious issue. (If .. then, else or something similar) It's recognizing the column click and setting the selection variable that is WAY beyond me.
I cannot think of any "Downside" to sorting by IP address.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
The "device.keySort("ip")" will consume extra CPU cycles, i.e., CPU cost for sorting. Depending on the nubmer of devices, it may not be noticeable.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
@SW_ wrote:The "device.keySort("ip")" will consume extra CPU cycles, i.e., CPU cost for sorting. Depending on the nubmer of devices, it may not be noticeable.
Of course, thanks. If that is indeed the case with my 30+ devices, I can always "go back".
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
@CrimpOn wrote:
@SW_ wrote:The "device.keySort("ip")" will consume extra CPU cycles, i.e., CPU cost for sorting. Depending on the nubmer of devices, it may not be noticeable.
Of course, thanks. If that is indeed the case with my 30+ devices, I can always "go back".
Yes, there is a cost to sorting and there are likely more efficient sorting schemes that could be used. I have about 50 connected devices and the initial screen paint for Attached Devices takes about 10 seconds. That's a price I am willing to pay for the value of the sort. Your mileage and value may vary.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
Got one report of problems that I think may be due to line wrap in the PDF. The important code should look like:
function ip2int(ip) {
return ip.split('.').reduce(function(ipInt, octet) { return (ipInt<<8) + parseInt(octet, 10)}, 0) >>> 0;
}
Array.prototype.keySort = function(key, desc){
this.sort(function(a, b) {
var result = desc ? (ip2int(a[key]) < ip2int(b[key])) : (ip2int(a[key]) > ip2int(b[key]));
return result ? 1 : -1;
});
return this;
}
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
SUCCESS! This is SO COOL.
Looking at the web page contents, I am tempted to think there might be a way to have two "Attached Devices" menu items on the main menu so the user could select one or the other. (Not brave enough to try that.)
There is a timer somewhere that defines how long Orbi waits between updating the display. Wonder if that timer is in NVRAM somewhere?
The reason I ask is browser dependent. When I open Attached Devices in Chrome, Edge, and Opera the screen refresh is really obvious. The entire column of device icons (the stupid new graphics that replaced our cool pictures) and Connection Status both flicker as they refresh every 7.5 seconds (on my Orbi). Really annoying. Strangely, Firefox does not. Perhaps there is some technology buried in Firefox that compares page changes and decide they are not actually "changes". So, for now I will stick with Firefox when looking at Attached Devices.
Thank SO MUCH.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
Glad you got it working. I have a number of things on my list that I would like to change. Since we have a "stay home" order, I may get some time to work down the list. We'll see.
Thanks,
Scott
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
I like this modification, and I do not think that it adds too much load on the CPU. Unfortunately it does not survive a reboot, but you can save a copy of it to /tmp/mnt/circle for example and then copy it back to /www from there. This even survived a factory reset.
cp -p /www/DEV_show_devices.htm /www/DEV_show_devices.orig
Make the required changes
cp -p /www/DEV_show_devices.htm* /tmp/mnt/circle/
Then when you reboot the router, run this:
cp -p /tmp/mnt/circle/DEV_show_devices.htm /www/
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
Just curious if you have tired Voxels FW? He recently added some sort modification to his FW...
@tomschmidt wrote:I like this modification, and I do not think that it adds too much load on the CPU. Unfortunately it does not survive a reboot, but you can save a copy of it to /tmp/mnt/circle for example and then copy it back to /www from there. This even survived a factory reset.
cp -p /www/DEV_show_devices.htm /www/DEV_show_devices.orig
Make the required changes
cp -p /www/DEV_show_devices.htm* /tmp/mnt/circle/
Then when you reboot the router, run this:
cp -p /tmp/mnt/circle/DEV_show_devices.htm /www/
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
@FURRYe38, I have not tried Voxel's firmware yet, as I still have 4 open tickets with NG on bugs for them to resolve. Each ticket is at L2 and L3 support awaiting their firmware team to fix the bugs that many of us have seen and reported here on the community forum, including the Traffic Meter DST bug.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
@tomschmidt wrote:@FURRYe38, I have not tried Voxel's firmware yet, as I still have 4 open tickets with NG on bugs for them to resolve. Each ticket is at L2 and L3 support awaiting their firmware team to fix the bugs that many of us have seen and reported here on the community forum, including the Traffic Meter DST bug.
I have not tried Voxel's firmware.
Due to stay-at-home order, I have had more time. I will be posting another update to the Attached Devices web UI later today.
Scott
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
Let us know if you can try Voxels FW out. Let us know your results. You can revert back to stock FW at any time.
@SLK-Purdue wrote:
Due to stay-at-home order, I have had more time. I will be posting another update to the Attached Devices web UI later today.
Scott
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
@tomschmidt wrote:
Make the required changes
cp -p /www/DEV_show_devices.htm* /tmp/mnt/circle/
Then when you reboot the router, run this:
cp -p /tmp/mnt/circle/DEV_show_devices.htm /www/
I may have messed something up, but on my Orbi, the file does not have an "s" at the end: i.e.
DEV_shot_device.htm (no "s").
It is grammatically incorrect, which tripped me up several times. My Orbi sorts by IP, so I'm pretty sure that "no s" is correct.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
My bad. No "s" is correct. Will be posting an update very in a few minutes.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
My bad too, I had just cut-n-pasted the filename from previous post. Updating.
cp -p /www/DEV_show_device.htm /www/DEV_show_device.orig
Make the required changes
cp -p /www/DEV_show_device.htm* /tmp/mnt/circle/
Then when you reboot the router, run this:
cp -p /tmp/mnt/circle/DEV_show_device.htm /www/
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
Thanks to the Stay-At-Home order, I have had some time to work on this a bit more. Please stay safe, stay healthy, and stay home!
A complete replacement for /www/DEV_show.device.htm available on Dropbox (dots removed to keep obey the forum rules about URLs)
www dropbox com/s/svqx6020yq0avgh/DEV_show_device.htm?dl=0
You can diff if you want to see changed.
1.You can now sort any column of the device connections by clicking the heading
2. I removed the unnecessary repaints when nothing changes. They were just annoying.
3. If you click on a heading, not only will the column sort but new devices will be added if they have recently connected.
4. The timing for the recheck for new devices was increased to 4 minutes to keep the load light. If no new devices are found, the screen will not repaint. If new devices are found, the screen will repaint with the current sort key applied for new and existing devices.
5. Cleaned up a couple other minor bugs.
As before, ALWAYS make a backup of the original version. Reboot will reset to original. Search for hack on how to reset this after a reboot. Some very nice work at hackingthenetgearorbi wordpress com
I have tested with current Orbi FW and current Chrome, IE, Edge, and Foxfire. Your mileage may vary.
No support expressed or implied but if you do see things please report them here and I will most likely have time to take a look.
Scott
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
Sweet. I just tried this now, it looks great, now able to sort by connection type, MAC, etc. Awesome job!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
Rather than running code to sort on the router, there's another way. Basically, find the entries you want to manipulate, copy/paste them into a text editor, manipulate them as desired (change device names, reserved IPs, reservation IDs, manufacturer details, display icons), convert the entries into commands, then paste back into the CLI, commit, and you're done. Save the text file for future use, either for backup/restore, or to add additional devices later. You're basically creating a batch file/shell script file, and then copy/pasting the contents instead of executing it. It may be possible to upload and execute the shell script file over telnet, but I don't know.
Telnet in, have it show you the DHCP reservations. I believe it's something like:
config show | grep reservation
You're get a few extraneous lines, but then you'll see all your reservations, in the form:
reservation[ID number]=[reserved IP] [MAC] [device name]
sorted by ID. Copy/paste the whole list of reservations into a text editor, preferably one with a find/replace or multi-line editing function. You'll need to edit it by adding "config set" to the beginning of each line, and putting everything after the equals sign within double quotes, so it ends up like:
config set reservation[ID number]="[reserved IP] [MAC] [device display name]"
One per line, for all the reserved devices. They will display in reservation ID number order in the GUI. Organize your list however you like. I'm unsure if the text list needs to be ordered by reservation ID number in order to display properly in the GUI, but it's certainly easier for you if you do it thay way, to make sure they're in the order you want, and there aren't any skipped or duplicate reservation IDs. Rearrange manually, or, if you're clever, run it through a script and have it sort however you like. Once it's done, save for future use. Then, telnet back to the CLI prompt, and just copy/paste the entire file contents into the CLI, and hit enter. Commit the changes, and you're done.
Relatedly, a similar process can be used for naming devices, including to use characters it rejects in the GUI, such as apostrophe for possessives (e.g., "Bob's laptop" instead of "Bob laptop" or "Bobs laptop"), and setting the device details (if you care to change from defaults) (all of which you'll see in the "attached devices" screen under the "device name" column).
Device names display in the CLI in the form:
orbi_dev_name[ID number]=[MAC] [device name]
And device details (manufacturer & icon) in the form:
orbi_dev_name_ntgr[ID number]=[MAC] [icon ID] [device manufacturer]
config show, grep as appropriate, copy/paste into a text editor, change device ID numbers, names, manufacturers, IPs, icon IDs (I don't know which icon ID corresponds to which icon), convert configuration output lines into commands (add "config set" before each line, and put everything after the equals sign within double quotes), paste back into CLI, enter, commit, done. Optional (though recommended) backup of the finished text file for future use to restore after a factory reset, if the included backup/restore breaks after a firmware update, or if you want to insert new devices into the middle of the list.
And really, instead of saving a binary backup, which isn't human readable, and which may not work across firmware versions, any configuration setting you can figure out how to set from the CLI can be saved in a text file and copy/pasted into the CLI. You could do router name, DNS settings, password, network and subnet info, saved routes, etc. You can even just save the entire output from "config show" if you really want, though you'd have to edit it all into a series of valid commands, and some of the settings may not be ones you'd actually want to carry forward anyway. There's probably some way to actually save the commands as a shell script file, and to upload and run it over telnet from the CLI, but I don't know how to do that. There may also be a way to get the output in a form where you can paste it back in directly, without having to change each line into a command (adding "config set" and putting values within double quotes), but I don't know how to do that, either.
NB: ID numbers for the DHCP reservations, device names, and device details don't necessarily match. They're each separate ordered lists, with consecutive IDs, so each list can be a different length, and the same device can have a different ID in each list it appears in, and devices can have entries in one list but not another. Entries for a given device are matched by MAC, not ID. I don't know what happens if you skip ID numbers to try to force them to match across lists, but since it doesn't matter, I wouldn't mess with it.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
This is an interesting procedure. I have done that in the past, carefully assigning reservations in IP order, but my experience was that "Attached Devices" did not appear in "reservation order", but in some random sequence. I think the whole point of this latest web page revision is that the user can choose on the spur of the moment, "Show me these in MAC order." This is what Nighthawk routers have done forever.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
Not sure when I will get a chance to try Voxels FW. Other household member are not as exited as I am to experiment on a live network. 🙂 With Stay-at-Home, a reliable home network has seemed to have become more important. Go figure.
Scott
@FURRYe38 wrote:
Let us know if you can try Voxels FW out. Let us know your results. You can revert back to stock FW at any time.
@SLK-Purdue wrote:
Due to stay-at-home order, I have had more time. I will be posting another update to the Attached Devices web UI later today.
Scott
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
Got questions about how I get the file into ORBI. Good question.
I use PuTTY so a copy-and-paste is pretty easy. Most other Telnet package have some sort of copy-and-paste function
Bacis idea is:
1. Select and copy the entire file on the workstation
2. Telnet to ORBI and login
3. cd /www
4. vi new.htm
5. o command to get to "add mode"
6. paste file (right mouse click in PuTTY)
7 ESC
9 clean up first and last line if necessary
10 w
11 q
mv DEV_show_device.htm DEV_show_device.orig
mv new.htm DEV_show_device.htm
Scott
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Attached Devices Sorted by IP Number
Awesome, thank you for posting the details.
@SLK-Purdue wrote:Got questions about how I get the file into ORBI. Good question.
I use PuTTY so a copy-and-paste is pretty easy. Most other Telnet package have some sort of copy-and-paste function
Bacis idea is:
1. Select and copy the entire file on the workstation
2. Telnet to ORBI and login
3. cd /www
4. vi new.htm
5. o command to get to "add mode"
6. paste file (right mouse click in PuTTY)
7 ESC
9 clean up first and last line if necessary
10 w
11 q
mv DEV_show_device.htm DEV_show_device.orig
mv new.htm DEV_show_device.htm
Scott
• Introducing NETGEAR WiFi 7 Orbi 770 Series and Nighthawk RS300
• What is the difference between WiFi 6 and WiFi 7?
• Yes! WiFi 7 is backwards compatible with other Wifi devices? Learn more