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.

Python: Making a beep noise

On Windows, if you want to just make the computer make a beep sound: import winsound frequency = 2500 # Set Frequency To 2500 Hertz duration = 1000 # Set Duration To 1000 ms == 1 second winsound.Beep(frequency, duration) The winsound.Beep() can be used wherever you want the beep to occur.

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

Python AttributeError: ‘module’ object has no attribute ‘Serial’ [duplicate]

I’m adding this solution for people who make the same mistake as I did. In most cases: rename your project file ‘serial.py’ and delete serial.pyc if exists, then you can do simple ‘import serial’ without attribute error. Problem occurs when you import ‘something’ when your python file name is ‘something.py’.

Virtual Serial Port for Linux

Complementing the @slonik’s answer. You can test socat to create Virtual Serial Port doing the following procedure (tested on Ubuntu 12.04): Open a terminal (let’s call it Terminal 0) and execute it: socat -d -d pty,raw,echo=0 pty,raw,echo=0 The code above returns: 2013/11/01 13:47:27 socat[2506] N PTY is /dev/pts/2 2013/11/01 13:47:27 socat[2506] N PTY is /dev/pts/3 … Read more