schreibfaul1 / ESP32-MiniWebRadio

Internetradio with ESP32, I2S DAC and SPI TFT Display with Touchpad

Home Page:https://www.youtube.com/watch?v=6QbPee2583o

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v3.1 fresh install problems

clear-sky opened this issue · comments

Hello everyone
Because of the problems that I will say later, I thought that the esp32-s3 module was broken, so I changed it and installed another one that was completely new, but I encountered a very strange problem. After downloading the radio program, it connects to the Internet, but no sound is played. Viometer has no activity thus there is a problem. I couldn't connect to the radio even with the browser. I pinged the radio's IP, only when the radio starts to working, it responds to the ping for a few moments, and then the connection is disconnected.
I saw that I can't do anything, I had to go back to version 2, everything works fine there, I connected to radio via web browser changed some stations to save it in nvs and set ir remore codes then installed version 3.1
those who use version 3.1 with the new module will definitely get caught in this hell, especially if they are newbies!
I think the lack of default files in nvs is the cause of this problem
Well, now it's time to tell what problems I encountered. Due to the device monitor not working properly in version 3 #402 and #418, I couldn't see the problem. I haven't found a solution for it yet. I don't know how many other people have this problem.

I can't get an connection to my ASUS Router anymore, first I thought it relies to my ESP32S3 with faulty w-lan but then I tryed it with the good ESP32S3 and there it also do not work anymore. With the old Radio there was no problem.
For some reason It is working when I connect to my MobilePhone AP.
I double checked all settings include the Password and SSID, all is correct.
The Miniradio opens an own AP when I set the password there it also do not work. Only when I use the Mobile....

Since I was not not able to find an usable method to make an flash backup from my ESP32S3 I do not have an working version now.... Also there is now an problem to compile the Backup of the old MiniradioVersion.
There is something going wrong with all the libraries... I will look tomorrow if I find an older release of the radio at github.

Hi Dear Solar320
it is better to format your sd card to FAT32 - download latest Content_on_SD_Card.zip and extract it in your sd card
set your username and password in common.h
hope this help you!

This doesn't change anything. I format the sdcard, copy all files on it in original. Then the Radio open up an AP and also find my router.
When I put in my password it restarts and can not connect. I also try to put my password directly into the networs.csv, no difference.

I flashed an Antenna Test tool and it instantly connect to my router and send back the signal level over serial interface.
Like I said, the old Radio version will connect without problems.
18:05:28.353 -> entry 0x403c9880
18:05:29.081 -> ...........
18:05:34.085 -> WiFi connected
18:05:34.085 -> IP address:
18:05:34.085 -> 192.168.50.25
18:05:34.085 ->
18:05:34.085 -> - Signal Level: -61
18:05:36.044 -> - Signal Level: -60
18:05:38.045 -> - Signal Level: -60
18:05:40.081 -> - Signal Level: -61
18:05:42.083 -> - Signal Level: -60
18:05:44.047 -> - Signal Level: -60
18:05:46.092 -> - Signal Level: -59

I will clean the flash and flash again, when this also do not change something I will make an Backup of the source code and clone the whole radio again from Github, and try again with an clean install.
For the first time I try to only setup the SDCARD, not PCM and no Display. I should see the Infos over the serial IF.

Clean Flash and reflashing does nothing:

00:00:00 ***************************
00:00:00 * MiniWebRadio V3 *
00:00:00 ***************************
00:00:00
00:00:00 setup: .... Arduino is pinned to core 1
00:00:00 tft_info: . init ILI9341
00:00:00 setup: .... Init SD card
00:00:00 setup: .... SD card found, 30410.3 MB by 30436.5 MB free
00:00:00 setup: .... seek for stations.csv
00:00:00 setup: .... stations.csv found
00:00:00 setup: .... seek for WiFi networks
[ 1551][I][WiFiMulti.cpp:84] addAP(): [WIFI][APlistAdd] add SSID: mySSID <--- what is this?
[ 1560][I][WiFiMulti.cpp:84] addAP(): [WIFI][APlistAdd] add SSID: ZTE BLADE V8 <---Phone network
00:00:06 setup: .... 2 WiFi networks found
00:00:06 setup: .... MyNetwork (-53) <-----------My ASUS Router (Renamed)
00:00:06 setup: .... A1-4a9861 (-76)
[ 8774][I][WiFiMulti.cpp:114] run(): [WIFI] scan done
[ 8775][I][WiFiMulti.cpp:119] run(): [WIFI] 1 networks found
[ 8776][E][WiFiMulti.cpp:191] run(): [WIFI] no matching wifi found!
00:00:07 WiFI_info: WiFi credentials are not correct <-------I input the PW 100 times, it do not work. But into test Program it
is working!
00:00:07 RECONNECTION try 1
[ 8793][I][WiFiMulti.cpp:84] addAP(): [WIFI][APlistAdd] add SSID: mySSID <---what is this?
[ 8802][I][WiFiMulti.cpp:84] addAP(): [WIFI][APlistAdd] add SSID: ZTE BLADE V8

