Sending UDP Multicast Audio to ESP32s Not Working as Expected #1428
-
I'm not sure that this is an audio tools issue but I thought some of you may have run into this same problem. I’m streaming raw audio to a number of ESP32-S3 modules over a dedicated wifi network using an Archer A6 TP-Link router. I'm sending via Gstreamer and receiving using audio tools. I’m sending the audio to a UDP multicast address from a laptop over Ethernet to the dedicated wifi router.I want all the devices to simultaneously receive the audio stream over wifi. If I stream the audio to 3 devices on the wifii network all is good however if after starting the audio stream I disconnect a device or 2 the audio on the remaining device becomes choppy. This happens about 25 seconds after the other devices are removed. It takes about 1 minute 35 seconds for the signal to return to normal on the remaining device.I’m not sure why? Is the router looking for the previously connected devices and using up bandwidth? With multicast I figured the stream would just continue uninterrupted and if a device was out there to listen, it would jump on the stream. I didn't think leaving the stream with one device would affect the stream going to other devices. Obviously my understanding of how multicast streaming works is flawed. Is there a setting on my router I need to change? Do I need a fancier router? I want all the devices to receive the audio simultaneously so I can’t use something like icecast. If I use Broadcast instead of Multicast removing devices doesn't affect the remaining devices however I get much worse reception when using Broadcast. I tried using Wireshark to look at what is happening. One thing I noticed is the ESP32s never respond to ARP requests :
Above is my router asking the IP address of an ESP32 for it's MAC address. The ESP32s do however occasionally send this info unsolicited ie.
I'm not sure if this is an ARP issue. I read that Broadcast and Multicast don't require ARP. I've been pulling my hair out on this for a while and asked in other forums without an answer. Anyone have any throughts? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 22 comments 1 reply
-
I would expect that it might help if you somehow properly manage to to send a igmp leavegroup before you shut down a device. But it might also be a good idea to switch to a dedicated protocol for this use case: Snapcast would be the perfect fit if you are on a Linux based system: If you have a ESP32 with PSRAM and you are looking for a solution that just works, I suggest that you try out My current Arduino Snapclient implementation might also work for your case. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply. Yes sending a leave group command would be a
good idea however the devices as designed now just get powered off when
disconnected. I suppose I could add an additional circuit that senses power
off and keeps the device alive long enough to send this message but that
complicates things. i hadn't heard about snapclient before so will look
into it. Thanks again for such a great Library!!
…On Thu, Mar 7, 2024 at 12:25 PM Phil Schatzmann ***@***.***> wrote:
I would expect that it might help if you somehow properly manage to to
send a igmp leavegroup before you shut down a device.
But it might also be a good idea to switch to a dedicated protocol for
this use case: Snapcast would be the perfect fit if you are on a Linux
based system:
If you have a ESP32 with PSRAM and you are looking for a solution that
just works, I suggest that you try out
- Carlos Seher's SnapClient
<https://github.com/CarlosDerSeher/snapclient>
- Jørgen Kragh Jakobsen's SnapClient
<https://github.com/jorgenkraghjakobsen/snapclient>
My current snapclient implementation
<https://github.com/pschatzmann/arduino-snapclient> might also work for
your case.
—
Reply to this email directly, view it on GitHub
<#1428 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHBBBCVZELDKTUSCLKJGKV3YXCPILAVCNFSM6AAAAABELJZUECVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DOMJQGYYTC>
.
You are receiving this because you authored the thread.Message ID:
<pschatzmann/arduino-audio-tools/repo-discussions/1428/comments/8710611@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
I'm trying out your snapclient and my ESP32-S3 keeps rebooting with this
message below. It looks like it is trying to access a memory location it
shouldn't. Any thoughts on what is going on here?
Thanks
Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x420b749a
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0
Connecting to WiFi ...
192.168.1.101
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was
unhandled.
Core 1 register dump:
PC : 0x42006e9c PS : 0x00060930 A0 : 0x8200954a A1 :
0x3fcebed0
A2 : 0x3fc99f78 A3 : 0x000003e8 A4 : 0x00000000 A5 :
0x00000000
A6 : 0x3fc9a960 A7 : 0x00000000 A8 : 0x82006e87 A9 :
0x3fcebe90
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x0000001e A13 :
0x3fc99fd8
A14 : 0x000000cf A15 : 0x3fc9a170 SAR : 0x0000000a EXCCAUSE:
0x0000001d
EXCVADDR: 0x0000001c LBEG : 0x400556d5 LEND : 0x400556e5 LCOUNT :
0xfffffffe
Backtrace: 0x42006e99:0x3fcebed0 0x42009547:0x3fcebef0
0x42009555:0x3fcebf30 0x42006089:0x3fcebf50 0x42019241:0x3fcebf70
…On Thu, Mar 7, 2024 at 12:35 PM Jim Ruxton ***@***.***> wrote:
Thanks for the quick reply. Yes sending a leave group command would be a
good idea however the devices as designed now just get powered off when
disconnected. I suppose I could add an additional circuit that senses power
off and keeps the device alive long enough to send this message but that
complicates things. i hadn't heard about snapclient before so will look
into it. Thanks again for such a great Library!!
On Thu, Mar 7, 2024 at 12:25 PM Phil Schatzmann ***@***.***>
wrote:
> I would expect that it might help if you somehow properly manage to to
> send a igmp leavegroup before you shut down a device.
>
> But it might also be a good idea to switch to a dedicated protocol for
> this use case: Snapcast would be the perfect fit if you are on a Linux
> based system:
>
> If you have a ESP32 with PSRAM and you are looking for a solution that
> just works, I suggest that you try out
>
> - Carlos Seher's SnapClient
> <https://github.com/CarlosDerSeher/snapclient>
> - Jørgen Kragh Jakobsen's SnapClient
> <https://github.com/jorgenkraghjakobsen/snapclient>
>
> My current snapclient implementation
> <https://github.com/pschatzmann/arduino-snapclient> might also work for
> your case.
>
> —
> Reply to this email directly, view it on GitHub
> <#1428 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AHBBBCVZELDKTUSCLKJGKV3YXCPILAVCNFSM6AAAAABELJZUECVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DOMJQGYYTC>
> .
> You are receiving this because you authored the thread.Message ID:
> <pschatzmann/arduino-audio-tools/repo-discussions/1428/comments/8710611@
> github.com>
>
|
Beta Was this translation helpful? Give feedback.
-
Difficult to say w/o decoding the stacktrace: I guess you have downloaded a audio-tools-version which has some memory initialization problems. Try to use the latest corrections or go back to the latest released version. This might come from this new functionality. |
Beta Was this translation helpful? Give feedback.
-
The version I used above is the latest version ie.
https://github.com/pschatzmann/arduino-audio-tools . Sorry not sure
what you mean by the latest corrections?
Thanks,
Jim
…On Thu, Mar 7, 2024 at 4:14 PM Phil Schatzmann ***@***.***> wrote:
Difficult to say w/o decoding the stacktrace: I guess you have downloaded
a audio-tools-version which has some memory initialization problems. Try to
use the latest corrections or go back to the latest released version.
This might come from this new functionality
<https://www.pschatzmann.ch/home/2024/03/06/audiotools-esp32-and-psram-revisited/>
.
—
Reply to this email directly, view it on GitHub
<#1428 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHBBBCQBUPXJ7W6QE3KLMV3YXDKBVAVCNFSM6AAAAABELJZUECVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DOMJSGYZDO>
.
You are receiving this because you authored the thread.Message ID:
<pschatzmann/arduino-audio-tools/repo-discussions/1428/comments/8712627@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Thanks Phil, it looks to me like the latest corrections have already been
applied to the version I downloaded.
…On Thu, Mar 7, 2024 at 4:44 PM Phil Schatzmann ***@***.***> wrote:
https://github.com/pschatzmann/arduino-audio-tools/commits/main/
—
Reply to this email directly, view it on GitHub
<#1428 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHBBBCQ7AFMHIZYKOYSOU7TYXDNSDAVCNFSM6AAAAABELJZUECVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DOMJSHEZDA>
.
You are receiving this because you authored the thread.Message ID:
<pschatzmann/arduino-audio-tools/repo-discussions/1428/comments/8712920@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Something strange is happening. I downloaded a newer version of the Arduino
IDE and I no longer had the rebooting happening. I added the AudioLogger
AudioLogger::instance().begin(Serial, AudioLogger::Info);
and the rebooting started happening again. I removed the
AudioLogger and now the rebooting is continuing. Strange as if
the AudioLogger changed something even after I removed it from
the program? Would you have any insights into why this happened?
Thanks
…On Thu, Mar 7, 2024 at 11:58 PM Jim Ruxton ***@***.***> wrote:
Thanks Phil, it looks to me like the latest corrections have already been
applied to the version I downloaded.
On Thu, Mar 7, 2024 at 4:44 PM Phil Schatzmann ***@***.***>
wrote:
> https://github.com/pschatzmann/arduino-audio-tools/commits/main/
>
> —
> Reply to this email directly, view it on GitHub
> <#1428 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AHBBBCQ7AFMHIZYKOYSOU7TYXDNSDAVCNFSM6AAAAABELJZUECVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DOMJSHEZDA>
> .
> You are receiving this because you authored the thread.Message ID:
> <pschatzmann/arduino-audio-tools/repo-discussions/1428/comments/8712920@
> github.com>
>
|
Beta Was this translation helpful? Give feedback.
-
In case it is useful this is the decoded stack trace results.
Decoding stack results
0x42006eb1: snap_arduino::SnapProcessor::processMessageServerSettings() at
/home/jim/Arduino/libraries/arduino-snapclient/src/api/SnapProcessor.h:445
0x4200955f: snap_arduino::SnapProcessor::processLoopStep() at
/home/jim/Arduino/libraries/arduino-snapclient/src/api/SnapProcessor.h:201
0x4200956d: snap_arduino::SnapProcessor::doLoop() at
/home/jim/Arduino/libraries/arduino-snapclient/src/api/SnapProcessor.h:73
0x42006098: loop() at
/home/jim/Arduino/libraries/arduino-snapclient/src/SnapClient.h:154
0x42019259: loopTask(void*) at
/home/jim/.arduino15/packages/esp32/hardware/esp32/2.0.14/cores/esp32/main.cpp:50
…On Fri, Mar 8, 2024 at 2:05 AM Jim Ruxton ***@***.***> wrote:
Something strange is happening. I downloaded a newer version of the
Arduino IDE and I no longer had the rebooting happening. I added the
AudioLogger
AudioLogger::instance().begin(Serial, AudioLogger::Info);
and the rebooting started happening again. I removed the
AudioLogger and now the rebooting is continuing. Strange as if
the AudioLogger changed something even after I removed it from
the program? Would you have any insights into why this happened?
Thanks
On Thu, Mar 7, 2024 at 11:58 PM Jim Ruxton ***@***.***> wrote:
> Thanks Phil, it looks to me like the latest corrections have already been
> applied to the version I downloaded.
>
> On Thu, Mar 7, 2024 at 4:44 PM Phil Schatzmann ***@***.***>
> wrote:
>
>> https://github.com/pschatzmann/arduino-audio-tools/commits/main/
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <#1428 (reply in thread)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AHBBBCQ7AFMHIZYKOYSOU7TYXDNSDAVCNFSM6AAAAABELJZUECVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DOMJSHEZDA>
>> .
>> You are receiving this because you authored the thread.Message ID:
>> <pschatzmann/arduino-audio-tools/repo-discussions/1428/comments/8712920@
>> github.com>
>>
>
|
Beta Was this translation helpful? Give feedback.
-
Sorry for flooding this feed. It appears there is something wrong with the
Serial Monitor in the Arduino IDE that is causing this issue. Strangely if
I boot into my Windows partition instead of my Ubuntu partition and use the
Arduino IDE there the exception disappears, no rebooting of the ESP32. If I
connect the device back up to the serial monitor on Linux I continue to get
the exception and reboots. Sorry if I had you scratching your head on this
but strangely this is the first sketch I have seen this happen with on this
device. Very strange behaviour.
…On Fri, Mar 8, 2024 at 3:14 AM Jim Ruxton ***@***.***> wrote:
In case it is useful this is the decoded stack trace results.
Decoding stack results
0x42006eb1: snap_arduino::SnapProcessor::processMessageServerSettings() at
/home/jim/Arduino/libraries/arduino-snapclient/src/api/SnapProcessor.h:445
0x4200955f: snap_arduino::SnapProcessor::processLoopStep() at
/home/jim/Arduino/libraries/arduino-snapclient/src/api/SnapProcessor.h:201
0x4200956d: snap_arduino::SnapProcessor::doLoop() at
/home/jim/Arduino/libraries/arduino-snapclient/src/api/SnapProcessor.h:73
0x42006098: loop() at
/home/jim/Arduino/libraries/arduino-snapclient/src/SnapClient.h:154
0x42019259: loopTask(void*) at
/home/jim/.arduino15/packages/esp32/hardware/esp32/2.0.14/cores/esp32/main.cpp:50
On Fri, Mar 8, 2024 at 2:05 AM Jim Ruxton ***@***.***> wrote:
> Something strange is happening. I downloaded a newer version of the
> Arduino IDE and I no longer had the rebooting happening. I added the
> AudioLogger
> AudioLogger::instance().begin(Serial, AudioLogger::Info);
> and the rebooting started happening again. I removed the
> AudioLogger and now the rebooting is continuing. Strange as if
> the AudioLogger changed something even after I removed it from
> the program? Would you have any insights into why this happened?
> Thanks
>
>
> On Thu, Mar 7, 2024 at 11:58 PM Jim Ruxton ***@***.***> wrote:
>
>> Thanks Phil, it looks to me like the latest corrections have already
>> been applied to the version I downloaded.
>>
>> On Thu, Mar 7, 2024 at 4:44 PM Phil Schatzmann ***@***.***>
>> wrote:
>>
>>> https://github.com/pschatzmann/arduino-audio-tools/commits/main/
>>>
>>> —
>>> Reply to this email directly, view it on GitHub
>>> <#1428 (reply in thread)>,
>>> or unsubscribe
>>> <https://github.com/notifications/unsubscribe-auth/AHBBBCQ7AFMHIZYKOYSOU7TYXDNSDAVCNFSM6AAAAABELJZUECVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DOMJSHEZDA>
>>> .
>>> You are receiving this because you authored the thread.Message ID:
>>> <pschatzmann/arduino-audio-tools/repo-discussions/1428/comments/8712920
>>> @github.com>
>>>
>>
|
Beta Was this translation helpful? Give feedback.
-
I was deactivating the change which was causing these issues. |
Beta Was this translation helpful? Give feedback.
-
I can't figure out why the esp32s3 keeps rebooting. I get the below
message still when uploading the example file SnapClientI2S ,
from the latest arduino-snapclient?
Backtrace: 0x42006e91:0x3fcebe10 0x4200953f:0x3fcebe30
0x4200954d:0x3fcebe70 0x42006089:0x3fcebe90 0x4201923d:0x3fcebeb0
ith
ELF file SHA256: 3118e3821187e0a1
Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x420b7482
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0
Connecting to WiFi ...
192.168.0.79
E (1069) I2S: i2s_set_pin(298): data_out_num invalid
[E] I2SESP32.h : 212 - begin - i2s_set_pin
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception
was unhandled.
Core 1 register dump:
PC : 0x42006e94 PS : 0x00060930 A0 : 0x82009542 A1
: 0x3fcebe10
A2 : 0x3fc99f78 A3 : 0x000003e8 A4 : 0x00000000 A5
: 0x00000000
A6 : 0x3fcad6d0 A7 : 0x00000000 A8 : 0x82006e7f A9
: 0x3fcebdd0
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x0000001e A13
: 0x3fc99fd8
A14 : 0x000000cf A15 : 0x3fc9a048 SAR : 0x0000000a
EXCCAUSE: 0x0000001d
EXCVADDR: 0x0000001c LBEG : 0x400556d5 LEND : 0x400556e5
LCOUNT : 0xfffffffe
Backtrace: 0x42006e91:0x3fcebe10 0x4200953f:0x3fcebe30
0x4200954d:0x3fcebe70 0x42006089:0x3fcebe90 0x4201923d:0x3fcebeb0
…On Fri, Mar 8, 2024 at 5:48 PM Phil Schatzmann ***@***.***> wrote:
I was deactivating the change which was causing these issues.
I hope that the functionality is back to normal...
—
Reply to this email directly, view it on GitHub
<#1428 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHBBBCQBASNSW2LWPM7QB4DYXI525AVCNFSM6AAAAABELJZUECVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DOMRVGUYTI>
.
You are receiving this because you authored the thread.Message ID:
<pschatzmann/arduino-audio-tools/repo-discussions/1428/comments/8725514@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Probably not so helpful but if I comment out
client.doLoop();
in the SnapClientI2s example the ESP32-S3 doesn't reboot.
By the way, in case it's important I'm using XIAO_ESP32S3 boards.
…On Sat, Mar 9, 2024 at 1:10 AM Jim Ruxton ***@***.***> wrote:
I can't figure out why the esp32s3 keeps rebooting. I get the below message still when uploading the example file SnapClientI2S ,
from the latest arduino-snapclient?
Backtrace: 0x42006e91:0x3fcebe10 0x4200953f:0x3fcebe30 0x4200954d:0x3fcebe70 0x42006089:0x3fcebe90 0x4201923d:0x3fcebeb0
ith
ELF file SHA256: 3118e3821187e0a1
Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x420b7482
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0
Connecting to WiFi ...
192.168.0.79
E (1069) I2S: i2s_set_pin(298): data_out_num invalid
[E] I2SESP32.h : 212 - begin - i2s_set_pin
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x42006e94 PS : 0x00060930 A0 : 0x82009542 A1 : 0x3fcebe10
A2 : 0x3fc99f78 A3 : 0x000003e8 A4 : 0x00000000 A5 : 0x00000000
A6 : 0x3fcad6d0 A7 : 0x00000000 A8 : 0x82006e7f A9 : 0x3fcebdd0
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x0000001e A13 : 0x3fc99fd8
A14 : 0x000000cf A15 : 0x3fc9a048 SAR : 0x0000000a EXCCAUSE: 0x0000001d
EXCVADDR: 0x0000001c LBEG : 0x400556d5 LEND : 0x400556e5 LCOUNT : 0xfffffffe
Backtrace: 0x42006e91:0x3fcebe10 0x4200953f:0x3fcebe30 0x4200954d:0x3fcebe70 0x42006089:0x3fcebe90 0x4201923d:0x3fcebeb0
On Fri, Mar 8, 2024 at 5:48 PM Phil Schatzmann ***@***.***>
wrote:
> I was deactivating the change which was causing these issues.
> I hope that the functionality is back to normal...
>
> —
> Reply to this email directly, view it on GitHub
> <#1428 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AHBBBCQBASNSW2LWPM7QB4DYXI525AVCNFSM6AAAAABELJZUECVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DOMRVGUYTI>
> .
> You are receiving this because you authored the thread.Message ID:
> <pschatzmann/arduino-audio-tools/repo-discussions/1428/comments/8725514@
> github.com>
>
|
Beta Was this translation helpful? Give feedback.
-
I would be worried about the following message: E (1069) I2S: i2s_set_pin(298): data_out_num invalid Maybe it will also help if you deactivate the PSRAM in the Arduino menu.... |
Beta Was this translation helpful? Give feedback.
-
Apologies Phil. I guess I sent you a version of errors when I had forgotten
to change the i2s pin numbers for my board.
I get the same affect even after I had changed the pin numbers. ie.
ELF file SHA256: e4129e1576ad6b04
Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x420b74ae
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0
Connecting to WiFi ...
192.168.1.100
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception
was unhandled.
Core 1 register dump:
PC : 0x42006eb0 PS : 0x00060f30 A0 : 0x8200955e A1
: 0x3fcebe10
A2 : 0x3fc99f78 A3 : 0x000003e8 A4 : 0x00000000 A5
: 0x00000000
A6 : 0x3fcad55c A7 : 0x00000000 A8 : 0x82006e9b A9
: 0x3fcebdd0
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x0000001e A13
: 0x3fc99fd8
A14 : 0x000000cf A15 : 0x3fc9a170 SAR : 0x0000000a
EXCCAUSE: 0x0000001d
EXCVADDR: 0x0000001c LBEG : 0x400556d5 LEND : 0x400556e5
LCOUNT : 0xfffffffe
Backtrace: 0x42006ead:0x3fcebe10 0x4200955b:0x3fcebe30
0x42009569:0x3fcebe70 0x42006085:0x3fcebe90 0x42019255:0x3fcebeb0
…On Sat, Mar 9, 2024 at 3:03 AM Phil Schatzmann ***@***.***> wrote:
I would be worried about the following message: E (1069) I2S:
i2s_set_pin(298): data_out_num invalid
Did you try to change the pin ?
—
Reply to this email directly, view it on GitHub
<#1428 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHBBBCWWLQ53OVA74YIMXQDYXK66HAVCNFSM6AAAAABELJZUECVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DOMRXGU4DM>
.
You are receiving this because you authored the thread.Message ID:
<pschatzmann/arduino-audio-tools/repo-discussions/1428/comments/8727586@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
I had a bit of time to look at this this evening and something I realized
is that the rebooting only occurs if snapclient on the esp32 connects to
snapserver. If I stop snapserver the rebooting stops. This all happens
whether or not the audio stream is running into /tmp/streamfifo .
…On Sat, Mar 9, 2024 at 6:20 PM Jim Ruxton ***@***.***> wrote:
Apologies Phil. I guess I sent you a version of errors when I had
forgotten to change the i2s pin numbers for my board.
I get the same affect even after I had changed the pin numbers. ie.
ELF file SHA256: e4129e1576ad6b04
Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x420b74ae
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0
Connecting to WiFi ...
192.168.1.100
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x42006eb0 PS : 0x00060f30 A0 : 0x8200955e A1 : 0x3fcebe10
A2 : 0x3fc99f78 A3 : 0x000003e8 A4 : 0x00000000 A5 : 0x00000000
A6 : 0x3fcad55c A7 : 0x00000000 A8 : 0x82006e9b A9 : 0x3fcebdd0
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x0000001e A13 : 0x3fc99fd8
A14 : 0x000000cf A15 : 0x3fc9a170 SAR : 0x0000000a EXCCAUSE: 0x0000001d
EXCVADDR: 0x0000001c LBEG : 0x400556d5 LEND : 0x400556e5 LCOUNT : 0xfffffffe
Backtrace: 0x42006ead:0x3fcebe10 0x4200955b:0x3fcebe30 0x42009569:0x3fcebe70 0x42006085:0x3fcebe90 0x42019255:0x3fcebeb0
On Sat, Mar 9, 2024 at 3:03 AM Phil Schatzmann ***@***.***>
wrote:
> I would be worried about the following message: E (1069) I2S:
> i2s_set_pin(298): data_out_num invalid
> Did you try to change the pin ?
>
> —
> Reply to this email directly, view it on GitHub
> <#1428 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AHBBBCWWLQ53OVA74YIMXQDYXK66HAVCNFSM6AAAAABELJZUECVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DOMRXGU4DM>
> .
> You are receiving this because you authored the thread.Message ID:
> <pschatzmann/arduino-audio-tools/repo-discussions/1428/comments/8727586@
> github.com>
>
|
Beta Was this translation helpful? Give feedback.
-
I could not reproduce your issue, but this could be due to my latest corrections to the AudioTools. |
Beta Was this translation helpful? Give feedback.
-
Below is the program I'm using. I added the LED stuff at the bottom
recently for debugging purposes. As you see I'm using the I2SStream output.
#include "AudioTools.h"
#include "SnapClient.h"
#include "AudioCodecs/CodecOpus.h" //
https://github.com/pschatzmann/arduino-libopus
//#include "api/SnapProcessorRTOS.h" // install
https://github.com/pschatzmann/arduino-freertos-addons
// constants won't change. Used here to set a pin number:
const int ledPin = LED_BUILTIN; // the number of the LED pin
// Variables will change:
int ledState = LOW; // ledState used to set the LED
// Generally, you should use "unsigned long" for variables that hold time
// The value will quickly become too large for an int to store
unsigned long previousMillis = 0; // will store last time LED was updated
// constants won't change:
const long interval = 1000; // interval at which to blink (milliseconds)
OpusAudioDecoder codec;
WiFiClient wifi;
I2SStream out;
SnapClient client(wifi, out, codec);
void setup() {
pinMode(ledPin, OUTPUT);
delay(1000);
Serial.begin(115200);
// AudioLogger::instance().begin(Serial, AudioLogger::Info);
const char *ssid = "NETGEAR41";
const char *password = "*******";
// login to wifi -> Define values in SnapConfig.h or replace them here
// WiFi.begin(CONFIG_WIFI_SSID, CONFIG_WIFI_PASSWORD);
WiFi.begin(ssid, password);
WiFi.setTxPower(WIFI_POWER_8_5dBm);
esp_wifi_set_ps(WIFI_PS_NONE);
WiFi.setSleep(false);
Serial.println(ssid);
Serial.println(password);
Serial.print("Connecting to WiFi ..");
while (WiFi.status() != WL_CONNECTED) {
Serial.print('.');
delay(1000);
}
// print ip address
Serial.println();
Serial.println(WiFi.localIP());
// setup I2S to define custom pins
auto cfg = out.defaultConfig();
// cfg.pin_bck = 14;
// cfg.pin_ws = 15;
// cfg.pin_data = 22;
// cfg.buffer_size = 512;
// cfg.buffer_count = 40;
out.begin(cfg);
// Use FreeRTOS
//client.setSnapProcessor(rtos);
// Define CONFIG_SNAPCAST_SERVER_HOST in SnapConfig.h or here
// client.setServerIP(IPAddress(192,168,1,33));
// start snap client
client.begin();
// Serial.println("here");
}
void loop() {
// Serial.println("there");
client.doLoop();
unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= interval) {
// save the last time you blinked the LED
previousMillis = currentMillis;
// if the LED is off turn it on and vice-versa:
if (ledState == LOW) {
ledState = HIGH;
} else {
ledState = LOW;
}
// set the LED with the ledState of the variable:
digitalWrite(ledPin, ledState);
}
}
…On Tue, Mar 12, 2024 at 12:12 PM Phil Schatzmann ***@***.***> wrote:
I could not reproduce your issue, but this could be due to my latest
corrections to the AudioTools.
What output class did you use ?
—
Reply to this email directly, view it on GitHub
<#1428 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHBBBCRDICU7LX2TT3R2DU3YX4LNXAVCNFSM6AAAAABELJZUECVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DONRSGIYDK>
.
You are receiving this because you authored the thread.Message ID:
<pschatzmann/arduino-audio-tools/repo-discussions/1428/comments/8762205@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
In this case I suggest that you try again with the updated AudioTools. I am not sure how reliable an update of the library is, so I suggest to delete it first (assuming you don't use git update)... |
Beta Was this translation helpful? Give feedback.
-
Thanks Phil. I will give that a try later this evening and let you know how
it goes.
…On Tue, Mar 12, 2024 at 12:29 PM Phil Schatzmann ***@***.***> wrote:
In this case I suggest that you try again with the updated AudioTools. I
am not sure how reliable an update of the library is, so I suggest to
delete it first...
—
Reply to this email directly, view it on GitHub
<#1428 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHBBBCSC5TETKOD57NHZSZTYX4NNVAVCNFSM6AAAAABELJZUECVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DONRSGM4TG>
.
You are receiving this because you authored the thread.Message ID:
<pschatzmann/arduino-audio-tools/repo-discussions/1428/comments/8762393@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Hi Phil,
I cloned the latest library and I'm getting the same result ie. if the
server is running the client keeps rebooting. Below may shed more light on
the situation. It shows the verbose output of Core Debug before the reboot
occurs . This must be frustrating for you if you can't repeat it. Could it
be something in my server settings?
[ 2339][I][SnapClient.h:103] begin(): [SnapClient] Connected to AP
[ 2339][I][SnapClient.h:214] setupMACAddress(): [SnapClient] mac:
30:30:F9:18:22:CC
[ 2341][D][SnapClient.h:170] setupMDNS(): [SnapClient] start
[ 5448][I][SnapClient.h:185] setupMDNS(): [SnapClient] MDNS: SNAPCAST ip:
192.168.1.104, port: 1704
[ 5460][D][SnapProcessor.h:221] connectClient(): [SnapProcessor] start
[ 5467][I][SnapProcessor.h:130] processLoopStep(): [SnapProcessor] ...
connected
[ 5467][D][SnapProcessor.h:233] writeHallo(): [SnapProcessor] start
[ 5469][D][SnapProtocol.h:311] to_json(): [SnapMessageHallo]
{"MAC":"30:30:F9:18:22:CC","HostName":"arduino-snapclient","Version":"0.0.2","ClientName":"libsnapcast","OS":"arduino","Arch":"xtensa","Instance":1,"ID":"30:30:F9:18:22:CC","SnapStreamProtocolVersion":2}
[ 5494][D][SnapProcessor.h:174] processMessageLoop(): [SnapProcessor]
processMessageLoop
[ 5500][D][SnapProcessor.h:277] readBaseMessage(): [SnapProcessor] 26
[ 5507][D][SnapProcessor.h:281] readBaseMessage(): [SnapProcessor] Bytes
read: 26
[ 5514][D][SnapProcessor.h:299] readData(): [SnapProcessor] 60
[ 5519][D][SnapProcessor.h:426] processMessageServerSettings():
[SnapProcessor] start
[ 5527][D][SnapProtocol.h:325] deserialize(): [SnapMessageServerSettings]
{"bufferMs":1000,"latency":0,"muted":false,"volume":100}1
[ 5539][D][SnapProtocol.h:333] deserialize(): [COMMON] bufferMs: 1000
[ 5545][D][SnapProtocol.h:338] deserialize(): [COMMON] latency: 0
[ 5551][D][SnapProtocol.h:343] deserialize(): [COMMON] volume: 100
[ 5557][D][SnapProtocol.h:349] deserialize(): [COMMON] muted: false
[ 5563][I][SnapProcessor.h:439] processMessageServerSettings():
[SnapProcessor] Message Buff.ms:1000
[ 5572][I][SnapProcessor.h:440] processMessageServerSettings():
[SnapProcessor] Latency: 0
[ 5580][I][SnapProcessor.h:441] processMessageServerSettings():
[SnapProcessor] Mute: false
[ 5589][I][SnapProcessor.h:442] processMessageServerSettings():
[SnapProcessor] Setting volume: 100
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was
unhandled.
…On Tue, Mar 12, 2024 at 2:48 PM Jim Ruxton ***@***.***> wrote:
Thanks Phil. I will give that a try later this evening and let you know
how it goes.
On Tue, Mar 12, 2024 at 12:29 PM Phil Schatzmann ***@***.***>
wrote:
> In this case I suggest that you try again with the updated AudioTools. I
> am not sure how reliable an update of the library is, so I suggest to
> delete it first...
>
> —
> Reply to this email directly, view it on GitHub
> <#1428 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AHBBBCSC5TETKOD57NHZSZTYX4NNVAVCNFSM6AAAAABELJZUECVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DONRSGM4TG>
> .
> You are receiving this because you authored the thread.Message ID:
> <pschatzmann/arduino-audio-tools/repo-discussions/1428/comments/8762393@
> github.com>
>
|
Beta Was this translation helpful? Give feedback.
-
Actually with your sketch, I could reproduce the issue: the synchronizer was not defined in the Output. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot Phil . This was the culprit!
…On Wed, Mar 13, 2024 at 3:18 AM Phil Schatzmann ***@***.***> wrote:
Actually with your sketch, I could reproduce the issue: the synchronizer
was not defined in the Output.
I always tested with the AudioKit and FreeRTOS examples that defined the
synchronizer.
The correction has been committed to the snapclient
<https://github.com/pschatzmann/arduino-snapclient> project.
—
Reply to this email directly, view it on GitHub
<#1428 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHBBBCXFLF7R6B4XG53IGALYX7VS7AVCNFSM6AAAAABELJZUECVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DONRYHAZTQ>
.
You are receiving this because you authored the thread.Message ID:
<pschatzmann/arduino-audio-tools/repo-discussions/1428/comments/8768838@
github.com>
|
Beta Was this translation helpful? Give feedback.
I would expect that it might help if you somehow properly manage to to send a igmp leavegroup before you shut down a device.
But it might also be a good idea to switch to a dedicated protocol for this use case: Snapcast would be the perfect fit if you are on a Linux based system:
If you have a ESP32 with PSRAM and you are looking for a solution that just works, I suggest that you try out
My current Arduino Snapclient implementation might also work for your case.