Latest Blog Post

Flash your ESP32 based Player with the latest firmware via web browser!

  sle118 , one of the main developers of SqueezeESP32 (aka Squezzelite-ESP32) has concentrated over the past of weeks on reworking the build system, paving the way to a full integration with the esp-web-tools. Which allows flashing a complete set of binaires from the web browser. The current state of the web browser based firmware installer is just from the look and feel still very simplified, but it's up to date with the latest firmware builds and easy to use. This is another important step to make ESP32 WROVER based music players even more accessible to the general public. Minimum requirements: Web Browser: Chromium based like Google Chrome or Microsoft Edge OS: Windows, macOS, ... Driver: Make sure you have the right USB/Serial drivers installed like: CP2102 CH341 Web firmware installer: https://sle118.github.io/squeezelite-esp32-installer/          

BEGINNERS GUIDE




0.0 What is needed?

  •     One of the players, developer boards/kits mentioned mentioned here
  •     LMS (Logitech Media Server)
  •     A computer to install LMS (Windows, macOS, Linux or a Raspberry Pi)
  •     The SqueezeESP32 all in 1 recovery kit (download here)
  •     Tabby - A terminal for the modern age to see the logs (trouble shooting)
  •     A USB data cable to flash the recovery firmware
  •     An WiFI internet router or similar



1.0 Install LMS (Logitech Media Server)

LMS is not only a media server, but with the help of the 3rd party plugin SqueezeESP32, which acts as a companion app, it is also the hub for the Over the Air Update (OTA) and also provides a 10 Band Equailizer (16 bit firmware only) for your SqueezeESP32 players.

Download LMS 8.3 (Windows, macOS, Linux, ARM, etc.)

If you prefer to use a Rasberry Pi (version 2 or higher), which is much more power efficient than a full computer, I recommend the complete pCP (piCorePlayer) image which includes also LMS.

If you, like me, already have a Raspberry Pi as a Smarthome control center in use, you can also install LMS on this additionally. But it should have enough hardware power to run multiple server services at the same time. I use a Raspberry Pi4 with 4GB RAM and a 256 GB SSD. On this ioBroker runs together with LMS without any problems. A 3b or 3b+ with a normal micoSD will certainly work as well. Of course, it all depends on what else you have running on your Pi. But most of those who already have something like this in use already know what they are doing and what I mean.

LMS @ Raspberry Pi OS

To install, first update everything:
sudo apt-get update && sudo apt-get dist-upgrade

Install audio codes:
sudo apt-get install libsox-fmt-all libflac-dev libfaad2 libmad0

Download & install LMS
wget must already be installed on the Rasberry Pi, if not: sudo apt-get install wget

wget http://downloads.slimdevices.com/nightly/8.3/lms/a4af2fa404492ab4a013b795c6ecb8b1b03ff990/logitechmediaserver_8.3.0~1664261103_arm.deb

sudo apt install ./logitechmediaserver_8.3.0~1664261103_arm.deb

___________

Now that you have installed LMS, you can find LMS always at the following address (Windows, macOS, Linux): http://localhost:9000

If you have installed LMS on an additinal computer or a Pi, under the device IP address and the standard port 9000, e.g. http://192.168.x.x:9000. If you have changed the standard port please use that one.



1.1 LMS Basic Setup for SqueezeESP32


Now that you have installed LMS, let's move on to the basic configuration so that we can easily perform over the air (OTA) firmware updates later.

Since LMS is free open source software from Logitech, Logitech would like you to create a Squeezbox account with them as well. This is not required to use LMS, so it is only optional. I do not have one and do not need one. So everyone can do that as he wants.


If you are now like when I installed LMS for the first time, deterred by the super ugly medieval user interface (skin). Don't panic, we will change that now together with the installation of the SzeezeESP32 plugin. So that LMS can shine in a modern guise, which can also be operated perfectly from a mobile device or tablet/ipad.


Now open: Settings > Plugins > 3rd Party Plugins > [x] Material Skin & [x] SqueezeESP32 > Apply



Then click on > [ Restart Now ]



Wait 1 minute, then click on > [ OK ]

Then click on > Interface > Web Interface: Material Skin > Apply



Now you just have to reload the website so that LMS comes along in a much more modern look & feel.



The medieval skin is now a thing of the past and that's where it should stay. BTW I honestly do not understand at all why "Material Skin" is not the default skin. But that's probably because of the eternally yesterday developers (LMS), who are of the view that everything was better in the past!? I will never understand you guys! Anyhow!



2.0 Preparation for flashing the firmware