The I open up my Hotspot and connect by put in my Hotspot password:

00:01:30 setup: .... connected to ZTE BLADE V8, IP address is 192.168.43.206
[ 17346][I][ArduinoOTA.cpp:141] begin(): OTA server at: MiniWebRadio.local:3232
00:01:30 ftpServer: Buffers allocated: 4622 bytes
00:01:30 rtime_info: Initializing SNTP
01:01:30 rtime_info: Waiting for system time to be set... (1/10)
01:01:32 rtime_info: Waiting for system time to be set... (2/10)
18:25:50 rtime_info: 18:25:50
18:25:50 audiotask: is pinned to core 0
18:25:50 audiotask: priority is 2
18:25:50 AUDIO_info: commFMT = Philips
18:25:50 setup: .... Number of saved stations: 14
18:25:50 setup: .... current station number: 5
18:25:50 setup: .... current volume: 8
18:25:50 setup: .... last connected host: http://server4.streamserver24.com:26237/stream
18:25:50 setup: .... connection timeout: 1000 ms
18:25:50 setup: .... connection timeout SSL: 2500 ms
18:25:50 action: ... switch to station 5
18:25:50 AUDIO_info: Connect to new host: "http://server4.streamserver24.com:2199/tunein/hitradio.asx"
18:25:50 AUDIO_info: PSRAM found, inputBufferSize: 638965 bytes
18:25:50 AUDIO_info: buffers freed, free Heap: 150136 bytes
18:25:51 AUDIO_info: Connection has been established in 433 ms, free Heap: 149080 bytes
18:25:51 AUDIO_info: Filename is playlist.asx
18:25:51 StationName: radioSKW - Einfach gute Musik
18:25:51 AUDIO_info: StationName: "radioSKW - Einfach gute Musik"
18:25:51 StationName: radioSKW - Einfach gute Musik
18:25:51 AUDIO_info: StationName: "radioSKW - Einfach gute Musik"
18:25:51 AUDIO_info: Connect to new host: "http://server4.streamserver24.com:26237/stream"
18:25:51 AUDIO_info: buffers freed, free Heap: 149384 bytes
18:25:51 AUDIO_info: Connection has been established in 151 ms, free Heap: 149276 bytes
18:25:52 bitRate: 192Kbit/s
18:25:52 bitRate: 192Kbit/s
18:25:52 icy-descr: Livestream
18:25:52 StationName: radioSKW
18:25:52 icy-url: .. http://144.76.84.153/stream/radio.pls?mp=/stream
18:25:52 AUDIO_info: MP3Decoder has been initialized, free Heap: 147132 bytes , free stack 4936 DWORDs
18:25:52 lastURL: .. http://server4.streamserver24.com:26237/stream
18:25:52 AUDIO_info: stream ready
18:25:52 AUDIO_info: syncword found at pos 0
18:25:52 AUDIO_info: Channels: 2
18:25:52 AUDIO_info: SampleRate: 44100
18:25:52 AUDIO_info: BitsPerSample: 16
18:25:52 AUDIO_info: BitRate: 192000
18:25:52 StreamTitle: Silbermond - Für dich schlägt mein Herz
18:25:52 WiFI_info: RSSI is -44 dB
18:25:52 Audiocodec: MP3
18:25:52 ftpServer: Ftp server waiting for connection on port 21
18:25:53 BT-Emitter: KCX_BT_Emitter not found
18:25:58 DLNA_server: 0 media server found
18:26:30 WiFI_info: RSSI is -52 dB
18:26:31 WiFI_info: RSSI is -46 dB
18:26:41 WiFI_info: RSSI is -51 dB

