What's new

RT-AX86U PRO - Alexa "Get Activation Code" Missing

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

leventea

Occasional Visitor
I used to have the same router earlier where Alexa worked fine. That router broke so I replaced it.
I'm trying to link my Alexa account with the new router.
The router says "Your Amazon Alexa account has been registered."

When I go to Amazon to enable the Alexa skill, it prompts me for an activation code.
Normally this can be requested by clicking "Get Activation Code" in the router's GUI (Amazon Alexa tab).
1712573605923.png


I'm using Merlin.
However, there is no such option in my router (see picture).
Should it look different? How can I get an activation code?
AsusAlexa.png


Also, if I go to the ASUS Router App as suggested and try to enable the Amazon skill, I get an exception:
Account linking failed, please try again.(cause: Fail to enable Alexa skill. status=21)

Using FW
: latest (currently) merlin 3004.388.6_2

Thank you!
 
Last edited:
I'm using Merlin.
However, there is no such option in my router (see picture).
Should it look different?
For some reason you have several links in your post to: <link removed> You may want to remove those links. One generally should not, for security reasons, have the administration access of their router available from the WAN/Internet side. One can disable the web access from WAN option by disabling Enable Web Access from WAN in the GUI's Administration > System > Remote Access Config section. Disabling web access from WAN may however cause the Alexa feature to stop working properly.

The Alexa page on my RT-AX86U Pro running 3004.388.6_2 looks different. I've never enabled the Alexa integration. See example below. Maybe try a different web browser as a troubleshooting step. If you are accessing the router from the WAN side, as a troubleshooting step, try accessing it from the LAN side instead. See if disabling Web Access from WAN solves the issue as a trouble shooting step. One may have unlink the Alexa integration if that is possible from the Alexa app side.

Example:
Alexa.jpg
 
Last edited:
Thank you for your response!
Special thanks for the note about the links! Not sure how they got there as I didn't add any of them (perhaps by copy/paste from the router GUI). Let me kindly ask you to edit your comment and delete them from it as well!

As for remote admin via WAN, I only made it available until I set up Alexa (which specifically asked for it, as you can see in your own screenshot), with the intention to disable it afterwards.
Unfortunately it looks the same from LAN.

I wonder if there is any command line to reset the Alexa settings only and hopefully get the default state (as in your screenshot), where the Alexa account is unlinked.
 
@leventea, if you haven't done so already, check the router GUI's Advanced Settings > Administration > Privacy page and see if there are any items listed there. If there are items listed and the Withdraw button available, you may have to select Withdraw to fully stop or end the service.

You likely may also have to access the Alexa Skills under the Alexa app on your mobile device and select Disable Skill in the ASUS ROUTER skill if you haven't done so already. If the delinking has been successful hopefully the option to relink the Alexa skill will become available on your router.
 
Thank you, bennor, this was close!
There was indeed a policy on page Advanced Settings > Administration > Policy for Alexa.
I removed it and now the router is not linked with the Alexa account anymore. It says "Pair your account by following the steps below".
While it still doesn't provide an option to get activatio code, the steps require to link Alexa using the ASUS mobile app.
If I try, the app behaves almost as earlier:
  • apparently an Amazon page prompts to login to Amazon
  • then it prompts to "Allow" to sign-in to ASUS ROUTER
  • when allowed, it returns the same failure: "Account linking failed, please try again. (cause: Fail to enable Alexa skill. status=21)"
  • new behaviour: the Amazon page displays an error. In details it says 400 Bad request, "the parameter client_id is required".
 
While it still doesn't provide an option to get activatio code, the steps require to link Alexa using the ASUS mobile app.
I don't think you use the Asus mobile app. Rather the Asus Router Skill is added to the Amazon Alexa app. Check that Amazon Alexa app for the Asus Router Skill and see if Disable Skill helps with your issue if you haven't done so already.

