arduino / arduino/ArduinoCore-samd
Serial.readBytes stops reading data from a macOS host after ~2 mins (since 1.8.10)
- Dominant language
- C
- Stars
- 502
- Forks
- 740
- PR merge metrics
- No merged PRs in 30d
Description
First failing commit: c7369bab748ef3bacd0d6364024641e04d42fdf4 (after ArduinoCore-API was added).
Reproduced on:
- macOS El Capitan (Early 2008 MacBookPro4,1)
- macOS High Sierra (Early 2008 MacBookPro4,1)
- macOS Big Sur (Mid-2014 MacBookPro11,3)
Failed to reproduce on:
- Windows 10
- Raspberry Pi OS on a Pi 4B
To reproduce:
- Program this sketch into a Circuit Playground Express, using the `Adafruit Circuit Playground Express` board from the `Arduino SAMD (32-bits Cortex-M0+) Boards` package:
~~~
void setup() {
Serial.begin(9600);
}
#define BUFSIZE 1024
static char buf[BUFSIZE];
void loop() {
if (Serial.dtr()) {
size_t n = Serial.readBytes(buf, BUFSIZE);
Serial.println(n, DEC);
}
}
~~~
- Attach the device to a macOS host and run:
~~~
cat >reproduce_serial_error.py <
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the first failing commit c7369bab748ef3bacd0d6364024641e04d42fdf4 and the Serial.readBytes entry point. Reproduce using the provided Circuit Playground Express sketch and reproduce_serial_error.py on macOS, then compare the USB traffic before and after the failure. Done means sustained serial writes and reads continue without PySerial blocking after several minutes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, macos, python
- Domain
- embedded-iot, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100