openframeworks / openframeworks/openFrameworks
ofSerial prefixMatch search does not find Raspberry Pi UART under certain versions of Raspbian
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
I am unsure if, at one point, the Raspberry Pi's UART routed to /dev/ttyACM0, however, on my Pi (updated to latest via apt-get update/upgrade), it routes to /dev/ttyAMA0.
As such, the ofSerial class will skip over it when building a device list.
A simple fix would be to add the following line after line 168 of ofSerial.cpp:
prefixMatch.push_back("ttyAMA");
(curious if there is a reason ofSerial isn't just doing a blanket search for anything with a "tty" prefix? Speed? Safety?)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the ofSerial implementation in ofSerial.cpp and inspect the prefixMatch setup around line 168. Verify how device-list discovery handles the Raspberry Pi UART path, then confirm that the intended /dev/ttyAMA device is included without disrupting existing matches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux, raspberry-pi
- Domain
- embedded-iot, operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100