Now I do the Backup and use an clean copy of the SourceFiles: in work......

I flashed the actual code without to setup the display. I only setup the SDcard speed to 20Mhz, it is not able to work at higher speed! (May has to do with the wild wiring)

I restart connect the AP and choose the SSID and put in my password to the radios website.
Ok, it looks like that the Radio has an problem with my SSID.

00:01:37 setup: .... 2 WiFi networks found
00:01:37 setup: .... AndBwerC123 (-53) I changed the Name but it has the same structure
00:01:37 setup: .... A1-4a9861 (-72)
[ 8801][I][WiFiMulti.cpp:114] run(): [WIFI] scan done
[ 8801][I][WiFiMulti.cpp:119] run(): [WIFI] 1 networks found
[ 8802][E][WiFiMulti.cpp:191] run(): [WIFI] no matching wifi found!
00:01:38 WiFI_info: WiFi credentials are not correct
00:01:38 RECONNECTION try 1
[ 8820][I][WiFiMulti.cpp:84] addAP(): [WIFI][APlistAdd] add SSID: mySSID
[ 8829][I][WiFiMulti.cpp:84] addAP(): [WIFI][APlistAdd] add SSID: AndBwerC123 <<<-------------how can this be too long
[ 8840][E][WiFiMulti.cpp:55] addAP(): [WIFI][APlistAdd] no ssid or ssid too long <<<----?????
[ 8842][E][WiFiMulti.cpp:55] addAP(): [WIFI][APlistAdd] no ssid or ssid too long
[ 8854][E][WiFiMulti.cpp:55] addAP(): [WIFI][APlistAdd] no ssid or ssid too long

AndBwerC123 11 digits
ZTE BLADE V8 12 digits inclusive free spaces.

Strange:

I wait for the AP, connect to it enter my mobil phones Hotspot data and the webradio instantly connecting and playing music....
The W-lan Channel is "1" at my ASUS Router I tryed 12 and channel 13. Next I try channel 1, may be there is something wrong with the WIFI country version?!?! Or some Bug with the SSID...

I also can use the IP or minwebradio to connect from mobile Phone to the radio, I can change anything over the website.

8794][I][WiFiMulti.cpp:114] run(): [WIFI] scan done
[ 8794][I][WiFiMulti.cpp:119] run(): [WIFI] 2 networks found
[ 8795][I][WiFiMulti.cpp:160] run(): [WIFI] Connecting BSSID: B0:C1:9E:9E:8F:F0 SSID: ZTE BLADE V8 Channel: 1 (-44)
[ 9786][I][WiFiMulti.cpp:174] run(): [WIFI] Connecting done.
00:02:29 WiFI_info: Connecting WiFi...
00:02:29 WiFI_info: mDNS name: MiniWebRadio
00:02:29 setup: .... connected to ZTE BLADE V8, IP address is 192.168.43.206
[ 9820][I][ArduinoOTA.cpp:141] begin(): OTA server at: MiniWebRadio.local:3232
00:02:29 ftpServer: Buffers allocated: 4622 bytes
00:02:29 rtime_info: Initializing SNTP
01:02:29 rtime_info: Waiting for system time to be set... (1/10)
19:37:21 rtime_info: 19:37:21
19:37:21 audiotask: is pinned to core 0
19:37:21 audiotask: priority is 2
19:37:21 AUDIO_info: commFMT = Philips
19:37:21 setup: .... Number of saved stations: 14
19:37:21 setup: .... current station number: 1
19:37:21 setup: .... current volume: 21
19:37:21 setup: .... last connected host: http://0n-80s.radionetz.de:8000/0n-70s.mp3
19:37:21 setup: .... connection timeout: 1000 ms
19:37:21 setup: .... connection timeout SSL: 2500 ms
19:37:21 action: ... switch to station 1
19:37:21 AUDIO_info: Connect to new host: "http://0n-80s.radionetz.de:8000/0n-70s.mp3"
19:37:21 AUDIO_info: PSRAM found, inputBufferSize: 638965 bytes
19:37:21 AUDIO_info: buffers freed, free Heap: 149564 bytes
19:37:22 AUDIO_info: Connection has been established in 349 ms, free Heap: 148300 bytes
19:37:22 icy-logo: https://www.0nradio.com/logos/0n-70s_600x600.jpg
19:37:22 bitRate: 128Kbit/s
19:37:22 bitRate: 128Kbit/s
19:37:22 icy-descr: Von Disco über Reggae und Schlager bis hin zum Rock. Das sind die Hits der 70er.
19:37:22 StationName: - 0 N - 70s on Radio
19:37:22 icy-url: .. http://www.0nradio.com
19:37:22 AUDIO_info: MP3Decoder has been initialized, free Heap: 147348 bytes , free stack 5076 DWORDs
19:37:22 lastURL: .. http://0n-80s.radionetz.de:8000/0n-70s.mp3
19:37:22 WiFI_info: RSSI is -45 dB
19:37:23 Audiocodec: MP3
19:37:23 ftpServer: Ftp server waiting for connection on port 21
19:37:23 BT-Emitter: KCX_BT_Emitter not found
19:37:24 AUDIO_info: stream ready
19:37:24 AUDIO_info: syncword found at pos 0
19:37:24 AUDIO_info: Channels: 2
19:37:24 AUDIO_info: SampleRate: 44100
19:37:24 AUDIO_info: BitsPerSample: 16
19:37:24 AUDIO_info: BitRate: 128000
19:37:24 StreamTitle: Tina Charles - I Love To Love
19:37:29 DLNA_server: 0 media server found

