-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
syntax / usage SetSSID, SetSecurityKeys #66
Comments
This indeed is a strange behaviour I can reproduce (using a 7590 with 7.20). After creating a new user with the proper rights, it seems to be that the service description information and also the AVM-documentation differ from the implementation. However at least I was able to change the name of the guest network and activate and deactivate it the same way as you mentioned:
That's something that may get discussed with the vendor. |
any suggestions on the actions SetSSID / SetSecurityKeys ? EDIT i think i understood now, im not allowed to skip the other args like EDIT2 okay my suggestion above works with the pure xml method (api call with curl btw) but not with the python module |
I've observed a simlar issue: Enabling/disabling guest-WIFI works fine, changing the password does not work at all. Here's one of the Python code snippets I use:
The reponse to this request is always:
I contacted AVM, provided them a Wireshark trace and I got the information that apparently there is a bug inside FritzConnection. The request body FritzConnection sends out looks like this:
The reference code AVM uses, however, creates the following sequence:
So apparently the "s:" inside the keys and values in the XML should not be there. At least not for this action. I also got the information that enabling/disabling the WIFI does work only because of a coding flaw in the FritzBox. Now they know about that they are going to fix it in one of the upcoming releases. So it will cease working in the future. Does this information help in narrowing down the issue and maybe even provide a fix? |
Interesting. Debugging the fritzconnection code the request body created from your code snippet
looks like this:
The additional arguments like
are not created (as they are not given as arguments). So I wonder why the wireshark trace reports this. However, the error code 402 reported from the box can get reproduced, even by adding the NewWEPKey arguments to the request. But removing the "s:" from the template does also not work and results in another exception:
Also changing the encoding from utf-8 to utf-16 as given by the AVM reference code (and encoding the payload accordingly of course) returns an
regardless whether the "s:" has been part of the template or not. Keeping the "s:" still works on other services and actions with the documented TR-064 api (at least the services I've used on a FRITZ!Box 7590 with FRITZ!OS 7.20). If there is a bug in fritzconnection (I'm sure there are bugs, because there is no thing like a bug-free software), this would be great, because then it could get solved. But currently I have no idea. |
I need to apologize. The code snippet used for this trace looks as follows:
So this explains why the WireShark trace contains the
lines: They are there since they are part of the dict which was obtained by the FritzBox earlier and which is modified by the code to change the password. |
I did some more trials and found a quick and dirty hack which actually works. I am aware that this is far from being good code, however I would say this is a confirmation that AVM's statement is true: In this case the ' In
This removes the ' So my script looks like as follows:
The following output is generated:
So to me it looks like AVM support is right and the ' |
Indeed, fixing this a second time works. But I have done nothing different than in the first attempt to change just the The clean way to change this, instead of using However, for all other action-calls the previous version using the As the master branch has already some changes for 1.4.0_dev there will be no 1.3.5 and the fix will be in the upcoming 1.4 version. I should modify the branch structure after the next release. Furthermore I suppose the issue reported by @tobit6795 may be part of the "flaw" mentioned by AVM. Thank you for reporting this. |
Hello everybody, |
sorry i didnt know where to ask
so enabling WLAN like that works for me:
fc.call_action('WLANConfiguration3', 'SetEnable', NewEnable=True)
i wanted to set the SSID / Key, but im still not lucky
fc.call_action('WLANConfiguration3', 'SetSSID', NewSSID='guest-net')
current error say 402 / Argument error
same goes for setting the keys
fc.call_action('WLANConfiguration3', 'SetSecurityKeys', NewPreSharedKey='St4Rk3SP422w0rD')
i got the SSID set with 'SetEnable' instead of SetSSID
fc.call_action('WLANConfiguration3', 'SetEnable', NewSSID='guest-net')
which confuses me even more
so i tried this
i got no error like befor, but nothing was changed
pls help
The text was updated successfully, but these errors were encountered: