Skip to content

WiFi will not connect for the Color model #170

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

Closed
sonofcy opened this issue Apr 23, 2024 · 4 comments
Closed

WiFi will not connect for the Color model #170

sonofcy opened this issue Apr 23, 2024 · 4 comments

Comments

@sonofcy
Copy link

sonofcy commented Apr 23, 2024

Use one of the two templates below and delete the rest.

8<------------------------ BUG REPORT -----------------------------------------

Expected behavior

WiFi should connect

Actual behavior

Wifi Status is WL_STATUS 7 forever

Test code

Reduce the HOSTNAME from 32 chars to at least 1 less.

// add code here
#define WIFI_HOSTNAME "ThingPulseWeatherStationColor"

Weather Station Color version

Which branch are you on? If you know the Git revision then add it here as well.
I don't know

Hardware

Describe whether you run the code on the ThingPulse Weather Station Color kit or on some custom hardware.
I am using the ThingPulse Weather Station Color kit

8<------------------------ END BUG REPORT -------------------------------------

8<------------------------ FEATURE REQUEST ------------------------------------

Missing feature

Justification

Tell us why you would like to see this feature added.

Workarounds

Are there any workarounds you currently have in place because the feature is missing?

8<------------------------ END FEATURE REQUEST --------------------------------

@sonofcy
Copy link
Author

sonofcy commented Apr 23, 2024

I have tested this fix with both the Color model, and a simple Client Sketch. It always fails when HOSTNAME is 32 chars, and works when less.
I suspect that some code is adding a null terminator to turn the char array into a null terminated string and when they did that it stepped on some memory of another variable or code.

@sonofcy sonofcy closed this as completed Apr 23, 2024
@marcelstoer
Copy link
Member

marcelstoer commented Apr 24, 2024

Thanks. Here they state that the max be 32 chars: https://arduino-esp8266.readthedocs.io/en/3.1.2/esp8266wifi/station-class.html#hostname

@sonofcy
Copy link
Author

sonofcy commented Apr 24, 2024 via email

marcelstoer added a commit that referenced this issue May 3, 2024
Details at #170.

Likely also fixes #165, #167, #168
@sonofcy
Copy link
Author

sonofcy commented May 19, 2024 via email

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

2 participants