Now it's time to flash your EPS32 WVROVER player with the SqueezeESP32 firmware for the first time. But for this some preparations are necessary. You can already connect the player with the USB data cable to your computer.

Check the following news about the new web browser based firmware installer.

To make the whole thing less complicated, I have put together a so-called SqueezeESP32 all in 1 recovery kit. The zip file already contains all the necessary files. This includes the necessary USB>Serial drivers for Windows & macOS, the flashing tool and the recovery firmware files. For Windows users it will be the easiest, because I already set everything that needs to be set, so you only have to press buttons. The macOS and Linux users have to do a bit more to reach the goal. But I will explain all the necessary steps, or refer to other already existing documentation.

Important:
Safety always comes first. Therefore, please fasten your seat belts.
If you feel uncomfortable downloading a zip file from an unknown person, which I understand very well. I recommend you to scan the zip file for malware using the website www.virustotal.com before unzipping it. The service is free and is a collaboration of all kind of major security/antivirus companies.


The folders in the zip file are structured as follows:
  • firmware
  • linux
  • windows > driver | flashtool
  • macOS > driver | flashtool

[ HINT ]
If you already have a SqueezeESP32 (aka SqueezeliteESP32) firmware installed on your ESP32 WROVER player/board and only want to update your Receovery firmware to the latest version. All your hardware settings will be lost! BTW your hardware and recovery firmware settings will never be updated or overwritten during OTA updates. As they are your rescue parachute. This also means, no matter how broken your main firmware is, you can always use the recovery firmware to install a new main firmware for the actual operation via OTA. But it is important that your recovery firmware is not too old. Because that can also cause problems. In my recovery kit, by the way, a 2.x (current latest) recovery firmware is used. And when you flash my recovery Kit as described below, all data from the flash storage of your Player/Board will be lost. So if you already have a firmware on your already working ESP32 based player and want to update it with my recovery kit.
You should 1st backup the working NVS settings of your hardware configuration. To do so, just activate "[x] Show NVS Editor" under "Credits". Then download your backup under the new shown tab "NVS Editor" (at the bottom) via [ Download config ]. To restore your saved NVS configuration, you can use the "NVS Editor" again. "NVS Editor": First upload your backup via [ Load file ]. Then set with [ Commit ] and then really activate the saved and set NVS configuration by [ Reboot ].


2.1 Flashing the recovery firmware

Flashing the firmware on Windows is very similar to macOS (driver + app). When using Lunux it is a little different, everything goes only via the command line, but for this a read me file is included in the Zip file. Or just ask our friend google. But we Lunix users don't know it differently. 😉

[ Example Windows ]

In this example I assume that you do everything from a single computer. But you can also use two computers, or an additinal mobile device or tablet, to connect to the SqueezeESP32 device own WiFi access point. Then the whole thing is very similar, but not exactly the same. But I won't go into that now, because the differences are self-explanatory with normal common sense.



2.1.0 Install the driver

Open "Device Manager" (Windows logo key + X)
Double click > CP2104 USB to UART Bridge Controler





Click > Driver > Update Driver




Click > Browse my computer for drivers



Select > driver sub folder of windows from the ZIP file.
Click > [ OK ]



Drivers are now sucessfully installed


 
 
2.1.1 Open the flashtool

Set > Chip Type: ESP32 | WorkMode: Develop






2.1.2 Flash recovery firmware (Windows only: files and setting is already set)
  1. Set > COM: (port)



    • ota_data_initial.bin @ 0xd000
    • bootloader.bin @ 0x1000
    • partition-table.bin @ 0x8000
    • recovery.bin @ 0x10000



  2. Click > ERASE (wait until FINISH)




  3. Click > START (whait untile FINISH)



  4. Close flashtool
All done!

Restart the ESP32 Player/Board (e.g. disconnect from the USB cable and connect again).



3.0 Connect ESP32 Player to your WiFi

Connect to a new WiFi access point: squeezelite-12abc


Defauld password: squeezelite
(some older androidaudio muse firmwares: musemuse)


 

Now a browser window should open automatically. This is the web interface of SqueezeESP32. If the window does not open automatically, you either have a rather old operating system, or it is simply screwed up. In that case you have to open the following URL manually: http://192.168.4.1

Now we need to connect the SqueezeESP32 player to your local WiFi network.

WiFi > (click on the name of your WiFi)
Enter > Password of your WiFi


 
Wait 30sec
 


When everything has worked, you will see a status window below, with all the data of the new WiFi connection of your SqueezeESP32 device. From now on you can access the web interface of your SqueezeESP32 device via the device IP address displayed there (example: 192.168.178.167). Therefore remember/write down this address.

