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

Bug when changing wifi data #369

Open
hackintoshlover opened this issue Dec 4, 2023 · 6 comments
Open

Bug when changing wifi data #369

hackintoshlover opened this issue Dec 4, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@hackintoshlover
Copy link

hackintoshlover commented Dec 4, 2023

It seems to me that there is a bug when changing wifi.
I moved my hardware to another location (another wifi), I got the page 192.168.4.1 and I was able to configure the new wifi. It worked. When I came home with it, I wanted to put the old wifi back on. The page 192.168.4.1 is there, I was able to choose my wifi, the connection is made but when I reboot it still tries to connect to the previous wifi.
Weird thing:

When scanning the previous wifi appears in the list even though it is not present where I am staying.
The backup access point is still visible when connected to my home network and both are accessible.
I was able to unblock it by doing "wifi_erase_config -la" in the console.

In the logs, the only abnormal thing I see is:

E (97215) network: network manager Unhandled Event NETWORK_WIFI_CONFIGURING_ACTIVE_STATE(WIFI_CONFIGURING_STATE) [EN_CONNECTED]
E (99285) network: network manager Unhandled Event NETWORK_WIFI_CONFIGURING_ACTIVE_STATE(WIFI_CONFIGURING_STATE) [EN_GOT_IP]

I have the impression that it cannot overwrite old wifi data.
Using ESP32A1S audio board.
esp-web-tools-logs.txt

@sle118 sle118 added the bug Something isn't working label Dec 4, 2023
@sle118 sle118 self-assigned this Dec 4, 2023
@sle118
Copy link
Owner

sle118 commented Dec 5, 2023

FYI, I spend the little spare time I have on the next generation/refactored platform for the project so I might not have a chance to get to this in a while. In the new platform, one of the main requirements for wifi will be multi access points configuration.

@hackintoshlover
Copy link
Author

I will wait for the same.
Till then i will try not to move the device from one network to the other.
Also eagerly waiting for line-in.
Thanks.

@sle118
Copy link
Owner

sle118 commented Dec 19, 2023

I will wait for the same. Till then i will try not to move the device from one network to the other. Also eagerly waiting for line-in. Thanks.

Line in is on the horizon, but will take some time given the effort needed for the refactoring. Embedded development is full of surprises and this is no exception.

I intend to bake multiple WiFi credentials from the beginning here.

@hackintoshlover
Copy link
Author

That is totally fine with me. I'll be waiting eagerly.
Since this project simplifies everything for me.
Earlier i was using raspberry pi connected to my speaker whose memory card would go corrupt.
With your project it's just simple, cheap, easy and efficient.
And for me till date it has not failed and no sound lag when using multiple of these devices with LMS.

@legolas136
Copy link

legolas136 commented Apr 27, 2024

