How to Read and Write from the Serial Port

SerialPort (RS-232 Serial COM Port) in C# .NET This article explains how to use the SerialPort class in .NET to read and write data, determine what serial ports are available on your machine, and how to send files. It even covers the pin assignments on the port itself. Example Code: using System; using System.IO.Ports; using … Read more

Sysinternals’ Portmon: Error 2

Sysinternals’ Portmon works only on 32-bit versions of Windows. It does not support 64-bit (probably its driver is not signed). From the Portmon homepage: Runs on: Client: Windows XP (32-bit) and higher (32-bit). Server: Windows Server 2003 (32-bit) and higher (32-bit).

How to send characters in PuTTY serial communication only when pressing enter?

The settings you need are “Local echo” and “Line editing” under the “Terminal” category on the left. To get the characters to display on the screen as you enter them, set “Local echo” to “Force on”. To get the terminal to not send the command until you press Enter, set “Local line editing” to “Force … Read more

How do I connect to a terminal to a serial-to-USB device on Ubuntu 10.10 (Maverick Meerkat)?

First check with dmesg | grep tty if system recognize your adapter. Then try to run minicom with sudo minicom -s, go to “Serial port setup” and change the first line to /dev/ttyUSB0. Don’t forget to save config as default with “Save setup as dfl”. It works for me on Ubuntu 11.04 on VirtualBox.

What’s the difference between /dev/tty.* and /dev/cu.* on macOS?

http://lists.berlios.de/pipermail/gpsd-dev/2005-April/001288.html : 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. Any process trying to open it blocks within the open() call as long as DCD is not asserted by hardware (i.e. as long as the modem doesn’t have … Read more

How to find all serial devices (ttyS, ttyUSB, ..) on Linux without opening them?

The /sys filesystem should contain plenty information for your quest. My system (2.6.32-40-generic #87-Ubuntu) suggests: /sys/class/tty Which gives you descriptions of all TTY devices known to the system. A trimmed down example: # ll /sys/class/tty/ttyUSB* lrwxrwxrwx 1 root root 0 2012-03-28 20:43 /sys/class/tty/ttyUSB0 -> ../../devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/ttyUSB0/tty/ttyUSB0/ lrwxrwxrwx 1 root root 0 2012-03-28 20:44 /sys/class/tty/ttyUSB1 -> ../../devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/ttyUSB1/tty/ttyUSB1/ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)