openframeworks / openframeworks/openFrameworks

ofSerial prefixMatch search does not find Raspberry Pi UART under certain versions of Raspbian

Open
#3,435 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug core linuxarm prelim-analysis section-hardware
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.