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

Warn user when he enters a wrong WiFi password #142

Open
emmanuelgeoffray opened this issue Dec 22, 2017 · 6 comments
Open

Warn user when he enters a wrong WiFi password #142

emmanuelgeoffray opened this issue Dec 22, 2017 · 6 comments

Comments

@emmanuelgeoffray
Copy link
Contributor

I think it would be super useful if the user would be warned if he enters a wrong password in the "Configure Wifi Client" section.

I would be glad to help on this feature.
What do you think would be the best implementation?
From what I have seen, the password and SSID are stored in wpa_supplicant.conf.
Before doing this, may be the app should try to switch wifi and retrieve errors if any?
Not sure how to switch wifi though, but I can search a command line for that.

Best,
Emmanuel

@emmanuelgeoffray
Copy link
Contributor Author

hey @billz
any thoughts on that?
I am still needing this feature, so I think I will impement it pretty soon.

Thank you,
Emmanuel

@emmanuelgeoffray
Copy link
Contributor Author

hey @billz
thanks for all the recent updates
any thoughts on that?
I am still needing this feature, and did not have time to implement it!
But if you have an idea on how to do it, let's do it!
I see many humans entering wrong passwords!

Thank you,
Emmanuel

@dalmago
Copy link
Contributor

dalmago commented Jan 22, 2019

I also would enjoy this feature, but in my opinion it's a little hard to implement.

Is it possible to verify the password while the WiFi is still in AP mode?

If you switch to client mode, you'd have to reconnect your device to the Pi after verifying, and it could also take several seconds to change to client mode, verify the password and change back to AP mode.

@gabrielstuff
Copy link

Indeed it does not look trivia but feasible : https://unix.stackexchange.com/q/407168, https://superuser.com/a/903893, https://raspberrypi.stackexchange.com/a/61137 Many people complains about detecting wrong password and switching from one wifi to an other depending on the password entered.

Maybe, this kind of behaviour could be an option in the global settings. If you activate it, it took more times but it is safe for every human.

I think that waiting some seconds before getting an error could be understandable if you guarantee the connectivity.

@billz billz pinned this issue Apr 13, 2019
@glaszig
Copy link
Contributor

glaszig commented Aug 2, 2019

this could be implemented as an asynchronous process.

  • in the ui, enter a psk and hit "connect"; let raspap do its usual thing
  • start a process that, for a limited time, watches the wpa_supplicant log and looks for the error message
  • if the error message is found, that process puts some sort of state file somewhere
  • the raspap ui gets an xhr-based polling feature that talks to an endpoint that checks for that state file and if it exists, the ui shows a notification
  • polling stops if the state file says "all fine"

first i thought about websockets but that would require an actively runnig php server process. right now, lighty just execute raspap on each request. on the other hand, i could write some sort of control server in go and hook that up as a websocket source to the ui. then we can do other fancy real-time stuff. that control server could also be running with elevated privileges to do things without that sudo dance. i mean, we give sudo access to "arbitrary" scripts that my contain anything anyway.

also: we could move everything over to the go server, piece by piece, and in the end have only one binary to deploy.

@billz billz unpinned this issue Oct 4, 2019
@wangkai88
Copy link

我在客户端设置界面输入连接wifi密码连接一直都是提示报错,

密码长度需要介于8~63个字符

无法更改连接WiFi

@billz billz removed the help wanted label Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants