forkineye / ESPixelStick

Firmware for the ESPixelStick
http://forkineye.com/
528 stars 169 forks source link

SoftAP uses target SSID instead of own ID #744

Closed marcobrianza closed 3 months ago

marcobrianza commented 4 months ago

ESPixelStick Firmware Version ESPixelStick v4.0-ci7877572228 (Feb 12 2024 - 20:34:49)

Hardware Version Lolin D32

Binary release or compiled yourself? CI release

Describe the bug in this latest version when the target SSID is not available the board brings up an AP with the same SSID it is supposed to connect to. Of course this can create allo sort of issues to other clients that need to connect the the original AP. In the latest released beta 4.0-beta5 this was not happening.

I'm attaching the 2 screenshot where the log is visible for the 2 cases.

CI ap issue 4-beta5

MartinMueller2003 commented 4 months ago

This is how it was designed. I will add an additional AP field.

marcobrianza commented 4 months ago

I think that the previous behaviour of 4.0-beta5 was good enough

MartinMueller2003 commented 3 months ago

There was no good way to specify an SSID in the AP mode. It was always derived which made it difficult to use human comfortable names.

marcobrianza commented 3 months ago

After some thinking I agree that the AP functionality deservers dedicated parameters in the configuration separated from the station part. (as WLED). I'm attaching a screenshot apmode

the options to enable AP are: disconnected | always | no connection after boot | never

MartinMueller2003 commented 3 months ago

i am in the process of adding ap centric fields

marcobrianza commented 3 months ago

I will happily test it when is available.

MartinMueller2003 commented 3 months ago

Two new fields have added for AP functionality. AP SSID and AP Password. Leaving password blank runs in open mode. Setting a password of at least 8 characters moves you to secure mode.

marcobrianza commented 3 months ago

I have just tested this release. I have seen that the AP goes up when there is no Wi-Fi connection. I there a way to keep it always up even with Wi-Fi connection?

MartinMueller2003 commented 3 months ago

Not sure what you are asking. We run in STA mode if we can connect to an AP and we run in AP mode as a fallback so you an configure proper STA credentials. AP mode is not intended to be regularly used. We definitely do NOT support AP + STA mode.

marcobrianza commented 3 months ago

yes, I was asking for AP+STA since the configuration allows it and the board supports it. What are the options in the interface "AP fallback" and "Stay in AP mode" for? to me they where the candidates for the AP+STA features

MartinMueller2003 commented 3 months ago

Primary mode is STA. We do the following: Try STA mode using configured credentials (if they exist) Try STA mode using default credentials (if they exist) If AP fallback is enabled try to be an AP for a while. If in AP mode and no STA connects stay in AP mode if stayInApMode is true If not connected to anything and Reboot is true then reboot the device If not connected to anything and reboot is false then start the WiFi sequence over

MartinMueller2003 commented 3 months ago

FYI: While the board supports AP+STA mode, the processing and ram overhead would make it impossible to process pixel data in real time.

marcobrianza commented 3 months ago

thank you for the clarification