Geen omschrijving

Thomas Preece b1f234d460 Added in better build instructions. Added script for generating documentation and scripts to add to release zip. (#12) 5 jaren geleden
.settings 2944f51eec Improve status.json 5 jaren geleden
build-scripts 61f058de17 Fix the missing build script 5 jaren geleden
components 9e44a4f1a9 increase buffer 5 jaren geleden
idf-patch c44c31f6d4 i2s ... 5 jaren geleden
main d2f17f5b05 Update status.json message format: add severity 5 jaren geleden
server_certs 53369475dc More OTA work 5 jaren geleden
.cproject 2944f51eec Improve status.json 5 jaren geleden
.gitattributes a5b37a13c9 :confetti_ball: Added .gitattributes & .gitignore files 5 jaren geleden
.gitignore 6e7793a756 initial work on a wifi/http configuration module 5 jaren geleden
.gitmodules 6e7793a756 initial work on a wifi/http configuration module 5 jaren geleden
.project be714988f1 Merge pull request #6 from philippe44/pr/4 5 jaren geleden
CMakeLists.txt 07873a7710 Jenkins integration - Migrate to CMake 5 jaren geleden
Makefile 47d06a8dc2 Merge branch 'Over_The_Air_Update' of 5 jaren geleden
Makefile_std.mk 8aedca48a7 OTA Work in progress 5 jaren geleden
README.md b1f234d460 Added in better build instructions. Added script for generating documentation and scripts to add to release zip. (#12) 5 jaren geleden
alltags.txt c5fc6b8a81 nvs configuration fixes 5 jaren geleden
github.pem 53369475dc More OTA work 5 jaren geleden
makeBuildDocs.sh b1f234d460 Added in better build instructions. Added script for generating documentation and scripts to add to release zip. (#12) 5 jaren geleden
non-ota-partitions.csv 372dcb1640 align non-ota build 5 jaren geleden
partitions.csv b6f1ce9a7a NVS Refactor ** Factory+Squeezelite FLASH required for this branch! 5 jaren geleden
sdkconfig.defaults 53369475dc More OTA work 5 jaren geleden

README.md

Getting pre-compiled binaries

An automated build was configured to produce binaries on a regular basis, from common templates that are the most typical. They can be downloaded from :

https://github.com/sle118/squeezelite-esp32/releases

Configuration

1/ setup WiFi

  • Boot the esp, look for a new wifi access point showing up and connect to it. Default build ssid and passwords are "squeezelite"/"squeezelite".
  • Once connected, navigate to 192.168.4.1
  • Wait for the list of access points visible from the device to populate in the web page.
  • Choose an access point and enter any credential as needed
  • Once connection is established, note down the address the device received; this is the address you will use to configure it going forward

2/ setup squeezelite command line (optional)

At this point, the device should have disabled its built-in access point and should be connected to a known WiFi network.

  • navigate to the address that was noted in step #1
  • Using the list of predefined options, hoose the mode in which you want squeezelite to start
  • Generate the command
  • Add or change any additional command line option (for example player name, etc)
  • Activate squeezelite execution: this tells the device to automatiaclly run the command at start
  • Update the configuration
  • Reboot

3/ set bluetooth & airplaysink name (if you want something other than default)

this will eventually be moved to the web configuration

you need to be connected to the device using a usb to serial adapter, with a terminal program (for example putty) opened on that serial port.

  • To setup the bluetooth sink name, enter the following command

nvs_set bt_sink_name str -v "your_bt_name_here"

  • To setup the airplay sink name, enter the following command

nvs_set airplay_sink_name str -v "your_airplay_name_here"

Additional command line notes

The squeezelite options are very similar to the regular Linux ones. Differences are :

- the output is -o [\"BT -n <sinkname>\"] | [I2S]

- if you've compiled with RESAMPLE option, normal soxr options are available using -R [-u <options>]. Note that anything above LQ or MQ will overload the CPU

- if you've used RESAMPLE16, <options> are (b|l|m)[:i], with b = basic linear interpolation, l = 13 taps, m = 21 taps, i = interpolate filter coefficients

To add options that require quotes ("), escape them with \". For example, so use a BT speaker named MySpeaker and resample everything to 44100 (which is needed with Bluetooth) and use 16 bits resample with medium quality, the command line is:

nvs_set autoexec1 str -v "squeezelite -o \"BT -n 'MySpeaker'\" -b 500:2000 -R -u m -Z 192000 -r \"44100-44100\""

Building Squeezelite-esp32

MOST IMPORTANT: create the right default config file

make defconfig

Then adapt the config file to your wifi/BT/I2C device (can alos be done on the command line)

make menuconfig

Then you will need to build the recovery binary and squeezelite binary:

# Build recovery.bin, bootloader.bin, ota_data_initial.bin, partitions.bin  
PROJECT_NAME="recovery" make -j4 all EXTRA_CPPFLAGS='-DRECOVERY_APPLICATION=1'
# Now force a rebuild by touching all the files which may have a RECOVERY_APPLICATION specific source compile logic
find . \( -name "*.cpp" -o -name "*.c" -o -name "*.h" \) -type f -print0 | xargs -0 grep -l "RECOVERY_APPLICATION" | xargs touch
# Build squeezelite.bin
PROJECT_NAME="squeezelite" make -j4 app EXTRA_CPPFLAGS='-DRECOVERY_APPLICATION=0'

make flash monitor

Once the application is running, under monitor, you can monitor the system activity.

  • for all libraries, add -mlongcalls.
  • audio libraries are complicated to rebuild, open an issue if you really want to
  • libmad, libflac (no esp's version), libvorbis (tremor - not esp's version), alac work
  • libfaad does not really support real time, but if you want to try
    • -O3 -DFIXED_POINT -DSMALL_STACK
    • change ac_link in configure and case ac_files, remove ''
    • compiler but in cfft.c and cffti1, must disable optimization using #pragma GCC push_options #pragma GCC optimize ("O0") #pragma GCC pop_options
  • opus & opusfile
    • for opus, the ESP-provided library seems to work, but opusfile is still needed
    • per mad & few others, edit configure and change $ac_link to add -c (faking link)
    • change ac_files to remove ''
    • add DEPS_CFLAGS and DEPS_LIBS to avoid pkg-config to be required
  • better use helixaac
  • set IDF_PATH=/home/esp-idf
  • set ESPPORT=COM9
  • update flash partition size
  • other compiler #define
    • use no resampling or set RESAMPLE (soxr) or set RESAMPLE16 for fast fixed 16 bits resampling
    • use LOOPBACK (mandatory)
    • use BYTES_PER_FRAME=4 (8 is not fully functionnal)
    • LINKALL (mandatory)
    • NO_FAAD unless you want to us faad, which currently overloads the CPU
    • TREMOR_ONLY (mandatory)