[OBSOLETE] Netgear Nighthawk Router

I did but it doesn’t do anything.

Ex.

And on my dashboard it just let’s me press the guest wifi which is off in my router.

Logging
org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 34; The element type “meta” must be terminated by the matching end-tag “”.

where is the capture file ?

What is that?

it seems to call a cgi (I just changed my wifi key in this dump and erase the HTML) - this action enable the SSID broadcasting for 2.4Ghz:

POST http://192.168.1.1/wireless.cgi?id=7c757ecfe49f34de1fef51f4252d0b724528fe55afcd6311b4aea0e63166287 HTTP/1.1
Host: 192.168.1.1
Connection: keep-alive
Content-Length: 2249
Cache-Control: max-age=0
Authorization: Basic YWRtaW46SmF5QEhvbWU3NA==
Origin: http://192.168.1.1
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8
Referer: http://192.168.1.1/WLG_wireless_dual_band_r8000_dfs.htm
Accept-Encoding: gzip, deflate
Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: XSRF_TOKEN=1356440606

Apply=Appliquer&WRegion=5&ssid_bc=ssid_24G_bc&ssid=freeboite&w_channel=0&opmode=300Mbps&security_type=WPA2-PSK&authAlgm=automatic&wepenc=1&wep_key_no=1&KEY1=&KEY2=&KEY3=&KEY4=&passphrase=testphrase&encryptmode=1&wpa_en_gk_int=3600&RADIUSAddr1_wla=&RADIUSAddr2_wla=&RADIUSAddr3_wla=&RADIUSAddr4_wla=&wpa_en_radius_port=1812&wpa_en_radius_ss=&enable_5g_band_steering=enable_band_sterring&ssid_bc_an=ssid_5G_bc&ssid_an=freeboite+5GHz&w_channel_an=44&opmode_an=HT80&security_type_an=WPA2-PSK&authAlgm_an=automatic&wepenc_an=1&wep_key_no_an=1&KEY1_an=&KEY2_an=&KEY3_an=&KEY4_an=&passphrase_an=testPhrase&encryptmode_an=1&wpa_en_gk_int_wlg=3600&RADIUSAddr1_wlg=&RADIUSAddr2_wlg=&RADIUSAddr3_wlg=&RADIUSAddr4_wlg=&wpa_en_radius_port_wlg=1812&wpa_en_radius_ss_wlg=&ssid_bc_an_2=ssid_5G_bc&ssid_an_2=freeboite+5GHz&w_channel_an_2=100&opmode_an_2=HT80&security_type_an_2=WPA2-PSK&authAlgm_an_2=automatic&wepenc_an_2=1&wep_key_no_an_2=1&KEY1_an_2=&KEY2_an_2=&KEY3_an_2=&KEY4_an_2=&passphrase_an_2=testPhrase&encryptmode_an_2=1&wpa_en_gk_int_wlh=3600&RADIUSAddr1_wlh=&RADIUSAddr2_wlh=&RADIUSAddr3_wlh=&RADIUSAddr4_wlh=&wpa_en_radius_port_wlh=1812&wpa_en_radius_ss_wlh=&tempSetting=0&tempRegion=5&setRegion=5&wds_enable=0&wds_enable_an=0&only_mode=0&band_steering_5g=1&show_wps_alert=0&security_type_2G=WPA2-PSK&security_type_5G=WPA2-PSK&security_type_5G_2=WPA2-PSK&init_security_type_2G=WPA2-PSK&init_security_type_5G=WPA2-PSK&init_security_type_5G_2=WPA2-PSK&init_passhprase_5G_2=testPhrase&init_ssid_5G_2=freeboite+5GHz&initChannel=0&initAuthType=automatic&initDefaultKey=0&initChannel_an=44&initAuthType_an=automatic&initDefaultKey_an=0&initChannel_an_2=100&initAuthType_an_2=automatic&initDefaultKey_an_2=0&telec_dfs_ch_enable=1&ce_dfs_ch_enable=1&fcc_dfs_ch_enable=0&auto_channel_5G=0&support_ac_mode=1&board_id=U12H315T00_NETGEAR&enable_band_steering=0&fw_sku=SKU_WW&wla_radius_ipaddr=0.0.0.0&wlg_radius_ipaddr=0.0.0.0&wla_ent_secu_type=WPA-AUTO&wlg_ent_secu_type=WPA-AUTO&wan_ipaddr=192.168.5.53&wan_netmask=255.255.255.0&wlh_radius_ipaddr=0.0.0.0&wlh_ent_secu_type=WPA-AUTO&wlh_ent_secu_port=1812&wlh_ent_secu_interval=3600&wlh_radius_secret=&wifi_dual_5g_band=1&init_ssid_bc_an_2=checked&init_opmode_an_2=2&wifi_5g_2_enable=Enable&wifi_5g_enable=Enable
HTTP/1.0 200 OK
Content-length: 2812
Content-type: text/html; charset="UTF-8"
x-frame-options: SAMEORIGIN
Cache-Control: no-cache
Pragma: no-cache

