-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
udp multicast, receiving bytes stops after a while #132
Comments
sample output:
in this case, receiving stops after 594 packets - that number varies |
@lathoub Did you checked for a memory leak? |
@Rotzbua no memory is dynamically allocated in the above example. Only static memory is used in |
@lathoub My suggestion is a memory leak in the library, because it stops after "some packets". I suggest to print the free ram of the arduino in every loop, if it becomes less there is a memory leak otherwise there is a other problem. https://github.com/mpflaga/Arduino-MemoryFree Maybe check your hardware (clone?) for faulty design. Those clones cost me a lot of time in the past #117 . |
@Rotzbua thanks - I installed the suggested MemoryFree library and printed the
|
The last thing is a code part which depends on ram of the target. Printing Lines 32 to 40 in 6e9dffa
|
W5100 (Arduino Ethernet) reports 4, W5500 shield (on MKRZERO) reports 8. |
Hi, I wrote a library for Arduino to send/receive ipMIDI (IDE 1.8.10). All works fine, but after a while, the Arduino stops receiving input (sending bytes continues to work).
The failure does not happen after a fixed number of
reads
orparsepackets
, it varies between 10 and 1000 iterations in the example. Failure happens on both W5100 and W5500 shields and on both Arduino Ethernet (W5100) and MKR1000 with Ethernet shield (W5500). Failure does not happen on ESP32.Below the (compacted) source code for an Arduino Ethernet (using 38% program storage space, 25% of dynamic memory). Packet Sender on a Mac (10.15.4) sends 3 bytes (MIDI note on) to multicast address 225.0.0.37, port 21928 (udp) every 500ms.
The text was updated successfully, but these errors were encountered: