NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
vtburtonra
Feb 14, 2023Aspirant
access the list of attached devices via URL with json output
I have an Orbi RBR850 and two RBS850's. In combination, they provide excellent WiFi coverage to my house. The RBS's are connected back to the RBR via Ethernet. I have "a bunch" of IOT devices connected, and some of these aren't as smart as others. Many only support 2.4ghz. Occasionally, one (or more) of them will decide to connect to a RBR/RBS that is distant and will attempt to go though walls and ceilings to get to the "distant" RBR/RBS. If I go to the location of the device that's connected to the distance RBR/RBS with a laptop, and connect to the WiFi, the laptop will always choose the RBR/RBS with the strongest signal. I have software on the laptop that will show all the available SSIDs and their signal strength. The closest RBR/RBS always has excellent signal strength, and the more remote RBR/RBSs show lower and sometimes weak signal strength. From the laptop, I can tell which RBR/RBS has the best signal strength because the software on the laptop also shows the MAC address associated with the wifi SSID and signal strength.
All of this makes me believe the RBR and RBSs are working as designed, and the IOT devices are doing something goofy when presented with multiple WiFi signals with the same SSID. Honestly not surprising given what I read about many IOT devices being notorious for software issues and security vulnerabilities. A reboot or power cycle of the IOT devices gets it back connected to the RBR/RBS with the strongest signal.
I want to be able to monitor this with regular checking to see if devices are connected to the wrong RBR/RBS. I know what "normal" looks like (MAC address xyz should always connect to RBSxxx.)
I need the ability to extract the attached devices list from the RBR. I know there have been other discussions about recent Orbi firmware disabling the telnet. I honestly agree - telnet is insecure and really the wrong way to get this information. What I'd like is something like:
json_list=$(curl -s http:192.168.1.1/attached_devices/?op=json)
device_list=$(jq .Device.list <<<"$json_list")
The list would need to include the IP address, MAC address, connected RBR/RBS and frequency (2.4 / 5).
I could then parse device_list, check vs. "normal", log to a syslog server, sent alerts or email, etc.
Netgear friends, consider this an "enhancement request".
Thank you
Randy
CrimpOn wrote:I found the READ.ME less helpful than I would have wanted, especially in terms of how to enter the commands.
Plus, it spewed a bunch of warnings about "certificate verification" which did not affect the results, but annoyed me a lot.
Loaded on Linux Mint 20.3 using pip3.
Set environment variables:
PYNETGEAR_PASSWORD="<router password>"
HOST=192.168.1.1
USER="admin"
URL="192.168.1.1"
command python3 -m pynetgear_enhanced attached_devices2 >dev.txt
I got it to work, but had to do this:
python3 -m pynetgear_enhanced --url 'https://routerlogin.net' --host "192.168.1.1" --user "admin" --password "<router password>" attached_devices2 >dev.txt 2>&1
The https in the URL did the trick. It did not seem to pay attention to the PYNETGEAR_PASSWORD, HOST, USER and URL variables. I tried setting them within a bash script and also exporting them. The command worked for me on OpenSUSE, Ubuntu, Fedora, Mint, Rasbian, and Debian.
This uncovered another problem. I have an RBR850 and two RBS850s. When I log into the RBR, and go to attached devices, it only shows 1 device from one of the two RBSs, but that RBS has 10 devices attached to it. When I log into the RBS directly, and select Connected Devices, it shows all 10 devices, but the IP address field is "-" for all except 1 device, and that's the 1 device that shows up in the RBR. The pynetgear_ehnanced program shows the same, but expected given that logging directly into the RBB shows this.
The other RBS shows everything correctly, including IP addresses. All 3 are running the latest firmware (4.6.14.3).
Note that all 10 of those devices are working fine - I can ping them. Even pinging them doesn't cause the RBS to start showing their IP addresses. I'm guessing this RBS is fubar and needs a reboot. I'll do that and I'm assuming that will fix it.
I really do appreciate your help and suggestions on this.
Randy
10 Replies
Something to post here about:
https://community.netgear.com/t5/Idea-Exchange-For-Home/idb-p/idea-exchange-for-home
- vtburtonraAspirant
Posted.
vtburtonra , please check your private messages. (click on the envelop in the upper right part of the screen.
- Zain98Initiate
It is not possible to access the list of attached devices via URL without additional context about the system you are trying to access. However, assuming you are referring to a network router, you may be able to access the list of attached devices via a URL such as "http://[router_IP_address]/api/device_list.json" or "http://[router_IP_address]/device_list.json". This would depend on the specific router model and the API it exposes.
Again, this is a general example and may not work for your specific scenario. It is also important to note that accessing this information without proper authorization may be illegal and could potentially lead to security issues.
If you have Excel, you may find the commands you want in this spreadsheet:
https://www.dropbox.com/s/o0eaj5kjs3cpxcc/ORBI Soap Request.xlsm?dl=0