Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am trying to connect minicom to a serial device that is connected via a USB-to-serial adapter. This is a PL2303 and from everything I've read no additional drivers are required. The device is recognised as a PL2303.

I'm a beginner at minicom. Is this the correct command to execute? Or do I need to configure something?

$ sudo minicom --device /dev/ttyUSB0 minicom: cannot open /dev/ttyUSB0: No such file or directory  $ sudo lsusb -v  Bus 002 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port Device Descriptor:   bLength                18   bDescriptorType         1  $ tail /var/log/syslog  #then removed and attached the device. Mar 13 23:31:49 ubuntu kernel: [807996.786805] usb 2-1: pl2303 converter now attached to ttyUSB0 Mar 13 23:34:44 ubuntu kernel: [808172.155129] usb 2-1: USB disconnect, address 7 Mar 13 23:34:44 ubuntu kernel: [808172.156321] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0 Mar 13 23:34:44 ubuntu kernel: [808172.156374] pl2303 2-1:1.0: device disconnected Mar 13 23:34:52 ubuntu kernel: [808179.497856] usb 2-1: new full speed USB device using uhci_hcd and address 8 Mar 13 23:34:52 ubuntu kernel: [808179.785845] pl2303 2-1:1.0: pl2303 converter detected Mar 13 23:34:52 ubuntu kernel: [808179.872309] usb 2-1: pl2303 converter now attached to ttyUSB0 
like image 250
codingJoe Avatar asked Mar 18 '11 04:03

codingJoe


People also ask

How do I find the serial port in Ubuntu?

Find Port Number on LinuxOpen terminal and type: ls /dev/tty* . Note the port number listed for /dev/ttyUSB* or /dev/ttyACM* . The port number is represented with * here. Use the listed port as the serial port in MATLAB®.


2 Answers

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.

like image 75
Matej Avatar answered Sep 28 '22 10:09

Matej


You will need to set the permissions every time you plug the converter in. I use PuTTY to connect. In order to do so, I have created a little Bash script to sort out the permissions and launch PuTTY:

#!/bin/bash sudo chmod 666 /dev/ttyUSB0  putty 

P.S. I would never recommend that permissions are set to 777.

like image 38
McParty Avatar answered Sep 28 '22 10:09

McParty