MTE Mode - Jamal-Ra-Davis/Daftpunk_Speaker_IDF GitHub Wiki
The system can be flashed with a special MTE image that allows for connecting to the device over WiFi and running commands for testing and provisioning it via a python based command shell.
Note: The EPS32 does not have enough code storage space to included both the Bluetooth Audio and WiFi libraries, as such the MTE functionality was split out into a separate build
MTE mode can be enabled via menuconfig with the following sequence:
- Open menuconfig:
idf.py menuconfig - Navigate to
MTE Config->Operation Mode->Include WIFI in build
- Make sure
Include WIFI in buildis selected and pressSto save and then exit
- Open menuconfig:
idf.py menuconfig - Navigate to
WiFi SSIDand replacemyssidwith your networks SSID info
- Navigate to
WiFi Passwordand replacemypasswordwith your networks SSID info
- Press
Sto save and then exit
While the system is flashed with the MTE image, the system can be connected to via WiFi and execute test/provisioning commands it receives. The command shell can be used as an interface to send these commands. Note: The IP address of the unit will be displayed on the display as it boots.
- Navigate to
Scriptsdirectory insideDaftpunk_Speaker_IDF - Run
cmd_test.py --ip <IP address of unit>to open command shell - Run the
helpcommand to see what commands are available. Note: Commands are documented below
- Description: Sends string to device and echoes the response back
- Command Format: echo <echo_string>
-
Arguments:
- echo_string: String to be echoed back
- Usage:

- Description: Calculates CRC-16 for a given input buffer
- Command Format: crc
-
Arguments:
- input: Input string to be converted to bytearray and used to perform CRC
- Usage:

- Description: Writes specified file into fixed NVM location on device
- Command Format: nvm_write <file_path>
-
Arguments:
- file_path: Path of file to be written to NVM
- Usage:

- Description: Writes specified audio file to NVM on device.
Note: Audio file must be in raw format (Signed 16-bit PCM, Little Endian, Stereo, 44.1KHz Sample Rate). See below for instructions on converting files with Audacity
- Command Format: write_audio_asset <Audio ID (0 - 7)> <file_path> <filename_dev>
-
Arguments:
- Audio ID: Audio reference ID for the audio file.
- File Path: Path of the audio file to be written to NVM
- File Name Device: Name of the file saved into NVM's filesystem
- Usage:

- Description: Prints audio metadata for each audio slot
- Command Format: get_audio_metadata
- Arguments: None
- Usage:

- Description: Plays specificed audio file based on Audio ID
- Command Format: play_audio_asset <Audio ID (0 - 7)>
-
Arguments:
- Audio ID: Audio reference ID for the audio file
- Usage:

- Description: Formats flash storage and erases all NVM data
- Command Format: nvm_erase_chip
- Arguments: None
- Usage:

-
Open audio file with Audacity
-
In lower-left corner, set
Project Rate (Hz)to 44100
-
Navigate to
File->Export->Export Audio- In the
Save as type:dropdown, selectOther uncompressed files - In the
Header:dropdown, selectRAW (header-less) - In the
Encoding:dropdown, selectSigned 16-bit PCM - Give the file a name and save

- In the