Edit to add: Also try rebooting the router (if you haven't done so already) after Withdrawing on the Privacy page.
 
I do use the ASUS Router app., trying to link Alexa in Settings/Connect with Alexa.
If i use the Amazon Alexa app (as you imply), the skill is not used, it offers "ENABLE TO USE". I tried to enable the skill from here, it automatically opens the Asus Router app and goes to the same page, resulting in the same error.
 
I noticed something:
When I use the ASUS Router app (not Amazon Alexa app) to attempt linking, it opens the Amazon Alexa "page".
If I click the highlighted link (1), I can see the Asus Router skill (2), and I can remove it (3).

1.
alexa_1.jpeg
2.
alexa_2.jpeg
3.
alexa_3.jpeg


However, when I retry to link the Alexa account, I get the described error and the linked skill in the above location reappears. The Amazon page displays the skill unlinked at all times (I refreshed the page after every step).
alexa_22.jpeg

For some reason that "client_id" is probably missing indeed but not sure why. I also tried removed/reinstalled the Asus Router app and rebooted the router, too.
 
If you use the Asus-Merlin firmware then the Asus router app isn't really supported 100% due to the various changes made in the Asus-Merlin firmware. See RMerlin's various comments about the Asus app and Asus-Merlin.

PS: Also see several of RMerlin's comments (some old) on Alexa. For example, one old comment from 2018:
No, IFTTT and Alexa are supported, however I cannot guarantee that they work properly as I don't touch either of these, and consider them to be security risks more than anything.
 
@RMerlin
May I ask for your help in finding possible reasons for the linking issue to Alexa account detailed above?

In a nutshell: when I try to link from the Asus app, as guided in the router's GUI (Merlin 3004.388.6_2), the response is 400 Bad request, "the parameter client_id is required"
I understand that the app is not 100% compatible with the Merlin FW but then why doesn't the Merlin FW allow to create an activation code like the default FW?
Thank you!
 
UPDATE:
I inspected the router GUI site in a browser. I noticed that both linking guides are there (i.e. via app and via activation code), but only one of them is displayed (not sure where the switch it). Here is what I tried:

  1. both guideline_1 and guideline_2 exist, guideline_2 is visible:
    1.guideline_1_visible.png
  2. guideline_1 is hidden (see display: none):
    2.guideline_2_hidden.png
  3. deleting the part display:none makes the hidden guide visible:
    3.guideline_2_visible.png
  4. this way I was able to click the Get Activation Code button and use it on Amazon skill site. Unfortunately it didn't connect, it still gives me an error:
    4.still_error.png
Unless anybody here knows a good reason, I will give up, after all it is not safe to enable Alexa anyway.
 
@leventea, If you SSH into your router and run the following command, what value is returned?
nvram get oauth_auth_status

On my RT-AX86U Pro, which has never had the Alexa integration enabled, the NVRAM oauth_auth_status value is set to "0".

It appears the oauth_auth_status value is what hides either the guideline_1 DIV or the guideline_2 DIV. The code from the Advanced_Smart_Home_Alexa.asp file:
Code:
if(oauth_auth_status == "2")
$("#guideline_2").css("display", "");
else
$("#guideline_1").css("display", "");
}
Don't know where that oauth_auth_status value is being generated or set by the router. No idea if setting that value back to "0", if possible and if it survives reboot, will solve your issue/problem or if it introduces other issues or problems. Possible example:
Code:
nvram set oauth_auth_status=0
nvram commit
Note that manually changing the NVRAM values may cause unexpected or unintended side effects. One does so at their own risk!!! If one does choose to change an NVRAM value, reboot the router after making the change.
 
Thanks for the hint!
NVRAM query results in oauth_auth_status = 2 which corresponds with the displayed guide but I'd rather not risk to change it without being sure of positive results - especially since I can display the other guide to get an authentication code for manual linking over Amazon.