Still the same....I opened an Guest Network at my ASU Router and sometimes randomly it will connect to it.
To the Main W-Lan It do not connect. There must be any timing problem or something else.

The compiling log was full of errors until I installed the Espressif-IDF manually.

I still get the error:

Warning! Arduino framework as an ESP-IDF component doesn't handle the variant field! The default esp32 variant will be used.
Reading CMake configuration...

And via serial Monitor I get:

[WIFI][APlistAdd] no ssid or ssid too long

I still get an instant connection to my Mobile Phone HotSpot! I will go back to an older vesion of this Radio if Available.

Solar320
Try changing the channel on your router. I also have an ASUS and had a similar problem. And with a TPlink router, for example, the radio connects the first time. You may also need to change the wifi tab settings for the ASUS
I think the miniveb radio is very demanding on signal strength and the router you use.

I had channel 13 and tried allready channel 12, without any change. I can try some other channels for testing ...
But I try the old radio ESP32-MiniWebRadio-V.2.15.0 and it is connecting.
Any other sketch which uses the same ESP32S3 chip and router is working without problems.

I have an Fusion V2 Board for the DTU on Battery, it has an ESP32N8R2. This one connects instantly.
I do not try to flash the new radio on the fusion board because I don't want to change anything.

Its extremly unlikely that the router is the problem when the same chip is working with any other Sketch. I think it has to do with changes into the sdkconfig.esp32s3. Unfortunately the old config do not compile with the new radio version.

I would use the old Radio version instead of the new one, but it has problems with the HTML interface and also with the Touchscreen. Inverting the touchscreen do not work on this version and I have an V and H inverted Touch screen.

Now I will try to use my old V2 version, if I can manage to get it working to compile. I will wait until the wifi problem is fixed.

Solar320
I agree with you, my V2 connects with no problems either. Try channel 2, the third version connects to the network almost immediately. But in general, the problem does exist and maybe Mr. Wohl will pay attention to it. But I think he has no way to test the radio performance with different routers, and we should help him with that.
I don't want to change my Asus AC66U for another one, it works fine with other internet radio projects.

I cannot reproduce the error. I have not changed anything in the WiFi area. But if older versions worked, you can try changing the Arduino version in platformpo.ini. Now 2.0.14 is set, you can go back to 2.0.8. The guest access of a router does not allow communication in the network, sets restrictions and only allows the connection to the Internet for certain ports.
Perhaps something can be changed on the router, WPA2, WPA2, with or without CCMP?
image

On my ASUS I can allow the communication to the normal w-lan.

