Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

choosing between /dev/tty.usbserial vs /dev/cu.usbserial

A PL2303 serial-over-USB device is configured to receive-only data. There is an explanation of tty vs cu here:

MacOS: what's the difference between /dev/tty.* and /dev/cu.*?

That being said, when configuring data collection software, one has to choose either /dev/tty.usbserial OR /dev/cu.usbserial. I would like to understand the facts and the decision-making thought for selecting tty or cu.

like image 459
gatorback Avatar asked Jun 07 '16 19:06

gatorback


People also ask

When to use /dev/CU* vs / Dev/cu?

In practice, it probably matters for historical things like uucp. For everything that's not a modem or that's not intended to be shared between call-out/call-in processes, you should use the /dev/cu.* as this gives you exclusive access to the device.

What is the CU* and TTY* device?

Each serial device shows up twice in /dev, once as a tty.* and once as a cu.*. What is the cu.* device? How does it differ from the tty.* device? Show activity on this post. The idea is to supplement software in sharing a line between incoming and outgoing calls. The callin device (typically /dev/tty*) is used for incoming traffic.

What type of data does the pl2303 serial-over-USB device receive?

A PL2303 serial-over-USB device is configured to receive-only data. There is an explanation of tty vs cu here: MacOS: what's the difference between /dev/tty.* and /dev/cu.*?

How many times do serial devices show up in/Dev?

Each serial device shows up twice in /dev, once as a tty.* and once as a cu.*. What is the cu.* device? How does it differ from the tty.* device? Show activity on this post.


1 Answers

The distinction only matters when you use a modem that provides the DCD signal and you're interested in sharing the device between two or more processes: one or more that can occasionally call out, and exactly one that wants to answer calls. In practice, it probably matters for historical things like uucp.

For everything that's not a modem or that's not intended to be shared between call-out/call-in processes, you should use the /dev/cu.* as this gives you exclusive access to the device.

like image 89
Kuba hasn't forgotten Monica Avatar answered Sep 21 '22 23:09

Kuba hasn't forgotten Monica