If all this did not work, you simply entered the wrong pawword for your WiFi or had a typo. In this case repeat the whole process until it works.
 

 
Now it's time to reconnect your computer also to your WiFi, again. Becasue for now, we are still connected to the access point of the SqueezeESP32 device, which means we don't have internet. But we need it now, to perform the necessary Over the Air (OTA) update.






3.1 OTA Update

Now enter the device IP address that you noted or wrote down above.
(Example: 192.168.178.167) To access the web interface of your SqueezeESP32 deivce. 

Click > Updates > Check for updates

 
 
You will now see a large list of different firmware versions. Here is detailed explanation how to find the right firmware for your SqueezeESP32 device.

Currently there are two main versions (branches) of the firmware. The other features/differences exist in both branches.

Branch:
  • master-cmake = 1.x Firmware
    Most stable version branch which does not get feature updates anymore.

  • master-v4.3 = 2.x Firmware
    Newest version branch where all new features come in. Therefore, sometimes not so stable.

Platform:
  • SqueezeAmp = Firmware for the SqueezeAmp device with which everything started.

  • Muse = Firmware for the ESPMUSE Luxe Speaker (not for other MUSE devices)

  • I2S-4MFlash = Standard firmware for all other devices

Bit Depth:
  • 16 = 16 bit Firmware:
    max sampling rate 192k | max bit depth 16 | SPDIF 16 bits | 10 Band Equalizer | resampling | cross-fade up to 10 sec
    Best for normal HiFi audio quality & amp speaker output

  • 32 = 32 Bit Firmware:
    max sampling rate 96k | max bit depth 24 (anlog) | SPDIF 20 bits | cross-fade <5 sec
    Best for HQ HiFi audio output (96K/24Bit only possible via analog output)
 
 
 
So if you have a standard device with analog output/amplifier for speakers, we need a I2S-4MFlash firmware with 16 bit. At the beginning you should use a firmware of the 1.x (master-cmake) branch, because they are currently the most stable. But you can always update to 32 bit and/or 2.x (master-v4.3) branch. Or you can switch back and forth between all possible firmware versions at any time. The hardware configuration of the device will always remain the same.

Ok let's now use the filters to quickly find the right firmware.

We want now the most stable firmware for a standard player with analog output or speaker on the integrated amplifier of the device.

Filters:
  • Platform = I2s
  • Branch = master-cmake
  • Bit Depth = 16
Now you just have to click on the latest version of the firmware you are looking for to select it. With another click on [ Flash Firmware ] we start the OTA update.




Important: To make the whole thing working, LMS must be started and the SqueezeESP32 plugin must be installed. That's why that was the first thing I explained to you here. Because the plugin serves as a local cache during the flashing process. So that you can use the OTA function without problems even with a slow, bad or unstable internet connection. The update starts only when all necessary files are cached @ LMS.

Now we only have to confirm with [ OK ] if the selected firmware should really be flashed. From the address you can see that the firmware does not come from the Internert but from the local LMS. The 192.168.178.200:9999 on the example image is my LMS server at home. In your case, then your server is displayed accordingly.

 
If you see this message, the update has worked perfectly. By the way, the device will automatically restart after the flash, to activate the new firmware.

 
 
 
 



3.2 Check your config

Now you have to configure the hardware of your device. The currently most common DACs, displays, etc. are already included as a simple click configuration in the latest 2.x firmware. But I already have devices that are not in there yet. But I will make them available to the devs via GitHub, so that they will be included in one of the next updates.

Her you can find some NVS backup files, for several Player/Boards which are currently not included to the firmware.

Via NVS Editor (to activate: Credits > [x] Show NVS Editor)

To load & activate the NV backup files:

  1. [ Load files ] (choose the right NVS jason file, which fits to your hardware)
  2. [ Commit ]
  3. [ Reboot ]

Below you will find more information in the following forum posts that should help you also, if you have problems. There you will also get support!



When all this is working, you can enjoy your favorite music with your device in the many countless ways that are possible with the SqueezeESP32 and LMS. And there are really a lot of them. In the example photo I use an ESP MUSE Mn Cast from raspiaudio to listen to a radio rock station from Australia.





4.0 Trouble Shooting (logs)

Getting logs for troubleshooting and reporting issues to the Devs @ GitHub.
In the two linked text passages above you will find all further information on the subject.

Direct link to Tabby (Terminal / Serial Logs): https://tabby.sh/









Comments