I test my ESP with the ESPCAM WIFI Testprogram and it connect:

There must be some error in the libs. I was now able to compile the older V2 version of the radio and it also do not connect to the router, before it does.
So there must be some Update in the between that destroy this.
I now try the 2.0.8 framework, I know how to do so but I am not an pro in this area. I can only Try and error...

This ist the Output of the ESPCAM WIFI Testprogram

Project: Wi-Fi Signalstärke messen mit dem ESP32-CAM Modul
Author: Thomas Edlinger for www.edistechlab.com
Date: Created 10.12.2020
Version: V1.0
IDE: Arduino IDE 1.8.13

Required Board (Tools -> Board -> Boards Manager...)

  • Board: esp32 by Espressif Systems V1.0.4
    */

22:37:58.702 -> .
22:37:58.702 -> WiFi connected
22:37:58.702 -> IP address:
22:37:58.702 -> 192.168.50.109
22:37:58.702 ->
22:37:58.702 -> - Signal Level: -47
22:38:00.663 -> - Signal Level: -49
22:38:02.686 -> - Signal Level: -47
22:38:04.682 -> - Signal Level: -49
22:38:06.712 -> - Signal Level: -47
22:38:08.702 -> - Signal Level: -49
22:38:10.685 -> - Signal Level: -48
22:38:12.668 -> - Signal Level: -50
22:38:14.669 -> - Signal Level: -47
22:38:16.670 -> - Signal Level: -47
22:38:18.671 -> - Signal Level: -48
22:38:20.692 -> - Signal Level: -47
22:38:22.704 -> - Signal Level: -46
22:38:24.718 -> - Signal Level: -49
22:38:26.701 -> - Signal Level: -48
22:38:28.706 -> - Signal Level: -49

I go back to 2.0.8. I reset 3 times and every time it connect to the guest network.
I now test, if the radio also will connect to the normal W-lan.
Note that there still many "no ssid or too long " errors are!

ESP32 Chip: ESP32-S3
Arduino Version: 2.0.8
ESP-IDF Version: 4.4.7
MiniWebRadio Version 3.2 Jun 13/2024
ARDUINO_LOOP_STACK_SIZE 8192 words (32 bit)
FLASH size 16777216 bytes, speed 80 MHz
CPU speed 240 MHz
SDMMC speed 16 MHz
TFT speed 40 MHz
PSRAM total size: 8381319 bytes
RESET_REASON: Software reset via esp_restart

