wifi-connect icon indicating copy to clipboard operation
wifi-connect copied to clipboard

Detect when device fails to connect to selected access point (e.g. incorrect password)

Open charliesneath opened this issue 5 years ago • 6 comments

Is there a way to get explicit signal when connection to the selected access point fails because of something like an incorrect password?

I can see that wifi-connect automatically restarts the hotspot if the provided credentials are wrong, but it would be helpful to have an option that would prevent this retry behavior so I can catch it with my program and show feedback.

Ideally this would be communicated through a return code from wifi-connect, where 0 is successful connection and anything else indicates failure.

charliesneath avatar Apr 20 '19 21:04 charliesneath

@charliesneath that's a really nice idea, which I think could be easily implemented. We can add a --no-retry argument for this. This will be definitely helpful for applications which control externally wifi-connect as it will provide finer control over its behavior. I will try to get it done in the next days.

majorz avatar Apr 22 '19 08:04 majorz

@majorz Awesome, the --no-retry tag is just what I had in mind. This will be a big win since it will provide much more control over the user experience (as you mention).

charliesneath avatar Apr 22 '19 23:04 charliesneath

@majorz Have you been able to make any progress adding this additional argument for disabling retries?

charliesneath avatar May 08 '19 12:05 charliesneath

Hi @majorz: is this feature is still planned?

charliesneath avatar Oct 23 '19 14:10 charliesneath

Is there a way to get explicit signal when connection to the selected access point fails because of something like an incorrect password?

I can see that wifi-connect automatically restarts the hotspot if the provided credentials are wrong, but it would be helpful to have an option that would prevent this retry behavior so I can catch it with my program and show feedback.

Ideally this would be communicated through a return code from wifi-connect, where 0 is successful connection and anything else indicates failure.

Indeed a fairly simple idea to implement! Is there any update on this?

Chinmay19 avatar Nov 04 '19 15:11 Chinmay19

Checking in to see if this is still planned. Would be a very helpful feature to ensure that an app can notify users when a wifi password was wrong. Thank you, @majorz !

charliesneath avatar Sep 03 '20 12:09 charliesneath