adafruit / adafruit/Adafruit_CircuitPython_ESP32SPI

Debugging mode socket_status() call breaks UDP packet reading

Open
#194 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
102
Forks
71
Avg merge
2d 1h
Merged PRs (30d)
1

Description

When debugging is turned on, `socket_read()` calls to `self.socket_status()` in the print statement, before the actual read (https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI/blob/main/adafruit_esp32spi/adafruit_esp32spi.py#L800), which due to way [nina-fw implements getClientStateTcp for UDP](https://github.com/adafruit/nina-fw/blob/master/main/CommandHandler.cpp#L673) clears the socket, making it impossible to actually read the data...

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at adafruit_esp32spi/adafruit_esp32spi.py around line 800 and trace the debugging path before socket_read(). Then inspect nina-fw/main/CommandHandler.cpp around line 673 to understand the UDP state behavior. Done means UDP packets remain readable when debugging is enabled, with the behavior verified against a reproducible socket read.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
embedded-iot, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.