I'd like to find out the reason for that error code (1) whilst linking.
Is there a way to check the communication between Amazon and the router somewhere? (the system log doesn't show anything, even if I change the log level to debug or all)

I'd like you to know that I'm very grateful for your investigations so far!
 
@leventea, it appears the value oauth_auth_status is also referenced in the code on the WAN > DDNS page (Advanced_ASUSDDNS_Content.asp). If you have DDNS enabled maybe try disable DDNS, reboot the router and double check there isn't a Withdraw button under Privacy, as a troubleshooting step and see if anything changes.

Code:
if(oauth_auth_status == "2"){
        if(aae_ddnsinfo == "ns1.asuscomm.com" && ddns_hostname_x_t.indexOf(".asuscomm.com") != "-1" && ddns_replace_status == "1")
            $("#ddns_server_x option[value='WWW.ASUS.COM.CN']").remove();
        else if(aae_ddnsinfo == "ns1.asuscomm.cn" && ddns_hostname_x_t.indexOf(".asuscomm.cn") != "-1" && ddns_replace_status == "1")
            $("#ddns_server_x option[value='WWW.ASUS.COM']").remove();
    }
Edit to add: The nvram value oauth_auth_status is also referenced in at least two other locations in the firmware (after searching the Asus-Merlin github master code) which also appear to deal with DDNS. So try disabling or removing DDNS and see if it helps.
 
Last edited:
May I ask for your help in finding possible reasons for the linking issue to Alexa account detailed above?
I can't help you, I don't know anything about Alexa beside that it's an Amazon voice assistant.
 
@leventea, it appears the value oauth_auth_status is also referenced in the code on the WAN > DDNS page (Advanced_ASUSDDNS_Content.asp). If you have DDNS enabled maybe try disable DDNS, reboot the router and double check there isn't a Withdraw button under Privacy, as a troubleshooting step and see if anything changes.

Code:
if(oauth_auth_status == "2"){
        if(aae_ddnsinfo == "ns1.asuscomm.com" && ddns_hostname_x_t.indexOf(".asuscomm.com") != "-1" && ddns_replace_status == "1")
            $("#ddns_server_x option[value='WWW.ASUS.COM.CN']").remove();
        else if(aae_ddnsinfo == "ns1.asuscomm.cn" && ddns_hostname_x_t.indexOf(".asuscomm.cn") != "-1" && ddns_replace_status == "1")
            $("#ddns_server_x option[value='WWW.ASUS.COM']").remove();
    }
Edit to add: The nvram value oauth_auth_status is also referenced in at least two other locations in the firmware (after searching the Asus-Merlin github master code) which also appear to deal with DDNS. So try disabling or removing DDNS and see if it helps.
  • Disabled DDNS
  • removed the policy related to Account Binding, DDNS, Google Assistant, Alexa and Remote connection
  • rebooted
  • checked oauth_auth_status, it was still 2
Tried linking Alexa account again by unhiding guideline_1 to get an activation code (I was prompted to agree with adding back the policy I removed earlier), using it on the Amazon site, got the same error code (1).
 
Asus support is not helpful. They robotically provided the generic steps (although I explained them in advance that I already tried with no success), I told them I use Merlin, they simply advised to reset the router and install the default firmware. (I won't. I worked for days on configuring it, I won't throw it out.)
 
Asus support is not helpful. They robotically provided the generic steps (although I explained them in advance that I already tried with no success), I told them I use Merlin, they simply advised to reset the router and install the default firmware. (I won't. I worked for days on configuring it, I won't throw it out.)
Asus Support generally does not provide support Asus-Merlin firmware so their response to your question is as expected.

Like it or not performing a reset is often a way to try and fix certain issues that crop up with the firmware. To make things easier one can use various Asus-Merlin add-on scripts to save and reimport certain settings (YazDHCP for example). One can export their router's configuration file for later import. One can print to PDF or screen capture each GUI page where setting changes were made and refer to them when reconfiguring the router after a reset. Look at it this way, with the amount of time you have spent trying to deal with this issue (including taking time to write up posts here) you could have simply performed a reset (or hard factory reset) and reconfigure and possibly have saved yourself a whole lot of time and effort. Even if a reset fails to work it will have at least checked off one of the standard troubleshooting steps/boxes.

Another suggestion, no idea if it will work. Since the Alexa integration uses DDNS, you could if you haven't done so already, try changing to a different DDNS service and see if that does anything. Another troubleshooting step if it hasn't been tried yet, disable both DDNS and the WAN access used by the Alexa Integration and reboot the router. Then try enabling the feature using a web browser. Do not try to use the Asus app to setup or configure the Alexa integration. As indicated above the Asus app generally isn't fully supported by the Asus-Merlin firmware.
 
Asus Support generally does not provide support Asus-Merlin firmware so their response to your question is as expected.

Like it or not performing a reset is often a way to try and fix certain issues that crop up with the firmware. To make things easier one can use various Asus-Merlin add-on scripts to save and reimport certain settings (YazDHCP for example). One can export their router's configuration file for later import. One can print to PDF or screen capture each GUI page where setting changes were made and refer to them when reconfiguring the router after a reset. Look at it this way, with the amount of time you have spent trying to deal with this issue (including taking time to write up posts here) you could have simply performed a reset (or hard factory reset) and reconfigure and possibly have saved yourself a whole lot of time and effort. Even if a reset fails to work it will have at least checked off one of the standard troubleshooting steps/boxes.

Another suggestion, no idea if it will work. Since the Alexa integration uses DDNS, you could if you haven't done so already, try changing to a different DDNS service and see if that does anything. Another troubleshooting step if it hasn't been tried yet, disable both DDNS and the WAN access used by the Alexa Integration and reboot the router. Then try enabling the feature using a web browser. Do not try to use the Asus app to setup or configure the Alexa integration. As indicated above the Asus app generally isn't fully supported by the Asus-Merlin firmware.
Thank you!
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top