And this one disable the 2.4Ghz wifi (I let the HTML on this one):

POST http://192.168.1.1/wlg_adv.cgi?id=a3686a8e5aed4fe91a85678be8ffc55c0ee0854032691508d25198e33729135f HTTP/1.1
Host: 192.168.1.1
Connection: keep-alive
Content-Length: 1230
Cache-Control: max-age=0
Authorization: Basic YWRtaW46SmF5QEhvbWU3NA==
Origin: http://192.168.1.1
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8
Referer: http://192.168.1.1/WLG_adv_dual_band2_r8000.htm
Accept-Encoding: gzip, deflate
Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: XSRF_TOKEN=3238978484

Apply=Appliquer&enable_ap=enable_ap&enable_coexistence=enable_coexistence&frag=2346&rts=2347&enable_shortpreamble=&enable_ap_an=w_5g_enable_ap&frag_an=2346&rts_an=2347&enable_shortpreamble_an=&pin_disable=1&prevent_pin_compromise=1&pin_attack_count=3&wsc_config=on&wsc_config_an=on&enable_implicit_beamforming=enable&device_name2=R8000&StaIpAssign=dyn_ip&StaDnsAssign=dyn_dns&wps_enable=enabled&show_wps_alert=0&wifi_2g_state=Disable&wifi_5g_state=Enable&wifi_5g_2_state=Enable&wifi_2g_sche=&wifi_2g_sche_onoff=0&wifi_5g_sche=&wifi_5g_2_sche=&wifi_5g_sche_onoff=0&wifi_5g_2_sche_onoff=&wifi_2g_sche_num=0&wifi_5g_sche_num=0&wifi_5g_2_sche_num=0&ntp_synced_flag=1&select_2g_sche=-1&select_5g_sche=-1&select_5g_2_sche=-1&ssid_2g=freeboite&ssid_5g=freeboite+5GHz&ssid_5g_2=freeboite+5GHz&secu_type_2g=WPA2-PSK&secu_type_5g=WPA2-PSK&secu_type_5g_2=WPA2-PSK&passphrase_2g=testPhrase&passphrase_5g=testPhrase&passphrase_5g_2=testPhrase&wifi_button_on_off=1&apmode_ipaddr=0.0.0.0&apmode_netmask=0.0.0.0&apmode_gateway=0.0.0.0&apmode_dns_sel=&apmode_dns1_pri=0.0.0.0&apmode_dns1_sec=&sta_mode=0&ap_mode=0&stamode_ipaddr=0.0.0.0&stamode_netmask=0.0.0.0&stamode_gateway=0.0.0.0&stamode_dns1_pri=0.0.0.0&stamode_dns1_sec=&wifi_dual_5g_band=1
HTTP/1.0 200 OK
Content-length: 2240
Content-type: text/html; charset="UTF-8"
x-frame-options: SAMEORIGIN
Cache-Control: no-cache
Pragma: no-cache

