Reputation: 3
I am using a Raspberry Pi 3 which talks to an Arduino on /dev/ttyAMA0.
I can talk to the Arduino with minicom bidirectionally. However, a Python based server also wants this port. I notice when minicom is running, the python code can write to serial0 but not read from it. At least minicom reports the python server has sent a message.
How does this serial port handles contention, if at all? I notice running two minicom session to the same serial port wrecks both sessions. Is it possible to have multiple writers and readers if they are coordinated not to act at the same time? Or can there be multiple readers?
Upvotes: 0
Views: 657
Reputation: 11
Since two minicoms can attempt to use the port and there are collisions minicom must not set an advisory lock on local writes to the serial port. I guess that the first app to read received remote serial message clears it, since serial doesn't buffer. When a local app writes to serial, minicom displays this and it gets sent. I'm going to make this assumed summary
Upvotes: 1