00:02:06
00:02:06 ***************************
00:02:06 * MiniWebRadio V3 *
00:02:06 ***************************
00:02:06
00:02:06 setup: .... Arduino is pinned to core 1
00:02:06 tft_info: . init ILI9341
00:02:07 setup: .... Init SD card
00:02:07 setup: .... SD card found, 30410.3 MB by 30436.5 MB free
00:02:08 setup: .... seek for stations.csv
00:02:08 setup: .... stations.csv found
00:02:08 setup: .... seek for WiFi networks
[ 2743][I][WiFiMulti.cpp:84] addAP(): [WIFI][APlistAdd] add SSID: mySSID
[ 2749][I][WiFiMulti.cpp:84] addAP(): [WIFI][APlistAdd] add SSID: A290_Guest
[ 2784][E][WiFiMulti.cpp:55] addAP(): [WIFI][APlistAdd] no ssid or ssid too long
[ 2784][E][WiFiMulti.cpp:55] addAP(): [WIFI][APlistAdd] no ssid or ssid too long
[ 2793][E][WiFiMulti.cpp:55] addAP(): [WIFI][APlistAdd] no ssid or ssid too long
00:02:14 setup: .... 5 WiFi networks found
00:02:14 setup: .... A920 (-50) <<<<<<<<<<<<<<<<normal Network
00:02:14 setup: .... A290_Guest (-52) <<<<<<<<<<<<<<<GUEST Network
00:02:14 setup: .... A1-4a9861 (-85)
00:02:14 setup: .... DreiNeo_2.4Ghz_2464 (-90)
00:02:14 setup: .... A1-e9de19 (-93)
[ 14877][I][WiFiMulti.cpp:114] run(): [WIFI] scan done
[ 14877][I][WiFiMulti.cpp:119] run(): [WIFI] 6 networks found
[ 14878][I][WiFiMulti.cpp:160] run(): [WIFI] Connecting BSSID: 08:BF:B8:64:BD:19 SSID: A290_Guest Channel: 13 (-51)
[ 16398][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 2 - AUTH_EXPIRE <<<<<<NOTE THIS!!!!!!
[ 16658][I][WiFiMulti.cpp:174] run(): [WIFI] Connecting done.
00:02:22 WiFI_info: Connecting WiFi...
00:02:22 WiFI_info: mDNS name: MiniWebRadio
00:02:22 setup: .... connected to A290_Guest, IP address is 192.168.50.109
00:02:22 ftpServer: Buffers allocated: 4622 bytes
00:02:22 rtime_info: Initializing SNTP
01:02:22 rtime_info: Waiting for system time to be set... (1/10)
01:02:24 rtime_info: Waiting for system time to be set... (2/10)
22:58:20 rtime_info: 22:58:20

OK: As I removed the guest network it now connect again to my normal network.

Normal the radio should look at the network entry first, which was into the common.h (my normal network)
But It has choosen to connect everytime to my guest network. So i had to disable the guestnetwork first, then it connect to the
normal network again. (which is into the networks.csv)

EDIT: NÖÖÖÖÖ (The 2.0.14 framework may seems to be the problem. ) This was not the problem.

I will now restart many times to test it again and then I will test the new framework 2.0.14 again...

It now work also with the new framework, I can't explain it. May be the password or SSID was wrong. But it do not explain why
it sometimes connect to the guest network and sometimes not. (3m distance to the router)

This time I erased all the Flashmemory "everytime" before flashing an new Firmware and press the clean button in plattformIO. May be there were some leftovers that cause the problems..

Solar320 I agree with you, my V2 connects with no problems either. Try channel 2, the third version connects to the network almost immediately. But in general, the problem does exist and maybe Mr. Wohl will pay attention to it. But I think he has no way to test the radio performance with different routers, and we should help him with that. I don't want to change my Asus AC66U for another one, it works fine with other internet radio projects.

At the moment I can't explain but now it works. I will now flash the second ESP32S3 to test it also.
EDIT: Now it also work. So in the future, I have to clean the flash every time to be sure there are no leftovers..

1.The last Update removed the "SSID too long Message" The connection process is now very good.

2.In the past I have to set the SDCard speed to 20 or 16Mhz to get an connection. Now I tryed 40Mhz and even 80Mhz.
With 16 or 20Mhz I had problems with performance with Radio V3 and also many readerrors, for example it couldn't read the picture /png/Button_Test_Yellow.png if I press the "?" Button .
In the start phase there were no big problems but when the radio was playing it may take too long to get the pictures from the SD card and the error occurs. Now with 40 or 80Mhz this errors are gone.
Its an wonder that my 15cm long wires from the SD-Card to the ESP are working.

  1. At the moment I can only select 1-14 presets in my List, I have 25 in my list, when I select an title higher than 14 it will not play. (not an big Problem, I can hide some titels so the other ones may work then, not tested)
    It shows:
    [1793779][W][common.h:1159] GetImageSize(): file /logo/s/KISS FM.jpg not exists
    [1793802][W][common.h:1159] GetImageSize(): file /logo/s/KISS FM.jpg not exists
    19:47:28 Audiocodec: MP3
    [1835750][E][Preferences.cpp:483] getString(): nvs_get_str len fail: station_000 NOT_FOUND
    19:48:10 action: ... switch to station 0
    [1835813][W][common.h:1159] GetImageSize(): file /logo/s/KISS FM.jpg not exists
    [1835838][W][common.h:1159] GetImageSize(): file /logo/s/KISS FM.jpg not exists
    19:48:10 webSrv: ... File not found "/logo/KISS FM.jpg"

If I copy and past the link http://149.56.185.82:8131 in and start it manually it works.
In the old Radio V2 it was impossible to play this Kiss FM Stream. But also in V3 it is not stable enough but usable.

  1. I found an 500-1000Kbit FLAC stream for testing the radio, it works better than the KISS FM stream.
    https://stream10.xdevel.com/audio17s976748-2218/stream/icecast.audio