# Tonex Controller: An open-source controller and display interface for the IK Multimedia Tonex One and Tonex pedal This project uses a low-cost embedded controller (Espressif ESP32-S3) to form a bridge to the IK Multimedia Tonex One guitar pedal (which does not have native Midi capability) and also the Tonex Pedal. # Development Info The code is written in C, for the Espressif ESP-IDF development environment version 5.4.1, and using the FreeRTOS operating system. The LVGL library is used as the graphics engine. ## Task overview: - Control task is the co-ordinator for all other tasks - Display task handles the LCD display and touch screen - Midi Control task handles Bleutooth link to Midi pedals - USB comms task handles the USB host - USB Tonex One handles the comms to the Tonex One pedal ## Building Custom sources Building the application requires some skill and patience. - Follow the instructions at https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-4.3B#ESP-IDF to install VS Code and ESP-IDF V5.02 - Open the project Source folder using VS Code - Follow the instructions at https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-4.3B#Modify_COM_Port to select the correct comm port for your Waveshare board, and compile the app ## Menu Config options Use the Menu Config system to select which components of the Controller you wish to enable. ![image](https://github.com/user-attachments/assets/593d48fb-aeea-4b20-87c7-dc9212952213) ### Partition Table - All platforms: "partitions.csv" ### SPI RAM config Mode of SPI RAM chip in use: - "Octal Mode PSRAM" - "Quad Mode PSRAM" ### Serial Flasher Config Flash Spi Mode: - "QIO" (Quad mode) - "DIO" (Dual mode) ### Flash Size: - "8MB" - "4MB" # Wireshark USB Capture - Download and install the latest version of the free app "Wireshark" from https://www.wireshark.org/ - Install it, ensuring the option for USB Pcap is enabled - Start the Wireshark app - Connect Tonex pedal to the same PC - In the Wireshark app, select the Capture interface to USBPcap
image

- Press the blue Sharkfin button to begin capturing all USB packets

image

- Start the Tonex Editor software, and let it complete its sync process
- Press the red square button to stop capturing

image

- Use File -> Save As to save the captured data to disk # Debug Logs Extensive debug logging is used, in the form of serial printing from the main ESP32-S3 "UART" transmitter pin. To view these logs: - Obtain a USB serial adaptor, compatible with 3.3 volt TTL signals (low-cost example shown below)
image
- Connect the ground pin on the adaptor to a ground pin of the ESP32-S3 - Connect the "RX" pin of the adaptor to TX pin of the ESP32-S3 board (pin locations shown for some platforms below.) image
image
image
image
- Download and install the latest version of the free app "Tera Term" from https://github.com/TeraTermProject/teraterm/releases (or use any other serial terminal program) - Connect the USB serial adaptor to your computer, and let it load any drivers it needs - Run Tera Term, and select the option for "Serial" and select the comm port corresponding to the USB serial adaptor image
- Select "Setup" -> "Serial Port", and change the baud rate to 115200
image
- Power on the Controller board. Logging should appear on the Tera Term screen - To log the data to disk, select File -> Log