Closed phesterman closed 2 months ago
The speaker keeping blooping means it must be resetting itself often. Can you connect to the serial terminal and show us the output ? alles.sync()
not working is a bug on our end, we can fix it!
Thanks for your quick reply!
I'm afraid I don't really know what I'm doing with the ESP-32 serial terminal. It's generating way more output than I can manage. Is there a way to redirect the output to a text file (I'm using Terminal in macOS)? Otherwise, I've managed to take a few screenshots, if that would be of any help.
Screenshots are fine! Or if you can copy all the text and paste it in here that’s fine too.
OK, I hope you can make sense of these....there's some overlap. Screenshots.pdf
That helps a lot! Are you pushing the PWR button a lot? Your logs show something is rebooting the Alles many times by the PWR button being toggled. On the Alles boards you can buy that's a GPIO - 34 -- that sets that. If you don't have that pin wired up maybe something else is constantly toggling that pin? You may want to comment out all the button handling code if your Alles doesn't have those. That would mean commenting out lines 34 through 64 in buttons.c
.
I didn't have a power button, so I commented out the lines in buttons.c and re-flashed. Now, there's no blooping, but it still doesn't work. I looked at the output from the serial monitor again, and there's no longer any indication of the power cycling, but the alles keeps rebooting. I've attached another set of screenshots.
I see the reboots but unfortunately there's not a clear indication of why it's not working for you. I'll take a look asap on my esp32 dev board to ensure it still works there. Can you let me know which dev board you are using ?
I'm using the one you linked to in the instructions.
https://www.amazon.com/dp/B07Q576VWZ?ref=ppx_yo2ov_dt_b_fed_asin_title&th=1
I also followed the instructions you gave because it's a 4mB rather than an 8mB version of the ESP32 dev board.
I also wanted to ask you about one of the I2S connections. In the written instructions I2S gain is connected to ESP32 VIN (this is how I currently have it wired), but I noticed in one of your close-up photos, I2S gain was connected to GND instead. I looked at another ESP32->I2S project I did in the past, and it was also gain->GND. So, I thought I should double-check that.
If you're using the recommended MAX98357A board, the GAIN pin can be connected to either VIN or GND, it's an overall volume control. It'll be up to you what sounds better for you and your speaker. It may sound distorted for higher volumes. See more here: https://learn.adafruit.com/adafruit-max98357-i2s-class-d-mono-amp/pinouts#gain-2693327
I found my old MELIFE esp32 board (the one we recommend) and wired it up to the I2S adapter like we describe, and did the idf.py menuconfig
to set the firmware size to 4MB and copied over the alles_4mb_partitions.csv
and did idf.py flash
from the latest main
branch here, and everything works great for me. No reboots.
I think there's either an issue with your dev board, or the wiring you have to your i2s board. Please double check that, maybe with a multimeter, and maybe try another dev board? I've heard stories of these cheaper devboards not being soldered properly and this may be causing your issue.
For reference, here is the boot log from my MELIFE board and current main
alles code:
(base) bwhitman@curious alles % idf.py monitor
Executing action: monitor
Serial port /dev/cu.usbserial-0001
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Running idf_monitor in directory /Users/bwhitman/outside/alles
Executing "/Users/bwhitman/.espressif/python_env/idf5.2_py3.11_env/bin/python /Users/bwhitman/esp/esp-idf-v5.2/tools/idf_monitor.py -p /dev/cu.usbserial-0001 -b 115200 --toolchain-prefix xtensa-esp32-elf- --target esp32 --revision 0 /Users/bwhitman/outside/alles/build/alles.elf -m '/Users/bwhitman/.espressif/python_env/idf5.2_py3.11_env/bin/python' '/Users/bwhitman/esp/esp-idf-v5.2/tools/idf.py'"...
--- esp-idf-monitor 1.4.0 on /dev/cu.usbserial-0001 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:3
load:0x3fff0030,len:7172
load:0x40078000,len:15532
load:0x40080400,len:4
0x40080400: _init at ??:?
load:0x40080404,len:3904
entry 0x40080640
I (29) boot: ESP-IDF v5.2 2nd stage bootloader
I (29) boot: compile time Aug 19 2024 13:00:52
I (29) boot: Multicore bootloader
I (33) boot: chip revision: v1.0
I (37) boot.esp32: SPI Speed : 26.7MHz
I (42) boot.esp32: SPI Mode : DIO
I (46) boot.esp32: SPI Flash Size : 4MB
I (51) boot: Enabling RNG early entropy source...
I (56) boot: Partition Table:
I (60) boot: ## Label Usage Type ST Offset Length
I (67) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (75) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (82) boot: 2 factory factory app 00 00 00010000 003ee000
I (90) boot: End of partition table
I (94) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=2cfbc0h (2948032) map
I (1286) esp_image: segment 1: paddr=002dfbe8 vaddr=3ff80063 size=00008h ( 8) load
I (1286) esp_image: segment 2: paddr=002dfbf8 vaddr=3ffb0000 size=00420h ( 1056) load
I (1293) esp_image: segment 3: paddr=002e0020 vaddr=400d0020 size=ad92ch (710956) map
I (1586) esp_image: segment 4: paddr=0038d954 vaddr=3ffb0420 size=03e68h ( 15976) load
I (1593) esp_image: segment 5: paddr=003917c4 vaddr=40080000 size=18888h (100488) load
I (1639) esp_image: segment 6: paddr=003aa054 vaddr=400c0000 size=00064h ( 100) load
I (1651) boot: Loaded app from partition at offset 0x10000
I (1652) boot: Disabling RNG early entropy source...
I (1663) cpu_start: Multicore app
I (1672) cpu_start: Pro cpu start user code
I (1672) cpu_start: cpu freq: 240000000 Hz
I (1672) cpu_start: Application information:
I (1676) cpu_start: Project name: alles
I (1681) cpu_start: App version: v0.3-6-g3cdc7a0-dirty
I (1687) cpu_start: Compile time: Aug 19 2024 13:00:47
I (1693) cpu_start: ELF file SHA256: 19c5150ca7ebb259...
I (1699) cpu_start: ESP-IDF: v5.2
I (1704) cpu_start: Min chip rev: v0.0
I (1709) cpu_start: Max chip rev: v3.99
I (1714) cpu_start: Chip rev: v1.0
I (1719) heap_init: Initializing. RAM available for dynamic allocation:
I (1726) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1732) heap_init: At 3FFBAE20 len 000251E0 (148 KiB): DRAM
I (1738) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1745) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1751) heap_init: At 40098888 len 00007778 (29 KiB): IRAM
I (1759) spi_flash: detected chip: generic
I (1762) spi_flash: flash io: dio
W (1767) ADC: legacy driver is deprecated, please migrate to `esp_adc/adc_oneshot.h`
I (1775) main_task: Started on CPU0
I (1785) main_task: Calling app_main()
Welcome to alles -- date Aug 19 2024 time 13:00:47 version v0.3-6-g3cdc7a0-dirty [3cdc7a0]
I (1785) gpio: GPIO[21]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1795) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1805) gpio: GPIO[33]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1815) gpio: GPIO[12]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
Detected revB+ Alles
I (1925) gpio: GPIO[0]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:1
I (1925) gpio: GPIO[16]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:1
I (1925) gpio: GPIO[17]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:1
I (1935) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:1
I (1965) wifi_manager: Set STA IP String to: 0.0.0.0
I (1985) wifi_init: rx ba win: 6
I (1985) wifi_init: tcpip mbox: 32
I (1985) wifi_init: udp mbox: 6
I (1985) wifi_init: tcp mbox: 6
I (1995) wifi_init: tcp tx win: 5744
I (1995) wifi_init: tcp rx win: 5744
I (2005) wifi_init: tcp mss: 1440
I (2005) wifi_init: WiFi IRAM OP enabled
I (2015) wifi_init: WiFi RX IRAM OP enabled
I (2015) phy_init: phy_version 4791,2c4672b,Dec 20 2023,16:06:06
I (2105) wifi_manager:
I (2105) http_server: Registering URI handlers
I (2105) wifi_manager: MESSAGE: ORDER_LOAD_AND_RESTORE_STA
I (2115) wifi_manager: No saved wifi found on startup. Starting access point.
I (2115) wifi_manager: MESSAGE: ORDER_START_AP
I (2135) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 10.10.0.1
I (2135) wifi_manager: WIFI_EVENT_AP_START
I (2225) http_server: Registering URI handlers
I (2225) dns_server: DNS Server listening on 53/udp
I (11945) wifi_manager: WIFI_EVENT_AP_STACONNECTED
I (13305) esp_netif_lwip: DHCP server assigned IP to a client, IP is: 10.10.0.2
I (15275) dns_server: Replying to DNS request for captive.apple.com from 10.10.0.2
I (15275) dns_server: Replying to DNS request for captive.apple.com from 10.10.0.2
I (15275) dns_server: Replying to DNS request for _dns.resolver.arpa from 10.10.0.2
I (17405) dns_server: Replying to DNS request for 20-courier.push.apple.com from 10.10.0.2
I (17405) dns_server: Replying to DNS request for 20-courier.push.apple.com from 10.10.0.2
I (17555) dns_server: Replying to DNS request for wps.apple.com from 10.10.0.2
I (20605) dns_server: Replying to DNS request for wps.apple.com from 10.10.0.2
I (27355) http_server: POST /connect.json
I (27355) http_server: ssid: alles, password: sellasella
I (27355) wifi_manager: MESSAGE: ORDER_CONNECT_STA
I (29995) wifi_manager: WIFI_EVENT_STA_CONNECTED
I (32995) esp_netif_handlers: sta ip: 192.168.1.3, mask: 255.255.255.0, gw: 192.168.1.1
I (32995) wifi_manager: IP_EVENT_STA_GOT_IP
I (32995) wifi_manager: WM_EVENT_STA_GOT_IP
I (32995) wifi_manager: Set STA IP String to: 192.168.1.3
I (33005) wifi_manager: About to save config to flash!!
I (33015) wifi_manager: wifi_manager_wrote wifi_sta_config: ssid:alles
I (33015) wifi_manager: wifi_manager_wrote wifi_sta_config: password:sellasella
I (33025) main: I have a connection and my IP is 192.168.1.3!
I (35395) multicast: Configured IPV4 Multicast address 232.10.11.12
Network listening running on core 1
[3] my client_id is now 0. 1 alive
I (45975) wifi_manager: WIFI_EVENT_AP_STADISCONNECTED
I (93025) wifi_manager: MESSAGE: ORDER_STOP_AP
I (93025) wifi_manager: WIFI_EVENT_AP_STOP
I (93125) http_server: Registering URI handlers
It looks like your board is rebooting right before the WifiManager
is starting. A thing to try is to remove the bits from the flash memory that WifiManager
creates (the stored SSID/password.) Try this
idf.py erase_flash
idf.py flash
you'll have to set up your wifi again, but maybe it'll not crash when it does? Unclear.
Thanks. I'd been wondering how to do that. I'll be trying out both of your suggestions (I have 2 other Melife boards to try) and will report back (with good news, I hope).
Erasing flash and reflashing didn't work...it didn't even create the captive wifi network. Then, it started rebooting again. I started over with a brand new Melife and the same thing happened. I tried using idf.py monitor, because I saw that's what you did, and things started out promisingly enough, but look at this screenshot to see what happened next:
I think I just need to start over completely. This is happening with three different ESP32 boards now:
peterhesterman@PetersMacStudio alles % idf.py monitor Executing action: monitor Serial port /dev/cu.usbserial-0001 Connecting.... Detecting chip type... Unsupported detection protocol, switching and trying again... Connecting...... Detecting chip type... ESP32 Running idf_monitor in directory /Users/peterhesterman/alles Executing "/Users/peterhesterman/.espressif/python_env/idf5.2_py3.12_env/bin/python /Users/peterhesterman/esp/esp-idf-v5.2/tools/idf_monitor.py -p /dev/cu.usbserial-0001 -b 115200 --toolchain-prefix xtensa-esp32-elf- --target esp32 --revision 0 /Users/peterhesterman/alles/build/alles.elf -m '/Users/peterhesterman/.espressif/python_env/idf5.2_py3.12_env/bin/python' '/Users/peterhesterman/esp/esp-idf-v5.2/tools/idf.py'"... --- esp-idf-monitor 1.4.0 on /dev/cu.usbserial-0001 115200 --- --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:3 load:0x3fff0030,len:7172 load:0x40078000,len:15532 load:0x40080400,len:4 0x40080400: _init at ??:?
load:0x40080404,len:3904
entry 0x40080640
I (29) boot: ESP-IDF v5.2 2nd stage bootloader
I (29) boot: compile time Aug 18 2024 13:57:42
I (29) boot: Multicore bootloader
I (33) boot: chip revision: v1.0
I (37) boot.esp32: SPI Speed : 26.7MHz
I (42) boot.esp32: SPI Mode : DIO
I (46) boot.esp32: SPI Flash Size : 4MB
I (51) boot: Enabling RNG early entropy source...
I (56) boot: Partition Table:
I (60) boot: ## Label Usage Type ST Offset Length
I (67) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (75) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (82) boot: 2 factory factory app 00 00 00010000 003ee000
I (90) boot: End of partition table
I (94) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=2cfb80h (2947968) map
I (1286) esp_image: segment 1: paddr=002dfba8 vaddr=3ff80063 size=00008h ( 8) load
I (1286) esp_image: segment 2: paddr=002dfbb8 vaddr=3ffb0000 size=00460h ( 1120) load
I (1293) esp_image: segment 3: paddr=002e0020 vaddr=400d0020 size=ad7e4h (710628) map
I (1586) esp_image: segment 4: paddr=0038d80c vaddr=3ffb0460 size=03e28h ( 15912) load
I (1593) esp_image: segment 5: paddr=0039163c vaddr=40080000 size=18888h (100488) load
I (1639) esp_image: segment 6: paddr=003a9ecc vaddr=400c0000 size=00064h ( 100) load
I (1651) boot: Loaded app from partition at offset 0x10000
I (1651) boot: Disabling RNG early entropy source...
I (1663) cpu_start: Multicore app
I (1672) cpu_start: Pro cpu start user code
I (1672) cpu_start: cpu freq: 240000000 Hz
I (1673) cpu_start: Application information:
I (1676) cpu_start: Project name: alles
I (1681) cpu_start: App version: v0.3-6-g3cdc7a0-dirty
I (1687) cpu_start: Compile time: Aug 18 2024 13:57:37
I (1693) cpu_start: ELF file SHA256: 67df09ff28caad75...
I (1699) cpu_start: ESP-IDF: v5.2
I (1704) cpu_start: Min chip rev: v0.0
I (1709) cpu_start: Max chip rev: v3.99
I (1714) cpu_start: Chip rev: v1.0
I (1719) heap_init: Initializing. RAM available for dynamic allocation:
I (1726) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1732) heap_init: At 3FFBAE20 len 000251E0 (148 KiB): DRAM
I (1738) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1745) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1751) heap_init: At 40098888 len 00007778 (29 KiB): IRAM
I (1759) spi_flash: detected chip: generic
I (1762) spi_flash: flash io: dio
W (1767) ADC: legacy driver is deprecated, please migrate to esp_adc/adc_oneshot.h
I (1775) main_task: Started on CPU0
I (1785) main_task: Calling app_main()
Welcome to alles -- date Aug 18 2024 time 13:57:37 version v0.3-6-g3cdc7a0-dirty [3cdc7a0]
I (1785) gpio: GPIO[21]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1795) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1805) gpio: GPIO[33]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1815) gpio: GPIO[12]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
Detected revB+ Alles
I (1925) gpio: GPIO[0]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:1
I (1925) gpio: GPIO[16]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:1
I (1925) gpio: GPIO[17]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:1
I (1935) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:1
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40174618: 000000f0 1d004136 000000f0
0x40174618: nvs_sec_provider_include_impl at /Users/peterhesterman/esp/esp-idf-v5.2/components/nvs_sec_provider/nvs_sec_provider.c:285
Core 0 register dump:
PC : 0x4017461f PS : 0x00050030 A0 : 0x00000000 A1 : 0x3ffdee40
0x4017461f: gpio_task at /Users/peterhesterman/alles/main/buttons.c:65
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x00000000 A9 : 0x00000000
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x3ffb4694 A13 : 0x3ffdeed4
A14 : 0x3ffb468c A15 : 0x00000001 SAR : 0x00000000 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace: 0x4017461c:0x3ffdee40 0x4017461c: gpio_task at /Users/peterhesterman/alles/main/buttons.c:32
ELF file SHA256: 67df09ff28caad75
Rebooting... ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
I'm seeing the backtrace in buttons.c
. I have no idea why, but given that you're not using any buttons, try commenting out the line that starts the buttons management? In alles_esp32.c
comment out line 420: check_init(&buttons_init, "buttons");
?
Other than that I am out of ideas. It's a weird error and I can't replicate it here. Maybe try re-installing ESP-IDF, and test that simpler programs work fine on your board. Also try the AMY example code (without the WiFi) https://github.com/shorepine/amy_dual_core_esp32
OK. I started over and made the change you suggested above (commenting out line 420), and I made it farther than ever. After having successfully re-entered my WIFI info, I tried idf.py monitor again. I heard a couple of bongs, then a bloop, and then it seemed to have connected. I started python, imported alles and tried alles.drums(). Still nothing, but no rebooting! Here's the log:
peterhesterman@PetersMacStudio alles % idf.py monitor Executing action: monitor Serial port /dev/cu.usbserial-0001 Connecting..... Detecting chip type... Unsupported detection protocol, switching and trying again... Connecting...... Detecting chip type... ESP32 Running idf_monitor in directory /Users/peterhesterman/alles Executing "/Users/peterhesterman/.espressif/python_env/idf5.2_py3.12_env/bin/python /Users/peterhesterman/esp/esp-idf-v5.2/tools/idf_monitor.py -p /dev/cu.usbserial-0001 -b 115200 --toolchain-prefix xtensa-esp32-elf- --target esp32 --revision 0 /Users/peterhesterman/alles/build/alles.elf -m '/Users/peterhesterman/.espressif/python_env/idf5.2_py3.12_env/bin/python' '/Users/peterhesterman/esp/esp-idf-v5.2/tools/idf.py'"... --- esp-idf-monitor 1.4.0 on /dev/cu.usbserial-0001 115200 --- --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:3 load:0x3fff0030,len:7172 load:0x40078000,len:15532 load:0x40080400,len:4 0x40080400: _init at ??:?
load:0x40080404,len:3904
entry 0x40080640
I (29) boot: ESP-IDF v5.2 2nd stage bootloader
I (29) boot: compile time Aug 19 2024 20:29:41
I (29) boot: Multicore bootloader
I (33) boot: chip revision: v3.1
I (37) boot.esp32: SPI Speed : 26.7MHz
I (42) boot.esp32: SPI Mode : DIO
I (47) boot.esp32: SPI Flash Size : 4MB
I (51) boot: Enabling RNG early entropy source...
I (57) boot: Partition Table:
I (60) boot: ## Label Usage Type ST Offset Length
I (67) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (75) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (82) boot: 2 factory factory app 00 00 00010000 003ee000
I (90) boot: End of partition table
I (94) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=2cfa18h (2947608) map
I (1286) esp_image: segment 1: paddr=002dfa40 vaddr=3ff80063 size=00008h ( 8) load
I (1287) esp_image: segment 2: paddr=002dfa50 vaddr=3ffb0000 size=005c8h ( 1480) load
I (1293) esp_image: segment 3: paddr=002e0020 vaddr=400d0020 size=ad490h (709776) map
I (1586) esp_image: segment 4: paddr=0038d4b8 vaddr=3ffb05c8 size=03cc0h ( 15552) load
I (1593) esp_image: segment 5: paddr=00391180 vaddr=40080000 size=186c4h (100036) load
I (1638) esp_image: segment 6: paddr=003a984c vaddr=400c0000 size=00064h ( 100) load
I (1651) boot: Loaded app from partition at offset 0x10000
I (1651) boot: Disabling RNG early entropy source...
I (1662) cpu_start: Multicore app
I (1671) cpu_start: Pro cpu start user code
I (1672) cpu_start: cpu freq: 240000000 Hz
I (1672) cpu_start: Application information:
I (1675) cpu_start: Project name: alles
I (1680) cpu_start: App version: v0.3-6-g3cdc7a0-dirty
I (1686) cpu_start: Compile time: Aug 19 2024 20:29:34
I (1692) cpu_start: ELF file SHA256: cf85ad90a53f78c1...
I (1698) cpu_start: ESP-IDF: v5.2
I (1703) cpu_start: Min chip rev: v0.0
I (1708) cpu_start: Max chip rev: v3.99
I (1713) cpu_start: Chip rev: v3.1
I (1718) heap_init: Initializing. RAM available for dynamic allocation:
I (1725) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1731) heap_init: At 3FFBAE20 len 000251E0 (148 KiB): DRAM
I (1737) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1744) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1750) heap_init: At 400986C4 len 0000793C (30 KiB): IRAM
I (1758) spi_flash: detected chip: generic
I (1761) spi_flash: flash io: dio
W (1766) ADC: legacy driver is deprecated, please migrate to esp_adc/adc_oneshot.h
I (1774) main_task: Started on CPU0
I (1784) main_task: Calling app_main()
Welcome to alles -- date Aug 19 2024 time 20:29:34 version v0.3-6-g3cdc7a0-dirty [3cdc7a0]
I (1784) gpio: GPIO[21]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1794) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1804) gpio: GPIO[33]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1814) gpio: GPIO[12]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
Detected revB+ Alles
I (1944) wifi_manager: Set STA IP String to: 0.0.0.0
I (1954) wifi_init: rx ba win: 6
I (1954) wifi_init: tcpip mbox: 32
I (1954) wifi_init: udp mbox: 6
I (1954) wifi_init: tcp mbox: 6
I (1964) wifi_init: tcp tx win: 5744
I (1964) wifi_init: tcp rx win: 5744
I (1974) wifi_init: tcp mss: 1440
I (1974) wifi_init: WiFi IRAM OP enabled
I (1974) wifi_init: WiFi RX IRAM OP enabled
I (1984) phy_init: phy_version 4791,2c4672b,Dec 20 2023,16:06:06
I (2074) wifi_manager:
I (2084) http_server: Registering URI handlers
I (2084) wifi_manager: MESSAGE: ORDER_LOAD_AND_RESTORE_STA
I (2084) wifi_manager: wifi_manager_fetch_wifi_sta_config: ssid:hidden password:hidden
I (2094) wifi_manager: Saved wifi found on startup. Will attempt to connect.
I (2104) wifi_manager: MESSAGE: ORDER_CONNECT_STA
I (4284) wifi_manager: WIFI_EVENT_STA_DISCONNECTED
I (4284) wifi_manager: MESSAGE: EVENT_STA_DISCONNECTED with Reason code: 203
I (4284) wifi_manager: Set STA IP String to: 0.0.0.0
I (9294) wifi_manager: Retry Timer Tick! Sending ORDER_CONNECT_STA with reason CONNECTION_REQUEST_AUTO_RECONNECT
I (9294) wifi_manager: MESSAGE: ORDER_CONNECT_STA
I (9384) wifi_manager: WIFI_EVENT_STA_CONNECTED
I (11384) esp_netif_handlers: sta ip: 192.168.1.215, mask: 255.255.255.0, gw: 192.168.1.254
I (11384) wifi_manager: IP_EVENT_STA_GOT_IP
I (11384) wifi_manager: WM_EVENT_STA_GOT_IP
I (11394) wifi_manager: Set STA IP String to: 192.168.1.215
I (11394) wifi_manager: About to save config to flash!!
I (11404) wifi_manager: Wifi config was not saved to flash because no change has been detected.
I (11414) main: I have a connection and my IP is 192.168.1.215!
I (12864) multicast: Configured IPV4 Multicast address 232.10.11.12
Network listening running on core 1
[215] my client_id is now 0. 1 alive
peterhesterman@PetersMacStudio alles % python3 Python 3.12.5 (main, Aug 6 2024, 19:08:49) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import alles Connected to 192.168.1.224 as local IP for multicast IF alles.drums() ^CTraceback (most recent call last): File "
", line 1, in File "/Users/peterhesterman/alles/amy/amy.py", line 347, in drums time.sleep(1.0/(bpm*2/60)) KeyboardInterrupt ^D
Nice! That does look a lot better. I'm still very nervous why the buttons.c
stuff crashes for you.
UDP broadcast not working could be related, or its own thing. Try going through your router's settings to ensure UDP multicast is not disabled somewhere. Try also using netcat
to write an AMY message directly to the IP address your Alles has booted with: nc -u 192.168.1.215 9294
and typing v0f440l1Z
and enter
I went all through my AT&T router's settings and AT&T's broadband faq/help site and couldn't find any reference to UDP or multicast, so who knows? However, using netcat as you indicated above I was able to get a tone! BTW I'm happy to try adding buttons if that could help and you'll give me some guidance. Also, I have a Tulip, if that would be of any help in debugging. And, finally, thanks for spending so much time on this!
So, does the fact that the netcat test worked suggest a solution? I've read that multicast is related to Bonjour, and Bonjour works on my wireless network.
OK, I set up a wireless network on an old Apple Airport Express, and finally got things working! Thanks again for the help.
alles.sync() still doesn't work, by the way.
That's great. I'll make an issue about alles.sync().
I've made my own DIY Alles (with ESP-32 wired to the I2S amp according to the instructions given here), got the esp-idf installed, successfully built and uploaded the alles software to the ESP-32, the speaker chimes (bloops an octave), and the ESP-32 is connecting to my home network (at least when I 'import alles' in Python it shows that it's connected). But that's it...the speaker keeps blooping, 'alles.drums()' doesn't do anything, and 'alles.sync()' gives an error ("'millis' is not defined"). I've started over, substituting for the various components, but end up in the same place. I'd appreciate any help or troubleshooting advice.
Thanks,
Peter