Skip to content
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

wlan_guide_settings api #219

Merged
merged 6 commits into from
Jul 20, 2024
Merged

Conversation

timvlaer
Copy link
Contributor

In this PR, you find a script and some new functionality to the api to configure the Huawei 5576-320 as if you'd go through the setup webpage.

It does the same things as what you need to do manually but via the api:

  • setting the locale
  • accepting the privacy policy
  • set the autoupdate config
  • configure the wifi ssid and the admin password

I derived this information by reverse engineering the webpage hosted by the device.

I'll use a variant of this script to automatically configure our fleet of devices. The script still requires you to connect to the WiFi network of the device.

I hope this can help someone in the future.

@Salamek
Copy link
Owner

Salamek commented Jul 17, 2024

@timvlaer and there are some lint issues see https://github.com/Salamek/huawei-lte-api/actions/runs/9963720492/job/27572212960?pr=219#step:5:19

@Salamek
Copy link
Owner

Salamek commented Jul 18, 2024

Still some lint issues https://github.com/Salamek/huawei-lte-api/actions/runs/9989084977/job/27612359830?pr=219#step:5:60

and that print^ is still not replaced/removed...

@timvlaer
Copy link
Contributor Author

My bad @Salamek , thanks for checking. It should be good now 🤞 tox runs successfully locally and on github actions on my fork.
Let me know if you have any other remarks.

@@ -32,10 +33,12 @@ def _try_or_reload_and_retry(fn: Callable[..., T]) -> Callable[..., T]:
def wrapped(*args: Any, **kw: Any) -> T:
try:
return fn(*args, **kw)
except ResponseErrorLoginCsrfException:
except ResponseErrorLoginCsrfException as e:
print("Retry because " + str(e))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be _LOGGER.debug, _LOGGER.info or _LOGGER.warning so we do not pollute stdout with potentially unwanted text...

@Salamek
Copy link
Owner

Salamek commented Jul 20, 2024

Looks good, merging...

@Salamek Salamek merged commit 788471c into Salamek:master Jul 20, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants