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

Problem connecting to WiFi - spurious %0D%0A? #11

Open
jruys opened this issue Jul 24, 2021 · 7 comments
Open

Problem connecting to WiFi - spurious %0D%0A? #11

jruys opened this issue Jul 24, 2021 · 7 comments

Comments

@jruys
Copy link

jruys commented Jul 24, 2021

Could not get code to connect to WiFi, got timeout error - I noticed it called this URL:

https://192.168.1.1/connect?ssid=%0D%0AMySSID&pass=MyPASS

Changed URL to remove %0D%0A, rebooted clock, called URL again and then WiFi connected ok.

@frankcohen
Copy link
Owner

That's strange behavior, for sure. What device and browser are you using? -Frank

@jruys
Copy link
Author

jruys commented Jul 27, 2021

Using Elekstube IPS 6.1.11, your pre-compiled binary and Chrome, both on iPad and MacBook.

Haven't tested other browsers - will do that next time I load the software (went back to stock as I couldn't get it to sync and ran out of time).

@bbilson2
Copy link

Could not get code to connect to WiFi, got timeout error - I noticed it called this URL:

https://192.168.1.1/connect?ssid=%0D%0AMySSID&pass=MyPASS

Changed URL to remove %0D%0A, rebooted clock, called URL again and then WiFi connected ok.

Your solution worked for me too. I am using Brave on Android 6.0.1.

@frankcohen
Copy link
Owner

Seems like I should change the code to remove the Carriage Return and Line Feed characters (%OD%OA) automatically. These are being sent from the HTML form. I will make the change if I hear no objections. Thanks @bbilson2 and @jruys

@wolfallein
Copy link

Had the same problem, fixed removing %0D%0A from the url.

@frankcohen
Copy link
Owner

Thanks @wolfallein. I may have time in the end of December to update the source code and rebuild the binary firmware file. Right now I'm heads down on the Reflections project. Thanks for your help and support. -Frank

@wolfallein
Copy link

@frankcohen , thank you.

On file EleksHack.ino
line 672

replace:
res->println( "<input type=\"hidden\" name=\"ssid\" value=\"" );

by

res->print( "<input type=\"hidden\" name=\"ssid\" value=\"" );

The println adds the new line inside the form field.

\JP

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

No branches or pull requests

4 participants