UFO ET IT

Ubuntu 10.10 (Maverick Meerkat)에서 직렬 -USB 장치에 터미널을 연결하려면 어떻게해야합니까?

ufoet 2020. 11. 27. 21:47
반응형

Ubuntu 10.10 (Maverick Meerkat)에서 직렬 -USB 장치에 터미널을 연결하려면 어떻게해야합니까?


미니 콤을 USB- 직렬 어댑터를 통해 연결된 직렬 장치에 연결하려고합니다. 이것은 PL2303이며 내가 읽은 모든 것에서 추가 드라이버가 필요하지 않습니다. 장치는 PL2303으로 인식됩니다.

저는 minicom의 초보자입니다. 실행할 올바른 명령입니까? 아니면 구성해야합니까?

$ 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

먼저 dmesg | grep tty시스템이 어댑터를 인식 하는지 확인하십시오 . 그런 다음로 미니 콤을 실행 sudo minicom -s하고 "직렬 포트 설정"으로 이동하여 첫 번째 줄을 /dev/ttyUSB0.

"Save setup as dfl"을 사용하여 구성을 기본값으로 저장하는 것을 잊지 마십시오. VirtualBox의 Ubuntu 11.04에서 작동합니다.


변환기 를 연결할 때마다 권한을 설정해야합니다. 저는 PuTTY사용 하여 연결합니다. 이를 위해 권한을 분류하고 PuTTY를 시작하는 작은 Bash 스크립트를 만들었습니다.

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

putty

추신 : 권한을 777로 설정하는 것은 절대 권장하지 않습니다.


직렬 포트 통신 프로그램 moserial또는 gtkterm연결을 확인하고 설정을 수정 /dev/ttyUSB0(또는 /dev/ttyUSB1!) 하는 쉬운 방법을 제공합니다 . USB-RS232 어댑터가 하나만있을 수 있지만 n지정 /dev/ttyUSBn은 주기적으로 변경 될 수 있습니다. moserial그리고 둘 다 사용 gtkterm하기에 적합한 port것을 선택할 때 각각의 풀다운 메뉴에서 어떤 포트 지정이 관련되어 있는지 보여줍니다 .

대한 자세한 내용은 help.ubuntu.com/community/Minicom확인하세요 minicom.


나는 이것을 adduser *username* dialout. 이전에는 PC를 재부팅하거나 USB를 직렬 어댑터로 다시 연결하는 것이 유일한 방법 이었음에도 불구하고 다시는이 오류가 발생하지 않았습니다.


오랜 시간 독자, 처음으로 도우미;)

hellishProlific USB <> 직렬 어댑터 를 사용하여 동일한 경험을 하려고합니다. 지금까지 Linux가 가장 쉽게 작동합니다.

CentOS에서는 드라이버 등을 설치할 필요가 없었습니다.

  • dmesg | grep -i tty또는 dmesg | grep -i usb나에게 / dev / ttyUSB0을 보여주었습니다.
  • screen ttyUSB0 9600 OSX 에서처럼 나를 위해 속임수를 쓰지 않았습니다.
  • minicom은 나에게 새롭지 만 / dev / modem 부족에 대해 불평했습니다.

그러나 이것은 도움이되었습니다 : https://www.centos.org/forums/viewtopic.php?t=21271

따라서 minicom ( yum install minicom)을 설치 한 다음 설정 ( minicom -s) 을 입력하십시오 .

그런 다음 Serial Port Setup직렬 장치 (옵션 A)를 / dev / ttyUSB0 또는 배포판마다 약간 씩 다르므로 장치 파일을 선택 하고 변경합니다.

그런 다음 Bps (옵션 E)를 9600으로 변경하고 나머지는 기본값 (8N1 YN)이어야합니다.

기본값으로 저장하면 간단히 minicomBob이 삼촌이됩니다.

HTH.


동일한 minicom 오류가 발생합니다. "/ dev / ttyUSB0을 열 수 없습니다 : 해당 파일 또는 디렉토리가 없습니다."

세 가지 참고 사항 :

  1. Prolific Technology PL2303 USB / Serial 어댑터의 직렬 포트 끝에 연결된 장치가 꺼져있을 때 오류가 발생합니다. 장치 (Linux를 실행하는 임베디드 컨트롤러)를 켠 후 minicom이 정상적으로 연결되었습니다.

  2. 나는 슈퍼 사용자로 실행해야합니다 (예 sudo minicom)

  3. Sometimes I have to unplug and plug back in the USB-to-serial adapter to get minicom to connect to it.

I am running Ubuntu 10.04 LTS (Lucid Lynx) under VMware (running on Windows 7). In this situation, make sure the device is attached to VM operating system by right clicking on the USB/Serial USB icon in the lower right of the VMware window and select Connect (Disconnect from Host).

Remember to press Ctrl + A to get minicom's prompt, and type X to exit the program. Just exiting the terminal session running minicom will leave the process running.


I had the exact same problem, and it was fixed by doing a chmod 777 /dev/ttyUSB0. I never had this error again, even though previously the only way to get it to work was to reboot the VM or unplug and replug the USB-to-serial adapter. I am running Ubuntu 10.04 (Lucid Lynx) VM on OS X.


I suggest that newbies connect a PL2303 to Ubuntu, chmod 777 /dev/ttyUSB0 (file-permissions) and connect to a CuteCom serial terminal. The CuteCom UI is simple \ intuitive. If the PL2303 is continuously broadcasting data, then Cutecom will display data in hex format


I just got my GUC232A cable with a molded-in PL2302 converter chip.

In addition to adding myself and br to group dialout, I found this helpful tip in the README.Debian file in /usr/share/doc/bottlerocket:

This package uses debconf to configure the /dev/firecracker symlink, should you need to change the symlink in the future run this command:

dpkg-reconfigure -pmedium bottlerocket

That will then prompt you for your new serial port and modify the symlink. This is required for proper use of bottlerocket.

I did that and voila! bottlerocket is able to communicate with my X-10 devices.


Putty on ubuntu There is no need to install the driver for PL2303 So only type the command to enable the putty Sudo chmod 666 /dev/ttyUSB0 Done Open the putty.

참고URL : https://stackoverflow.com/questions/5347962/how-do-i-connect-to-a-terminal-to-a-serial-to-usb-device-on-ubuntu-10-10-maveri

반응형