NETGEAR Router Nighthawk X6 R8000 TD { FONT-SIZE: 12px; FONT-FAMILY: Arial, Helvetica, Geneva, Swiss, SunSans-Regular, sans-serif } H1 { FONT-WEIGHT: bold; FONT-SIZE: 16px; COLOR: #09c; FONT-FAMILY: Arial, Helvetica, Geneva, Swiss, SunSans-Regular, sans-serif } .prgbar { font-family:Arial; padding:0px; height: 20px; width: 200px; font-weight: bolder; font-size: 10pt; color: #0000FF}

Mise-à-jour des paramètres

   

I don’t understand.
Normally Genie app uses Soap. Are you trying the genie desktop or are you trying Web browser ?
please try to use Genie app on your desktop

My bad, I was using the browser to test.
I don’t know if it’s normal but 192.168.1.1/debug.htm is 404 when I open it
Here is a capture packet in attachement related to Wifi Guest Access:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<SOAP-ENV:Envelope xmlns:SOAPSDK1=“http://www.w3.org/2001/XMLSchema” xmlns:SOAPSDK2=“http://www.w3.org/2001/XMLSchema-instance” xmlns:SOAPSDK3=“http://schemas.xmlsoap.org/soap/encoding/” xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/”>SOAP-ENV:Header58DEE6006A88A967E89A</SOAP-ENV:Header>SOAP-ENV:Body<M1:SetGuestAccessEnabled xmlns:M1=“urn:NETGEAR-ROUTER:service:WLANConfiguration:1”>0</M1:SetGuestAccessEnabled></SOAP-ENV:Body></SOAP-ENV:Envelope> l

Any idea?

the soap header and body seems like mine but the forum UI is not showing all tags. Anyway, please compare it with the one in my groovy code. If it is exactly like mine , then it should also work for you (with the assumption that all other commands are also similar)

in that case, you are either entering wrong parameters to my device handler (user, password, IP) or you set wrong device network ID on graph API.

To better understand it I would ask you to send me the trace file taken when you try to use my device handler.

I’m getting this same message using a R7000 Nighthawk. My IP, port, username and password are all correct and Remote Access is turned on.

The only thing I’m not 100% certain of is the HEXIP:HEXPORT (Currently, c0a80101:0050 (192.168.1.1:80)).

Any thoughts?

Thinking it would be great, now that you have worked through a lot of things, if you were to rewrite / document instructions from a to z with screenshots provided and examples all the way through to cut down on any confusion as to setup and where things belong and what they should look like, based on actual representation of your setup. Just some thoughts. :slight_smile:

1 Like

well I don’T understand why you get this error. Do you see it on graph api ?
if yes, then you are copy-pasting the code missing something.
I don’t have a “meta” tag in my code. Maybe you put a space between “meta” and “data” in the first line of the code ?

I’m not sure about that. This is not a complex setup. It is in fact easy when you compare it to complex smartapp+device_handler setups.
just :
1.copy the code to a new device handler
2.create a new device with new device type
3.enter network ID as HEXIP:HEXPORT
4.on mobile app just enter user, password, IP and port for your router
5.the router should be open to remote access

I apologize but wording matters. If you were to provide screenshots for all 5 of those steps it would be a much clearer representation of the actual setup. You assume that most of these people know how to convert the IP and Port into Hex. If you provided visuals and a link for where they can enter their IP to get the hex equivalent returned and then how to get the Port separately with the default being 80 for most people. Little details matter. This cuts down on the number of problems /issues reported and then when an issue is reported, you know that they have things setup correctly without trying to read between the lines of what you have for instructions. I’m just trying to give you some helpful advice to make life easier in the end. No worries. :slight_smile:

I have seen more issues with this not working for very many people versus successful setup. So in tying to determine if there is inconsistencies with the different router models versus an actual setup. The troubleshooting steps with Genie / Wireshark and other steps would be helpful as well beyond the initial setup so that when it doesn’t work, they can follow your exact troubleshooting steps to get you the data you are looking for. That’s why I have held off researching this any further with my R8500 until a little more could be uncovered behind the scenes. It’s got great potential, and in order to get things dialed in to find out what routers it actually works with versus if their are unique differences that prevent it from working with other models.

1 Like

thanks. I’ll consider writing it when I have some time.
For now, I want to solve another issue with the device handler.
Btw, did you make it work for you ?

1 Like

See post above. I edited it.

What specific changes did you make to the DTH?

I am trying to focus on adding a traffic meter info tile.
But I am not sure how to do that. I need to read a lot…

I don’t think so. I copied and pasted the code from the raw output on Git. I am seeing it on graph. I don’t have my router setup with routerlogin.net or anything like that.

I think I found where the “meta” is coming from though, line 1411 in function authRouter (catch (Exception e) { log.debug e }.

So, I’m going to try to adjust my port and settings in the device and see what happens.

[EDIT] It was the port in ST. It needs to be port 5000 (for a default setup). That needs to be in the initial setup instructions. :slight_smile:

@WB70: I agree with you.

1 Like

:slight_smile: Focus on the initial setup process/steps so that you can get more people configured correctly to see if more people can get this functioning from within SmartThings and then reach for the Stars with the additional functionality. You have something that can be great here, but if it’s only working for you and a few others, well that’s no fun for anyone. :slight_smile:

2 Likes

this will sound selfish but I am doing this for myself. (I like to be honest)
I made something working for my Netgear router and thought it would be nice to share it with the community.
I have no gain from it if more people use it. So if people want to use it on different Netgear models, they can freely get the code and modify (then share if they want)
As this is open source and simple code it is very easy to add to it.

nice to see that it is working for you. But I don’t agree that this should be in the instructions. My router was at port 80 by default.
and since the port is parametric, users should change accordingly.