You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue came up when trying to send a UDP message to several destinations, but the simplified example attached demonstrates the issue with only one destination. Multiple connect - send - close cycles eventually cause a 'Could not start server' error. Environment is a pyportal running 9.1.4. udpIssue.zip
Does the exception occur in a repeatable way, like after a certain number of iterations or a certain amount of time? I don't see this behavior in my own clients.
I noticed that the version of NINA firmware is old, you could try the latest.
If you catch the exception and retry, does it recover?
Thanks for the reply, anecdata,
The exception occurs somewhere between 20 and 40 loops, inconsistently.
I've tried different values for the time.sleep() line, but that seems to
have no effect.
Updating the ESP32 was the next thing I was going to try, but I ran into
problems with both the web-based tool and esptool.py which I'm trying to
resolve now (ref: https://forums.adafruit.com/viewtopic.php?t=214253).
If this solves the issue, I'll report back on github and close out the
issue.
I tried catching the exception, but it seemed to have no effect. I'm
something of a python newbie, so let me know if I got it wrong below.
thanks,
-lr
####################################
#main loop here
####################################
while True:
udp_message = bytes(f"{mymsg} {ct}", 'utf-8')
ct += 1
print("send", ct)
try:
s.connect(socketaddr, conntype=esp.UDP_MODE)
s.send(udp_message)
s.close()
except:
print("error occurred")
time.sleep(0.2)
#end main loop
--------------kX1plLA7D1phVtG3kz7MSmMp
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Thanks for the reply, anecdata,</p>
<p>The exception occurs somewhere between 20 and 40 loops,
inconsistently. I've tried different values for the time.sleep()
line, but that seems to have no effect.</p>
<p>Updating the ESP32 was the next thing I was going to try, but I
ran into problems with both the web-based tool and esptool.py
which I'm trying to resolve now (ref: <a class="moz-txt-link-freetext" href="https://forums.adafruit.com/viewtopic.php?t=214253" moz-do-not-send="true">https://forums.adafruit.com/viewtopic.php?t=214253</a>).
If this solves the issue, I'll report back on github and close out
the issue.</p>
<p>I tried catching the exception, but it seemed to have no effect.
I'm something of a python newbie, so let me know if I got it wrong
below.</p>
<p>thanks,</p>
<p>-lr</p>
<p><br>
</p>
<p><font face="monospace">####################################<br>
#main loop here<br>
####################################<br>
<br>
while True:<br>
udp_message = bytes(f"{mymsg} {ct}", 'utf-8')<br>
ct += 1<br>
print("send", ct)<br>
try:<br>
s.connect(socketaddr, conntype=esp.UDP_MODE)<br>
s.send(udp_message)<br>
s.close()<br>
except:<br>
print("error occurred")<br>
time.sleep(0.2)<br>
#end main loop</font><br>
<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 10/17/2024 11:34 AM, anecdata wrote:<br>
</div>
<blockquote type="cite" ***@***.***">
<p dir="auto">Does the exception occur in a repeatable way, like
after a certain number of iterations or a certain amount of
time? I don't see this behavior in my own clients.</p>
<p dir="auto">I noticed that the version of NINA firmware is old,
you could try the latest.</p>
<p dir="auto">If you catch the exception and retry, does it
recover?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>
Reply to this email directly, <a href="#214 (comment)" moz-do-not-send="true">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AFIVDDGYTZO7EK3JV6TG3WLZ37KJHAVCNFSM6AAAAABQDYWRJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJZHA3TONJZG4" moz-do-not-send="true">unsubscribe</a>.<br>
You are receiving this because you authored the thread.<img src="https://github.com/notifications/beacon/AFIVDDCQONZBTZFX4SRJVQLZ37KJHA5CNFSM6AAAAABQDYWRJWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUQHRTN2.gif" height="1" width="1" alt="" moz-do-not-send="true"><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message
ID: <span><adafruit/Adafruit_CircuitPython_ESP32SPI/issues/214/2419877597</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#214 (comment)",
"url": "#214 (comment)",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script> </blockquote>
</body>
</html>
Hopefully you can get the NINA firmware updated and see if that improves things. I'm afk with just phone now, but I can do some testing next week when I'm back if the issue persists.
Activity
anecdata commentedon Oct 17, 2024
Does the exception occur in a repeatable way, like after a certain number of iterations or a certain amount of time? I don't see this behavior in my own clients.
I noticed that the version of NINA firmware is old, you could try the latest.
If you catch the exception and retry, does it recover?
larry5b6 commentedon Oct 17, 2024
anecdata commentedon Oct 18, 2024
Hopefully you can get the NINA firmware updated and see if that improves things. I'm afk with just phone now, but I can do some testing next week when I'm back if the issue persists.
larry5b6 commentedon Oct 18, 2024
Issue resolved by upgrading ESP32 firmware to 1.7.7. Case closed