I have also problems after changing wifi credetials.
the first change (from home wifi to mobile hotspot worked as it should.
when trying to revert to home wifi, using esp32 hotspot 192.168.4.1 and so on, i got this:

please note the one bold line within the log

I (3034) wifi:wifi driver task: 3ffdfad0, prio:23, stack:6656, core=0
I (3044) wifi:wifi firmware version: 9ec65ef
I (3044) wifi:wifi certification version: v7.0
I (3044) wifi:config NVS flash: enabled
I (3044) wifi:config nano formating: disabled
I (3054) wifi:Init data frame dynamic rx buffer num: 40
I (3054) wifi:Init management frame dynamic rx buffer num: 40
I (3064) wifi:
Init management short buffer num: 32
I (3074) wifi:Init static tx buffer num: 12
I (3074) wifi:Init tx cache buffer num: 32
I (3074) wifi:Init static rx buffer size: 1600Type 'help' to get the list of commands.
Use UP/DOWN arrows to navigate through command history.
Press TAB when typing command name to auto-complete.


I (3094) wifi:Init static rx buffer num: 12
I (3094) wifi:Init dynamic rx buffer num: 40
To automatically execute lines at startup:
        Set NVS variable autoexec (U8) = 1 to enable, 0 to disable automatic execution.
        Set NVS variable autoexec[1~9] (string)to a command that should be executed automatically
I (3104) wifi_init: tcpip mbox: 32
I (3124) wifi_init: udp mbox: 32


I (3134) wifi_init: tcp mbox: 32
I (3134) wifi_init: tcp tx win: 8192
I (3134) wifi_init: tcp rx win: 32768

****************************
Your terminal application does not support escape sequences.
Line editing and history features are disabled.
On Windows, try using Putty instead.
****************************
I (3144) wifi_init: tcp mss: 1440
W (3154) console: Processing autoexec commands while network manager active.  Wifi related commands will be ignored.
I (3164) wifi_init: WiFi/LWIP prefer SPIRAM
I (3174) console: autoexec is set to perform auto-process
I (3184) network_wifi: Starting wifi
I (3194) console: Running command autoexec1 = squeezelite  -o i2s  -s  lms.linyo.de -b  500:2000 -C  30 -r  44100
I (3194) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
W (3204) config: Value not found for key autoexec2
I (3204) squeezelite_cmd: Calling squeezelite
squeezelite-esp32> [00:00:01.683] sb_controls_init:249 initializing audio (buttons/rotary/ir) controls (raw:0)
[00:00:01.695] sb_displayer_init:327 no display or led visualizer for LMS
W (3234) DAC core: DAC does not use i2c
I (3234) DAC external: DAC on I2C @0
W (3244) DAC external: no i2c controlset found
[00:00:01.710] output_init_i2s:359 invalid MCK gpio -1
I (3254) I2S: DMA Malloc info, datalen=blocksize=4088, dma_buf_count=12
I (3264) I2S: APLL: Req RATE: 44100, real rate: 44099.988, BITS: 32, CLKM: 1, BCK_M: 8, MCLK: 22579194.000, SCLK: 2822399.250000, diva: 1, divb: 0
[00:00:01.736] equalizer_set_samplerate:123 no equalizer with 32 bits samples
I (3284) BTDM_INIT: BT controller compile version [2c56073]
W (3284) BT_AV: BT Sink pin code is: [1234]
I (3304) wifi:mode : sta (b4:e6:2d:8d:dd:51)
I (3304) wifi:enable tsf
I (3614) network_handlers: Existing wifi config found. Attempting to connect.
I (3624) network: Starting DHCP client
I (3634) network_wifi: Wifi Connecting to LSD...
I (3664) BT_AV: Bluetooth Init complete

W (5324) network_wifi: WIFI_EVENT_STA_DISCONNECTED. From BSSID: 00:00:00:00:00:00, reason code: 201 (WIFI_REASON_NO_AP_FOUND)

W (5324) wifi:Haven't to connect to a suitable AP now!
I (5334) network_wifi: Configuring Access Point.
I (5334) network: Stopping DHCP server
I (5334) network: Starting DHCP server
I (5354) network_wifi: AP SSID: squeezelite-8ddd51
I (5354) network_wifi: AP Password: squeezelite
I (5364) wifi:mode : sta (b4:e6:2d:8d:dd:51) + softAP (b4:e6:2d:8d:dd:52)
I (5364) wifi:Total power save buffer number: 6
I (5374) wifi:Init max length of beacon: 752/752
I (5374) wifi:Init max length of beacon: 752/752
I (5964) wifi:Total power save buffer number: 6
I (5964) wifi:Total power save buffer number: 6
I (5964) wifi:Set ps type: 1

I (5964) network_wifi: Initiating wifi network scan
I (5964) dns_server: DNS Server listening on 53/udp
E (18634) network: network manager Unhandled Event NETWORK_WIFI_CONFIGURING_ACTIVE_STATE(WIFI_CONFIGURING_STATE) [EN_TIMER]


@legolas136
Copy link

Workaround used:
use the hotspot of the esp32 and get into recovery mode (so the system wont restart over and over) AND I think this makes the difference, that the system will keep the new wifi credentials.
then connect to the desired network.

-> no error messages in console, working again :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants