linux:serial_ports
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:serial_ports [2020/09/30 09:20] – utedass | linux:serial_ports [2022/09/12 00:30] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| * socat -- Command | * socat -- Command | ||
| * fuse -- Filesystem in userspace | * fuse -- Filesystem in userspace | ||
| - | * pipes -- Heave data between processes | + | * < |
| - | ====== | + | ^ Method ^ Description ^ Pros ^ Cons ^ Dependencies ^ |
| + | | pty | Virtual terminal device | Full duplex | ||
| + | | socat | Multipurpose relay | Super flexible | ||
| + | | fuse | Filesystem in userspace | ?? | ???? | libfuse-dev | | ||
| + | | fifo | Named pipes | Simple | ||
| + | ====== | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | < | ||
| + | errno | ||
| + | termios | ||
| + | tcgetattr | ||
| + | cfsetospeed | ||
| + | cfsetispeed | ||
| + | tcsetattr | ||
| + | posix_openpt | ||
| + | ioctl_tty | ||
| + | |||
| + | Använd noncanonical input processing mode för att kunna styra RTS och DTR | ||
| + | |||
| + | termios.h är en grej | ||
| + | |||
| + | |||
| + | |||
| + | #include < | ||
| + | #include < | ||
| + | #include < | ||
| + | #include < | ||
| + | #include < | ||
| + | |||
| + | gör open på porten | ||
| + | int fd = open (portname, O_RDWR | O_NOCTTY | O_SYNC); | ||
| + | </ | ||
| Get info: | Get info: | ||
| Line 35: | Line 76: | ||
| </ | </ | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | |||
| ====== Serial port basics ====== | ====== Serial port basics ====== | ||
linux/serial_ports.1601457606.txt.gz · Last modified: 2022/09/12 00:30 (external edit)
